跳转到主要内容

KeyboardEvent 对象

  • ctrlKey boolean (可选) - 在触发事件的快捷键中是否使用了 Control 键
  • metaKey boolean (可选) - 在触发事件的快捷键中是否使用了 Meta 键
  • shiftKey boolean (可选) - 在触发事件的快捷键中是否使用了 Shift 键
  • altKey boolean (可选) - 在触发事件的快捷键中是否使用了 Alt 键
  • triggeredByAccelerator boolean (可选) - 相对于其他用户手势(如鼠标单击)而言,事件是否由快捷键触发