mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-11-09 12:03:03 +00:00
Revert "Make shortcuts work outside of English layout (#227)"
This reverts commit b43f2836c1.
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user