jaywcjlove/hotkeys-js

怎么监听同时按下的键?我想录制快捷键。

Jarvie789 opened this issue · 2 comments

如题

image

@Jarvie789 回调函数返回一个记录,可以使用 hotkeysEvent.keys, 需要更新到 v3.11.0,

hotkeys('*', (evn, hotkeysEvent) => {
  console.log('heven', hotkeysEvent);
  console.log('keys', hotkeysEvent.keys);
})
image @Jarvie789 回调函数返回一个记录,可以使用 `hotkeysEvent.keys`, 需要更新到 `v3.11.0`,
hotkeys('*', (evn, hotkeysEvent) => {
  console.log('heven', hotkeysEvent);
  console.log('keys', hotkeysEvent.keys);
})

感谢老哥!