生成器
即时、私密且免费
键盘测试器.
检查键盘上的每一个按键。按下一个键,即可看到它在键位图上高亮显示,并显示其event.code和event.key。
此计算器尚未完全翻译——部分文本以英文显示。
输入数值
输入时结果会更新。
开始测试后,依次按下您想检测的按键。
已检测到的按键
尚未记录任何按键。
想测试打字速度而不是硬件? 试试打字速度测试
Cite this calculator
Canonical URL: https://mathify.one/zh/random/keyboard-test
Cite as: Mathify. (2026). 键盘测试器. https://mathify.one/zh/random/keyboard-test
Use Cases
Diagnose keyboard issues
Use the tester to check if all keys are working properly. Press each key and see if it registers on the map. This helps identify dead or stuck keys before replacing the keyboard.
Example: Press every key one by one to ensure each highlights correctly.
Learn key codes for development
Developers can use the tester to see the exact event.code and event.key values for each key, which is useful when implementing keyboard shortcuts or handling input events.
Example: Press 'Shift' to see event.code 'ShiftLeft' and event.key 'Shift'.
Frequently Asked Questions
- How do I use the keyboard tester?
- Simply click on the keyboard tester page and press any key on your physical keyboard. The corresponding key will highlight on the on-screen keyboard map, and the event.code and event.key values will be displayed for that key press.
- What does event.code and event.key mean?
- event.code is a physical key identifier (e.g., 'KeyA' for the A key) that doesn't change based on layout or modifiers. event.key is the character or function the key produces (e.g., 'a', 'A', 'Enter'). This helps identify which physical key is pressed and what input it generates.
- Can this tester detect stuck or dead keys?
- Yes, by pressing each key and observing if it highlights on the map. If a key doesn't highlight when pressed, it may be dead. If a key stays highlighted without being pressed, it may be stuck. The tester helps you identify such issues.
Tips & Common Mistakes
Tips
- Test all keys, including modifiers like Shift, Ctrl, and Alt, to ensure they register correctly.
- Use the tester in a well-lit environment to see the on-screen keyboard clearly.
- If a key doesn't highlight, try pressing it firmly or check for debris under the key.
- Compare the event.code and event.key values to understand how your keyboard layout affects input.
Common Mistakes to Avoid
- Pressing keys too quickly without observing the highlight, missing a dead key.
- Assuming a key is stuck when it's actually the OS repeating the key due to holding it down.
- Not testing all keys, especially less-used ones like F-keys or Print Screen.
Last updated: August 13, 2026