How to get characters read from the keyboard?
Posted
by Sandy
on Stack Overflow
See other posts from Stack Overflow
or by Sandy
Published on 2010-03-24T01:14:37Z
Indexed on
2010/03/24
1:23 UTC
Read the original article
Hit count: 279
Hi,
I am trying to get the characters read from the keyboard. I have the following list of that I wish to recognize if entered by a user.
List of keyboard entries:
- letters
[
]
~
^
- numbers
Part of the code:
void HookManager_KeyUp(object sender, KeyEventArgs e)
{
string test = e.KeyCode.ToString();
Here numbers, letters and square brackets work correctly but the ~
and ^
which require shift key is read incorrectly. For eg. it reads ^ which is on key 6 as a value of 6 and not ^ as it should be. Any help would be appreciated.
Thanks
AA
© Stack Overflow or respective owner