mirror of
https://github.com/tauri-apps/tauri.git
synced 2025-01-03 16:42:42 +03:00
fix(core): use event.code to check which key pressed (#8819)
* fix(core): use event.code to check which key pressed * Discard changes to .changes/fix-devtool-hotkey-code.md
This commit is contained in:
parent
2f55bfecbf
commit
cf3e40cc47
@ -8,8 +8,8 @@
|
||||
|
||||
const isHotkey =
|
||||
osName === 'macos'
|
||||
? (event) => event.metaKey && event.altKey && event.key === 'I'
|
||||
: (event) => event.ctrlKey && event.shiftKey && event.key === 'I'
|
||||
? (event) => event.metaKey && event.altKey && event.code === 'KeyI'
|
||||
: (event) => event.ctrlKey && event.shiftKey && event.code === 'KeyI'
|
||||
|
||||
document.addEventListener('keydown', (event) => {
|
||||
if (isHotkey(event)) {
|
||||
|
Loading…
Reference in New Issue
Block a user