Keyboard Key KeyCode

KeyCode value will be displayed here
Key Code Values for Letters and Numbers (keyCode)
Key Key Code Key Key Code Key Key Code Key Key Code
A 65 J 74 S 83 1 49
B 66 K 75 T 84 2 50
C 67 L 76 U 85 3 51
D 68 M 77 V 86 4 52
E 69 N 78 W 87 5 53
F 70 O 79 X 88 6 54
G 71 P 80 Y 89 7 55
H 72 Q 81 Z 90 8 56
I 73 R 82 0 48 9 57
Key Code Values for Numeric Keypad (keyCode) Function Key Key Code Values (keyCode)
Key Key Code Key Key Code Key Key Code Key Key Code
0 96 8 104 F1 112 F7 118
1 97 9 105 F2 113 F8 119
2 98 * 106 F3 114 F9 120
3 99 + 107 F4 115 F10 121
4 100 Enter 108 F5 116 F11 122
5 101 - 109 F6 117 F12 123
6 102 . 110
7 103 / 111
Control Key Key Code Values (keyCode)
Key Key Code Key Key Code Key Key Code Key Key Code
BackSpace 8 Esc 27 Right Arrow 39 -_ 189
Tab 9 Spacebar 32 Down Arrow 40 .> 190
Clear 12 Page Up 33 Insert 45 /? 191
Enter 13 Page Down 34 Delete 46 `~ 192
Shift 16 End 35 Num Lock 144 [{ 219
Control 17 Home 36 ;: 186 /| 220
Alt 18 Left Arrow 37 =+ 187 ]} 221
Caps Lock 20 Up Arrow 38 ,< 188 '" 222
Multimedia Key Code Values (keyCode)
Key Key Code Key Key Code Key Key Code Key Key Code
Volume Up 175
Volume Down 174
Stop 179
Mute 173
Browser 172
Email 180
Search 170
Favorites 171

Keyboard KeyCode Tool - Online Get KeyCode and KeyAscii Values

Welcome to use our Keyboard KeyCode Tool! This tool provides developers with a convenient way to get the KeyCode and KeyAscii values of each keyboard key online. You can easily obtain the code values of keys and perform corresponding encoding conversions to enhance encoding efficiency.

Tool Features

  • KeyCode Query: With this tool, users can quickly query the KeyCode value for each keyboard key. Just press any key on the keyboard to get the corresponding KeyCode value.
  • KeyAscii Code Query: This tool not only supports obtaining KeyCode values but also extracts the Ascii code of each key. It is especially suitable for developers who need to handle keyboard input.
  • Letters and Special Characters Handling: If the key pressed is a letter, the KeyCode value equals the Ascii value of that uppercase letter; if it is another character, the KeyCode and the Ascii value of that key’s lower-case character will be the same.
  • Convenient Online Query: This tool requires no software installation, and can be used directly online, making it convenient for developers to quickly query key codes during programming, saving time.

How to Use the Keyboard KeyCode Tool?

Using this tool is very simple, just follow the steps below:

  1. Click or press any key on the keyboard on the tool page.
  2. The tool will automatically extract and display the KeyCode and Ascii code of that key.
  3. You can view the code values of each key to understand the encoding method of keyboard input, helping you with program development or debugging.

Example:


Input Key: A
KeyCode: 65
KeyAscii Code: 65
                

Input Key: 1
KeyCode: 49
KeyAscii Code: 49
                

Common Uses

  • Development and Debugging: The keyboard key code query tool can help developers quickly obtain the KeyCode and Ascii code of keys when handling keyboard input, facilitating debugging input events.
  • Form Input Validation: In forms or user input validation, ensure that the input characters comply with regulations; you can validate by checking the Ascii code of the keys.
  • Game Development: During the game development process, handling keyboard events is necessary, and this tool can easily determine the KeyCode corresponding to user input.
  • Keyboard Mapping: It can help developers map keyboard keys to different coded values according to actual needs, accommodating different systems or program designs.

Frequently Asked Questions

1. How to obtain the KeyCode and Ascii code for a specific key?

Just click the key or use the keyboard to input; the tool will automatically extract and display the corresponding KeyCode and Ascii code. No extra operations are needed, it's very convenient.

2. Why does the KeyCode of letters match their Ascii code?

For letter characters, the KeyCode value is the same as the Ascii code. Specifically, the uppercase letter’s Ascii code pressed is the KeyCode value. For example, the Ascii code for the letter "A" is 65, so the KeyCode is also 65.

3. How is the KeyCode determined if the key is a special character?

For special characters, the KeyCode value will be determined based on the Ascii code of that character's lower-case letter or symbol. For instance, the Ascii code for the number key "1" is 49, and its KeyCode is also 49.

Summary

Using the Keyboard KeyCode Tool, developers can quickly query and extract the KeyCode and Ascii code of keyboard keys. Whether handling keyboard events or developing games, applications, etc., this tool can provide precise key code support to enhance development efficiency.

Your footpath:
Choose Language