Re: Detecting shift/alt keys
- From: Dodgy <Dodgy@xxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 21 Apr 2005 14:24:54 +0100
On Thu, 21 Apr 2005 13:40:04 +0100, Peter <peter@xxxxxxxxxxx> waffled
on about something:
>Hi,
>
>I have a form with several controls.
>
>How do I detect when a user presses the shift or alt keys? I can't
>seem to trap any keys using formkeypress or formkeydown.
>
>I have a couple of speed buttons and I want them to also be activated
>on either a SHIFT or ALT key being pressed.
>
>Thanks.
if HiWord(GetKeyState(vk_shift))<>0 then
// it's down
else
// it's up
The alt key is vk_menu
Full list here.
http://delphi.about.com/od/objectpascalide/l/blvkc.htm
Hope this helps.
Dodgy.
--
MUSHROOMS ARE THE OPIATE OF THE MOOSES
.
- Follow-Ups:
- Re: Detecting shift/alt keys
- From: Peter
- Re: Detecting shift/alt keys
- References:
- Detecting shift/alt keys
- From: Peter
- Detecting shift/alt keys
- Prev by Date: Detecting shift/alt keys
- Next by Date: Re: Detecting shift/alt keys
- Previous by thread: Detecting shift/alt keys
- Next by thread: Re: Detecting shift/alt keys
- Index(es):