Keyboard Key Detection

Real-time detection and display of keyboard key information

点击页面任意位置,然后按下键盘按键即可检测

Keyboard Event Properties

  • key - 按键的实际字符值
  • code - 按键的物理位置代码
  • keyCode / which - 按键的数字代码(已废弃但仍常用)
  • location - 按键位置(标准、左侧、右侧、数字键盘)
  • ctrlKey / shiftKey / altKey / metaKey - 修饰键状态