Merge pull request #17780 from SimonBrandner/fix/space-shortcut-local/17776
Fix space shortcuts on layouts with non-English keys in the places of numbers
This commit is contained in:
commit
2635fc95f4
1 changed files with 11 additions and 17 deletions
|
@ -589,24 +589,18 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
handled = true;
|
handled = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case "1":
|
if (!handled &&
|
||||||
case "2":
|
// ideally we would use SpaceStore.spacesEnabled here but importing SpaceStore in this platform
|
||||||
case "3":
|
// breaks skinning as the platform is instantiated prior to the skin being loaded
|
||||||
case "4":
|
SettingsStore.getValue("feature_spaces") &&
|
||||||
case "5":
|
ev.code.startsWith("Digit") &&
|
||||||
case "6":
|
isOnlyCtrlOrCmdKeyEvent(ev)
|
||||||
case "7":
|
) {
|
||||||
case "8":
|
const spaceNumber = ev.code.slice(5); // Cut off the first 5 characters - "Digit"
|
||||||
case "9":
|
this.navigateToSpace(parseInt(spaceNumber, 10));
|
||||||
case "0":
|
handled = true;
|
||||||
// ideally we would use SpaceStore.spacesEnabled here but importing SpaceStore in this platform
|
|
||||||
// breaks skinning as the platform is instantiated prior to the skin being loaded
|
|
||||||
if (SettingsStore.getValue("feature_spaces") && isOnlyCtrlOrCmdKeyEvent(ev)) {
|
|
||||||
this.navigateToSpace(parseInt(ev.key, 10));
|
|
||||||
handled = true;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return handled;
|
return handled;
|
||||||
|
|
Loading…
Add table
Reference in a new issue