Re: Detecting shift/alt keys
- From: "alanglloyd@xxxxxxx" <alanglloyd@xxxxxxx>
- Date: 21 Apr 2005 08:54:23 -0700
> The onkeydown, onkeyup aren't issued for the "special" keys like
> shift, ctrl and alt.
Well they do OK in D3 on the form's OnKeyDown/Up. They certainly don't
in OnKeyPress because only an ASCII key will trigger that event
handler.
I usually use ...
if GetKeyState(VK_?????) < 0 then ...
for pressed
... and of course toggleable keys are ...
if Odd(GetKeyState(VK_INSERT)) then ...
for toggled on.
note that (at least in D3) the alpha-digit virtual-key codes (VK_A to
VK_Z etc) are not defined in Delphi.
Alan Lloyd
.
- Follow-Ups:
- Re: Detecting shift/alt keys
- From: Hanford Carr
- Re: Detecting shift/alt keys
- References:
- Detecting shift/alt keys
- From: Peter
- Re: Detecting shift/alt keys
- From: Dodgy
- Re: Detecting shift/alt keys
- From: Peter
- Re: Detecting shift/alt keys
- From: Dodgy
- Detecting shift/alt keys
- Prev by Date: Re: Detecting shift/alt keys
- Next by Date: Re: Programming with COM port
- Previous by thread: Re: Detecting shift/alt keys
- Next by thread: Re: Detecting shift/alt keys
- Index(es):