We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mac电脑,meta对应command按键,代码如下,按下command,不会触发console
useKeyPress( ['meta.uparrow.1'], () => { console.log('done'); }, );
期望: 按下 ⌘ +↑+ 1 组合键后可以触发console.log
The text was updated successfully, but these errors were encountered:
这是浏览器的限制,目前原因不明。我测了下 Mac 系统中,Chrome、FireFox、Edge 浏览器都无法触发“Command + 数字键”。
你这里的快捷键 meta.uparrow.1 就命中了系统的这个限制。
meta.uparrow.1
可以自己用 JS 尝试下,可以验证原生就不支持:
window.addEventListener('keydown', (e) => { console.log('e.key', e.key); })
后面我会在文档里加上 FAQ 说明系统的这个限制。
相关 issue、PR:
以前发现 Mac 系统下对 keyup 事件的限制比较多,现在来看对 keydown 也会有限制
keyup
keydown
Sorry, something went wrong.
liuyib
No branches or pull requests
mac电脑,meta对应command按键,代码如下,按下command,不会触发console
期望: 按下 ⌘ +↑+ 1 组合键后可以触发console.log
The text was updated successfully, but these errors were encountered: