Board index » delphi » Distinguish left and right Alt keypresses...

Distinguish left and right Alt keypresses...

OK, I got simulating keypresses down, thanx a heap guys.

Now I'm curious, I found ways of seeing exactly what buttons are hit (and
simulate them) for every key on the keyboard except the difference between
the left and right Alt buttons.  I can see when Alt is hit, but not which
one.  Is there any way to do this that I just missed or something?  No, it's
not terribly important, but it's the principle, it's just driving me nuts
not being able to.

 

Re:Distinguish left and right Alt keypresses...


Hi C-Tzar,

Quote
>OK, I got simulating keypresses down, thanx a heap guys.

>Now I'm curious, I found ways of seeing exactly what buttons are hit (and
>simulate them) for every key on the keyboard except the difference between
>the left and right Alt buttons.  I can see when Alt is hit, but not which
>one.  Is there any way to do this that I just missed or something?  No, it's
>not terribly important, but it's the principle, it's just driving me nuts
>not being able to.

THere's only one(!) ALT key on your keyboard. It's left of the space
bar. The one right of the space bar is the AltGr key which simulates a
combined Alt/Ctrl keypress. I wrote a little KeySpy[1] that displays the
codes used in KeyDown, KeyPress and KeyUp together with the keyboard
states (Ctrl, Alt, Shift).

Footnotes:
[1] www.nesshoever.net/download/keyspy.exe

Cheers,
   Udo
--
Homepage: http://www.nesshoever.de            No mails please. Reply here.

Delphi env.:                         Global Polio Awareness Campaign 2001+
W2K.sp2, D6Pro & D4Pro.sp3               More info -> http://www.2-mad.com

Other Threads