1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2025-08-07 22:33:46 +00:00

Revert "Make shortcuts work outside of English layout (#227)"

This reverts commit b43f2836c12d54a60f6250ad7d77659d29841492.
This commit is contained in:
Timur Ismagilov 2024-09-07 21:35:22 +03:00
parent 380a8c321a
commit d70d8aa990

View File

@ -57,23 +57,9 @@ rrh.shortcuts = {
if ((!event.ctrlKey && !event.metaKey && !event.altKey) &&
event.target instanceof Node && isTextField(event.target)) return
let possibleShortcuts = [keyEventToShortcut(event)]
if (event.code.startsWith('Key')) {
possibleShortcuts.push(keyEventToShortcut({
...event,
key: event.code.replace(/^Key/, '').toLowerCase(),
}))
}
let shortcut = keyEventToShortcut(event)
let shortcut = null
for (let possibleShortcut of possibleShortcuts) {
if (possibleShortcut in this.active) {
shortcut = possibleShortcut
break
}
}
if (shortcut === null) {
if (!this.active[shortcut]) {
this._resetActive()
return
}