XhCode Online Converter Tools

KeyCode keyboard key code

Keyboard key value KeyCode online acquisition tool (you can get the KeyCode code of each key of the keyboard)
Click any keyboard key in the input box below to display the KeyCode of this keyboard key. Note: Only one key can be entered at a time.
KeyCode value shown here
                                                                                                                                                                                                          
Alphanumeric key code values(keyCode)
                                 button                                                               Key code                                                               button                                                               Key code                                                               button                                                               Key code                                                               button                                                               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 keys on the numeric keypad(keyCode) Function key key code value(keyCode)
                                 button                                                               Key code                                                               button                                                               Key code                                                               button                                                               Key code                                                               button                                                               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 code value(keyCode)
                                 button                                                               Key code                                                               button                                                               Key code                                                               button                                                               Key code                                                               button                                                               Key code                             
BackSpace 8 Esc 27 Right Arrow 39 -_ 189
Tab 9 Spacebar 32 Dw 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
Cape Lock 20 Up Arrow 38 ,< 188 '" 222
                                                                                                                                                                                                          
Multimedia key code value(keyCode)
                                 button                                                               Key code                                                               button                                                               Key code                                                               button                                                               Key code                                                               button                                                               Key code                             
Volume up 175
Volume down 174
stop 179
Mute 173
Browser 172
mail 180
search for 170
Favorite 171

Keyboard Key Value KeyCode Online Get Tool

1,Detailed keyboard key code KeyCode comparison table, Keycode represents the key code constant

If the key is a letter, the Keycode value = the Ascii value of the character's uppercase character

For other characters, the Keycode value is the same as the Ascii value of the key's lower file characters
2,Quickly get the KeyCode and KeyAscii codes of each keyboard key value online, so that you can easily master the development
Get KeyCode Key Code Online-KeyAscii Value Get-KeyCode Value Get Online Tool

What is KeyCode (Keyboard Key Code)?

KeyCode refers to the numeric value assigned to each key on a keyboard.
When a key is pressed, the computer system or browser generates a KeyCode to identify which key was used.
This is commonly used in programming, especially in web development, game development, and application input handling.


Why Use KeyCode (Keyboard Key Code)?

  • Input Detection: Easily detect and respond to specific key presses (e.g., Enter, Space, Arrow keys).

  • Custom Shortcuts: Build custom keyboard shortcuts or controls in applications and games.

  • Event Handling: Differentiate between multiple keys being pressed in web pages, apps, or software.

  • Cross-Platform Consistency: Handle keyboard input in a consistent way across different devices and operating systems.


How to Use KeyCode (Keyboard Key Code)?

  • Listen for keyboard events like keydown, keyup, or keypress in programming languages (especially JavaScript).

  • Access the KeyCode from the event object (e.g., event.keyCode, event.code, or event.key).

  • Compare the KeyCode against known values to trigger specific actions (e.g., if keyCode == 13, perform an action when Enter is pressed).

  • Map multiple keys to actions or use it for controlling navigation, games, or form interactions.


When to Use KeyCode (Keyboard Key Code)?

  • When building interactive web pages that react to user key input (e.g., typing, hotkeys, game controls).

  • When creating desktop applications that need keyboard navigation or shortcuts.

  • When handling form submissions by pressing Enter instead of clicking a button.

  • When developing games or graphic applications that require real-time key detection.