OnKeyDown with "virtual key codes". How?
Posted on 2001-06-08
I'm working in Borland C++ Builder 4 under win98.
I'm using the OnKeyDown event as input on a form. I want to determine which key was pressed, which works good in most cases. But the keys on the numeric keypad are reported all wrong, '1' gets value 97, '2' gets value 98 etc. I've heard something about "virtual key codes", what is it about, and how do I use it?
The OnKeyPress event handles the numeric keypad correctly, but can't handle the arrowkeys etc. so I don't want to use OnKeyPress.
Thanks for help