Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keycodes for arrow keys

Can anyone please help me to get the keycodes for the arrow keys in c# .net keypress events? Can you help me to get out of this check point?

best regards, Arun.

like image 605
Arun Avatar asked Dec 01 '08 05:12

Arun


People also ask

What is the keyboard key code value for arrow up?

Appendix B. Keyboard Key Code Values Key Key value Key Key value Arrow Up 38 F9 120 Backspace 8 F10 121 Caps Lock 20 F1 122 Ctrl 17 F12 123 45 more rows ...

Is there a keycode for arrow keys in keypress?

KeyPress doesn't get fired for Arrows and the event args doesn't have a KeyCode property but for Arrow Keys in keyUp event they are: Show activity on this post.

What is the character code for a on a keyboard?

For example, the A key on the keyboard produces the same key code when pressed, even though its character code might be 65 (uppercase A)or 97 (lowercase a), depending on whether the Shift key is down at the same time. Key codes are not influenced by modifier keys.

What are the keyboard key code values for each row?

Appendix B. Keyboard Key Code Values Key Key value Key Key value Arrow Right 39 F8 119 Arrow Up 38 F9 120 Backspace 8 F10 121 Caps Lock 20 F1 122 45 more rows ...


2 Answers

http://msdn.microsoft.com/en-us/library/system.windows.forms.keys.aspx

Keys.Up, Keys.Left, Keys.Right, Keys.Down.

like image 36
shahkalpesh Avatar answered Oct 04 '22 19:10

shahkalpesh


Do you mean the KeyUp event? KeyPress doesn't get fired for Arrows and the event args doesn't have a KeyCode property but for Arrow Keys in keyUp event they are:

Keys.Up, Keys.Down, Keys.Left, Keys.right

like image 164
JoshBerke Avatar answered Oct 04 '22 18:10

JoshBerke