🎹 Online Keyboard Key Tester

Ad Placeholder - Top (728×90)
Total Presses: 0 Current: 0 Max Simultaneous: 0 NKRO: Testing

Key Details

key
-
code
-
keyCode
-
location
-
modifiers
-
timestamp
-

Key History

Ad Placeholder - Middle (728×90)

How to Use

This keyboard key tester is simple and intuitive. Here's a detailed guide:

Basic Testing: After opening the tool, simply press any key on your keyboard. The virtual keyboard will highlight the corresponding key position in real time, while the Key Details panel below shows complete information about that key, including key, code, keyCode, and location properties. You can test every key on your keyboard one by one to confirm they all work correctly.

Combination Key Testing: The tool supports detecting multiple keys pressed simultaneously. Try common shortcuts like Ctrl+C (copy), Ctrl+V (paste), and Alt+Tab (switch windows). Watch multiple keys highlight simultaneously on the virtual keyboard, and see the modifier states change in the Key Details panel.

Rollover Testing: During testing, the tool automatically tracks the maximum number of keys pressed simultaneously. If your keyboard supports NKRO (N-Key Rollover), try pressing as many keys as possible at once and observe the "Max Simultaneous" value. Standard membrane keyboards typically support 2-3 key rollover, while high-end mechanical keyboards may support 6-key or full NKRO.

Key History: Every key press is recorded in the history list, showing the key value, code, modifier state, and timestamp. You can review the history anytime, or click "Clear" to remove all records. The history helps you track your testing process and troubleshoot issues.

Use Cases

This keyboard key tester is useful in many scenarios. Here are some typical use cases:

Pre-Purchase Inspection: When buying a used keyboard, especially a mechanical one, buyers want to verify all keys work properly. Using this tool, you can quickly test every key's response, check for stuck keys, double-clicking, or dead switches, avoiding defective purchases.

Keyboard Troubleshooting: When individual keys stop working or behave strangely, this tool helps you quickly identify the problematic keys. For example, if a letter won't type, you can isolate-test that specific key to determine whether it's a hardware failure (broken switch) or a software issue (driver conflict).

Gaming Rollover Verification: Gamers frequently press multiple keys simultaneously (WASD+Shift+Space+ability keys), requiring strong anti-ghosting capabilities. Using this tool's rollover test, gamers can verify their keyboard's real-world performance during gaming scenarios, ensuring key conflicts won't ruin their gameplay.

Web Development Debugging: Web developers often need to understand how different browsers and operating systems handle keyboard events. This tool displays key, code, keyCode, and other properties, helping developers debug keyboard-related interaction logic and ensure cross-browser compatibility.

Extended Knowledge

Keyboard Event Model: Modern browsers support three keyboard events: keydown (key pressed), keypress (character input, deprecated), and keyup (key released). This tool primarily uses keydown and keyup events to detect key states. The keydown event fires when a key is pressed and repeats if held down; keyup fires once when the key is released.

key vs code vs keyCode: The key property represents the character produced (e.g., "a", "Enter") and is affected by keyboard layout; code represents the physical key position (e.g., "KeyA", "Enter") and is layout-independent, making it the more reliable choice; keyCode is the old numeric code (e.g., 65), deprecated but still needed for legacy compatibility. Modern web development should prefer key and code.

Keyboard Scan Matrix: Most keyboards use a scan matrix to detect key presses. Keys are arranged in a grid of rows and columns. The controller scans each row and column sequentially, detecting which intersections are active. This design has a limitation: if four keys forming a rectangle are pressed simultaneously, the controller may misidentify them (ghosting), which is why keyboard rollover design exists.

Full NKRO Implementation: Full NKRO is mainly implemented in two ways: declaring full rollover support in the USB HID report descriptor (most high-end mechanical keyboards), or using dual/triple-mode communication protocols. Some keyboards achieve full NKRO over USB through firmware optimization but may downgrade to 6-key rollover in Bluetooth mode.

Frequently Asked Questions

What is N-Key Rollover (NKRO)?

N-Key Rollover means the keyboard can register all keys simultaneously without ghosting or dropped inputs. This is critical for gaming and professional use where multiple keys are pressed at once.

What is the difference between key, code, and keyCode?

key represents the character value (e.g., 'a' or 'Enter'), code represents the physical key position (e.g., 'KeyA' or 'Enter'), and keyCode is the deprecated numeric code (e.g., 65). Modern development should prefer key and code properties.

Do laptop and mechanical keyboards give the same test results?

Results depend on the keyboard's hardware specs. Mechanical keyboards typically support higher rollover counts (6-key or full NKRO), while standard membrane keyboards may only support 2-3 key rollover. The tool shows each key's response but cannot change the keyboard's hardware capability.

Why can't some keys be detected?

Certain system-level shortcuts (like Ctrl+Alt+Del, Win+L) are intercepted by the operating system and cannot be captured by the browser. Additionally, some Fn combinations are handled at the hardware level and are also undetectable. This is normal security behavior.

Does the tester require an internet connection?

No. This tool runs entirely within your browser. All key detection happens locally on your device, and no data is sent to any server. You can use it offline.

How do I test combination keys?

This tool supports combination key detection. Simply press multiple keys simultaneously (e.g., Ctrl+C), and the tool will display all pressed keys and their modifier states. You can view the complete combination information in the key history area.

Does the virtual keyboard support all keyboard layouts?

The virtual keyboard displays a standard US QWERTY layout, but the actual detection is based on physical keys. Regardless of your keyboard layout (DVORAK, AZERTY, etc.), the code property will correctly reflect the physical key position. The key property will show the corresponding character based on your system keyboard layout.

Why do held keys trigger repeatedly?

This is the browser's auto-repeat mechanism. When you hold down a key, the operating system sends repeated keydown events at a certain rate (typically around 30 per second) until you release the key. This is normal system behavior, not a tool bug.

Ad Placeholder - Bottom (728×90)