Streamline hotkeys

This commit is contained in:
Pieter Vander Vennet 2023-12-09 16:01:15 +01:00
parent df01b1683a
commit f95a1a8039
2 changed files with 4 additions and 9 deletions

View file

@ -503,14 +503,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
Translations.t.hotkeyDocumentation.selectItem,
() => this.selectClosestAtCenter(0)
)
Hotkeys.RegisterHotkey(
{
nomod: "Spacebar",
onUp: true,
},
Translations.t.hotkeyDocumentation.selectItem,
() => this.selectClosestAtCenter(0)
)
for (let i = 1; i < 9; i++) {
let doc = Translations.t.hotkeyDocumentation.selectItemI.Subs({ i })
if (i === 1) {
@ -531,7 +524,6 @@ export default class ThemeViewState implements SpecialVisualizationState {
}
return true // unregister
})
this.featureSwitches.featureSwitchBackgroundSelection.addCallbackAndRun((enable) => {
if (!enable) {
return

View file

@ -113,6 +113,9 @@ export default class Hotkeys {
if (keycode.length == 1) {
keycode = keycode.toUpperCase()
}
if (keycode === " ") {
keycode = "Spacebar"
}
modifiers.push(keycode)
return <[string, string | Translation]>[modifiers.join("+"), documentation]
})