Try WinApi:
BOOL GetKeyboardState(
PBYTE lpKeyState // address of array to receive status data
);
Enclosed is some documentation:
I suggest you check msdn.microsoft.com for WinApi calls, if you don't have
the developer library (which is worth the $70 just to get info on WinApi
calls).
StdCoder.Decode ..,, ..wi,...3Qw7uP5PRPPNR9Rbf9b8R79FTvMf1GomCrlAy2xhX,Cb2x
hXhC6FU1xhiZiVBhihgmRiioedhgrZcZRiXFfaqmSrtuGfa4700zdGrr8rmCLLCJuyKtYcZRiX
7.2.s,MEr.,6.5Qw7uP51QCPuP7PNN9F9vQAy1xB.gdj,UBxhYhAbf9P0G2sIdvPZntgcghghZ
cZRC8T0E.k5f,H.Dg42.,U08J99SdfJHPNjvQCJuGKfaqmY6MwdONl1QCh0708T,U..w.AaO.,
sUGpmWbBxhYhAbndMHT9NY6Mw.sQq2Y6cwB.0.dB4w,YpME.0.YtCU00.bnUGLu8ro8quGrmCL
WKqtE0E.ENE.0.x.0.4.0kU8ro4Kq2wAC.6.VQ.E.UegiJYe6r.3Qwd0ZORNPNZvQRtIdHdKLq
6F9vQ59.X5.bf9ZORNPNG20EtD.0E.6f,U5UXW.2.52.CLLC3b8Rn9P99F9vQ0ks,Uikwm46.Z
z,E..W.e32.86.c918R..,E0E...7,,M.E.EM4PhYVsnXat.wnjl.k.E.0.1cUZT1E.MCE.666
.k.0.Opm8Lm4Kr4asbj1.,6j3.4,4.0E.e0Umr,6.IAw.A96.CMt1,,6..W.y12.8Mt9,0E..U
YU.A.6.6A...4.0E.c.3gwP.0.P,0.,,,.4.o8.VuI3.0E6,7.5cUZT1E.cDE.666.k.UK,.E.
m962c.R036.2U.I3..,U8W5U,0,k,V.2..F.D10.322U...N0,M.E.EME.6.D0.A.I,6.9iGHE
3LN7wdUT1ds89lgLLLon.z45v01GIOJZgxUS8YU0KyBU.2.q12.G00.A.sETPRZPO9fQ,dH9vR
WFs5.2Uw0S,2.0Ue..6.wl.k1k.V.sUE.0.U6Ub,,U002..6H6.1.0.01E.S2.M.c0E.KA....
.U2wU.k08Mtr.0E.MA,.,UYU..1.C2..4.072U9U4Ikmj,6.g56.Y22.M.kV..E.6.V2o3oU.E
.0EJ..2.08S.462.520E..2,wA6.IEU...N0,M.E.EM.0kXa7.A.I,6.94.....E08.Ok.E10.
,6.J,.E.sas,MU6.,k,V.2..F.D10.326..EaE.4.2.24U.w6.k.E3U.gM......Bc.c,,U.2U
e..6.IAw.A92U.sUE.0.U6Uz.,U000E..UYU.A.6.6A61..M.6.,U5Ikmj,6.A56.222.M.Ef.
2XkD.6.t3Q,wU.E.0EJ..2.84S.a32.520E..2,w56.IEE.0..Y22U,.,.V,..k.E.0.FcUZT1
E.cDE.666.k.UK,6IM.6YE.e.8E,U.E.0EJ..2.C5S.a32.520E..2V.kTU.E,F.6..EGE.4Ew
nr,2zwR.VNgp0..AU.E.0.3cJc.,U.2Ue..6.QCw.A96.C62U..60sDE.cU.,..G00k.U.Uk..
.M.6.,U5o,,k10.0EJ..0E.sQs,MKE.QE6.,.E2kTU.E,,0..Y22U,.,.V,..k.E.0.3sBc.,.
,c8..0.b1D.n00U10,6..W.y12.86E..UYU.A.6.6A...4.0E.c.t00.0EJ..2.C5S.a32.520
E..2,w56.IEU...7,,M.E.EM...A.2U.k1W.,E.E.e0.U.ktk1kgU.sUE.0.U6Uz.,U002..67
6.1.0.01U5,.4.0E.c.xR.I.6.J,.E.MTs,MK6.,k,V.2..F.z,0.326..EGE.4.2.24...1.,
6.IU4V6I,IURC.8.0E.e0.U.ktk1kgU.sUE.0.U62.y12.86E..UYU.A.6.6A...4.0E.c.b53
6.6.J,.E.MTs,MK6.,k,V.2..F.z,0.326..EGE.4.2.24...1.,6.IUzF.WE3E,ij.c.,U.2U
e..6.go.k1kgE.0U10,6..WE.sDE.cU.,..G00k.U.Uk..U,U,U.2.8EA7.5622U0I.Q.2U0.E
.8.s0c.B.q.8k4U.E.0EJ..2.C5S.a30E.QE6.,.E2kTU.E,,0..Y22U,.,.V,kX..1.,6.wU8
U52.2Ue..2U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m.BHqmqrSrouqn0GvaKt..71u4UVRCYAEuyaYBhn,f1,dM99RUo
Vghga,.0mouqtGrkQgZRiUwBsPbPN,tO9Xu2YBIUKRdTZdH3d7p6huGzeIb8GHeFEaCobuIeEf
ioj8pVyIbG3EaqoWuoeOpZyJdqoWuoeGJoKqtKKEmqmM9,NMR9N.P7NHvQd1ko665vPR1G5851
fR1PONPM39P996dvP,NMRnk05.whiZht3Yo3hmxhpxgc3Yo3BS2cMkd6R999,tI99RL0.U5lUC
rwuqliomard.kZsI.11POMVfJHfQd1LONn96BPRkrQii2YBIUFhidRgfBdipgjhV0wedphYxhr
RCR8Jp76fuQ996hPNZvQHvPR96bd9X76TfQ,7P19R9fQRN1jOOR9NcC,NJbXLBhiZA2YtgaUwh
m,..5OFp76fePbPRV9QTHuKKmum4Wom4KmKKteHEGomCKq4KtKKm0mo2YrBhihindQR7ORN1HO
PVvPZ9R,7HHfMZPMZPSp76fuQ0muCrm8rN8HLmqo8KLqE,CpmKKE4IqCrrqE,mGEmGEmGEUUgV
CIklbeZlVyKrGLtyKqmqm8rtumdYg1ZimZh2hgnRg.ASW5.ELCoruKu.G20U1VVlmc9Et...kt
u0.Y62Um1,.d.,.HE.0E.0..4E,p,6.Ag.6.D.n0,6.C60E.0.U6E.y12.86E..UYU.AU.U.Uk
U.E.S2.M.6.,U0O1E..UO.,.1.eG.0S45E.E.0t.U..61lbAUwApPt0lLU8ssH2UnpZ1xB..K,
2..606.k22.0Oxadk5nq3U.az86UtbUojC8QtwO.A51...
--- end of encoding ---
-----Original Message-----
From: robert.d.campbell{([at]})nowhere.xy
[mailto:robert.d.campbell{([at]})nowhere.xy
Sent: Thursday, May 24, 2001 1:20 AM
To: blackbox{([at]})nowhere.xy
Subject: Mouse tracking
In the outline procedure below I try to monitor the status of
the modifier (Ctrl) key while tracking the mouse position
during a 'drag' operation. The intention is to only allow the
drag if the Ctrl key is pressed, and to abort the operation if
it is released.
However I find that modifiers is only updated to reflect the mouse
buttons, not updated to replect the current state of the modifier key.
The commented out WinApi approach also does not work.
Can anyone tell me how to monitor the Ctrl key during a mouse drag?
Thanks
Robert Campbell
(I have only tried this in 1.4 beta.)
PROCEDURE (v : View) HandleCtrlMsg* (frame : Views.Frame;
VAR msg : Controllers.Message; VAR focus : Views.View);
VAR
x, y : INTEGER;
modifiers : SET;
ctlFlg, isDown : BOOLEAN;
BEGIN
WITH msg : Controllers.TrackMsg DO
ctlFlg := Controllers.modify IN msg.modifiers;
IF ctlFlg THEN
REPEAT
frame.Input (x, y, modifiers, isDown);
ctlFlg := Controllers.modify IN modifiers;
(*
ctlFlg := WinApi.GetKeyState (Api.VK_CONTROL) < 0;
*)
... Show status of x, y ...
UNTIL ~(isDown & ctlFlg);
IF ctlFlg THEN ... Take action with x, y ... END
END
END
END HandleCtrlMsg;
--------------------------------------------
To unsubscribe from this mailing list, send a message containing the word
"unsubscribe" to:
blackbox-request{([at]})nowhere.xy
To get a list of valid e-mail commands and instructions on their usage, send
a message containing the word "help" to the above address.
Send any problem reports or questions related to this email list to the list
owner at
owner-blackbox{([at]})nowhere.xy
--------------------------------------------
To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
blackbox-request{([at]})nowhere.xy
To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.
Send any problem reports or questions related to this email list to the list owner at
owner-blackbox{([at]})nowhere.xy
Received on Thu May 24 2001 - 16:11:42 UTC