By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,441 Members | 998 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,441 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Jan 31 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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
br**********************@hotmail.com
Remove only "_nos_pam"
Jan 31 '07 #2

P: n/a
thanks

"Bruno van Dooren [MVP VC++]" <br**********************@hotmail.comwrote
in message news:O%******************@TK2MSFTNGP06.phx.gbl...
>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
br**********************@hotmail.com
Remove only "_nos_pam"

Jan 31 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.