mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-08-08 06:43:47 +00:00
Revert "Make shortcuts work outside of English layout (#227)"
This reverts commit b43f2836c12d54a60f6250ad7d77659d29841492.
This commit is contained in:
parent
380a8c321a
commit
d70d8aa990
@ -57,23 +57,9 @@ rrh.shortcuts = {
|
|||||||
if ((!event.ctrlKey && !event.metaKey && !event.altKey) &&
|
if ((!event.ctrlKey && !event.metaKey && !event.altKey) &&
|
||||||
event.target instanceof Node && isTextField(event.target)) return
|
event.target instanceof Node && isTextField(event.target)) return
|
||||||
|
|
||||||
let possibleShortcuts = [keyEventToShortcut(event)]
|
let shortcut = keyEventToShortcut(event)
|
||||||
if (event.code.startsWith('Key')) {
|
|
||||||
possibleShortcuts.push(keyEventToShortcut({
|
|
||||||
...event,
|
|
||||||
key: event.code.replace(/^Key/, '').toLowerCase(),
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
|
|
||||||
let shortcut = null
|
if (!this.active[shortcut]) {
|
||||||
for (let possibleShortcut of possibleShortcuts) {
|
|
||||||
if (possibleShortcut in this.active) {
|
|
||||||
shortcut = possibleShortcut
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (shortcut === null) {
|
|
||||||
this._resetActive()
|
this._resetActive()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user