Need to know if dialog input is from the main keyboard keys

  • Thread starter Thread starter Frank
  • Start date Start date
F

Frank

In a dialog box procedure is there a way to determine if keyboard input is
from the keypad or the arrow keys?

I need to know if the input is from the main keyboard keys.


Thanks
 
In a dialog box procedure is there a way to determine if keyboard input is
from the keypad or the arrow keys?

I need to know if the input is from the main keyboard keys.

I think you can do this by monitoring the low level keyboard message while
they are sent to your app.
If I recall correctly, they have different scancodes.
The easiest way to test is to install a low level keyboard hook and watch
what is coming by when you press the different keys between which you want
to distinguish.
Mybe it is also possible by monitoring the window messages themselves with a
Message hook.

Have a look at SetWindowsHookEx
I think that is a good starting point.

--

Kind regards,
Bruno van Dooren
(e-mail address removed)
Remove only "_nos_pam"
 
thanks

Bruno van Dooren said:
I think you can do this by monitoring the low level keyboard message while
they are sent to your app.
If I recall correctly, they have different scancodes.
The easiest way to test is to install a low level keyboard hook and watch
what is coming by when you press the different keys between which you want
to distinguish.
Mybe it is also possible by monitoring the window messages themselves with
a Message hook.

Have a look at SetWindowsHookEx
I think that is a good starting point.

--

Kind regards,
Bruno van Dooren
(e-mail address removed)
Remove only "_nos_pam"
 
Back
Top