Streamline hotkeys
This commit is contained in:
parent
df01b1683a
commit
f95a1a8039
2 changed files with 4 additions and 9 deletions
|
@ -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
|
||||
|
|
|
@ -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]
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue