amorosik
Member
- Local time
- Today, 11:04
- Joined
- Apr 18, 2020
- Messages
- 518
A fairly frequent request, for users who often use the numeric keypad, is to make the program code always 'see' the same key
Regardless of the state of the Num-Lock and the type of keyboard
And so when the operator presses the '4' key on the numeric keypad (the 4 key is the combination of both the number 4 and the left-arrow), the program must 'see' it always as the number 4 and never as the left-arrow
I tried to use the form keydown event to check the incoming keycode (keypreview=true) and change it if necessary
So that the '4' key would always arrive on the form, even if I pressed the num-lock
But I see that using different keyboards, different codes come in
So the question is: what do you think is the best way to make the code always see the same key, for example the number 4, when the key with the number 4 is pressed, even using different keyboards?
Regardless of the state of the Num-Lock and the type of keyboard
And so when the operator presses the '4' key on the numeric keypad (the 4 key is the combination of both the number 4 and the left-arrow), the program must 'see' it always as the number 4 and never as the left-arrow
I tried to use the form keydown event to check the incoming keycode (keypreview=true) and change it if necessary
So that the '4' key would always arrive on the form, even if I pressed the num-lock
But I see that using different keyboards, different codes come in
So the question is: what do you think is the best way to make the code always see the same key, for example the number 4, when the key with the number 4 is pressed, even using different keyboards?