scan codes

I'd like to know the scan code of "ESC" and "Windows" Key.
Who can give me a hand please?
cookeyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ahalyaCommented:
found these in my Windows.pas.  Are they ok ?

  VK_ESCAPE = 27;
  VK_LWIN = 91;
  VK_RWIN = 92;
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ahalyaCommented:
oops, looks like what i have listed are the virtual keycodes.

But i think you can use the MapVirtualkey function to get the scancode i'll assume.


scancode := MapVirtualKey(vkey, 0);
0
sburckCommented:
There are two level for 'scan-codes'.  The actual scan codes the keyboards generate are, for the most part, found here:

http://www.geocities.com/SiliconValley/Bay/8302/keybrd.htm

Unfortunately, these are based on the 101 key keyboard, not the 104, so the Windows key is absent.  ESC is 76 (decimal) here, I cannot find the info for the Windows key.

More useful for the Delphi programmer is the BIOS translation of these scancodes.  For keys that have an ASCII value (like ESC), they will get a Keypress event, and the others won't, but they both get KeyDown/Up events, and here, ESC is 27 and Windows is 91.
0
nricoCommented:
Something I always did in DOS (I guess it should work here as well): Just write a program that displays the scancode when you press a key. That way, you can find out the scancode of every key you want!!!!

(Order now)

;-)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.