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,
|
Translations.t.hotkeyDocumentation.selectItem,
|
||||||
() => this.selectClosestAtCenter(0)
|
() => this.selectClosestAtCenter(0)
|
||||||
)
|
)
|
||||||
Hotkeys.RegisterHotkey(
|
|
||||||
{
|
|
||||||
nomod: "Spacebar",
|
|
||||||
onUp: true,
|
|
||||||
},
|
|
||||||
Translations.t.hotkeyDocumentation.selectItem,
|
|
||||||
() => this.selectClosestAtCenter(0)
|
|
||||||
)
|
|
||||||
for (let i = 1; i < 9; i++) {
|
for (let i = 1; i < 9; i++) {
|
||||||
let doc = Translations.t.hotkeyDocumentation.selectItemI.Subs({ i })
|
let doc = Translations.t.hotkeyDocumentation.selectItemI.Subs({ i })
|
||||||
if (i === 1) {
|
if (i === 1) {
|
||||||
|
@ -531,7 +524,6 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
||||||
}
|
}
|
||||||
return true // unregister
|
return true // unregister
|
||||||
})
|
})
|
||||||
|
|
||||||
this.featureSwitches.featureSwitchBackgroundSelection.addCallbackAndRun((enable) => {
|
this.featureSwitches.featureSwitchBackgroundSelection.addCallbackAndRun((enable) => {
|
||||||
if (!enable) {
|
if (!enable) {
|
||||||
return
|
return
|
||||||
|
|
|
@ -113,6 +113,9 @@ export default class Hotkeys {
|
||||||
if (keycode.length == 1) {
|
if (keycode.length == 1) {
|
||||||
keycode = keycode.toUpperCase()
|
keycode = keycode.toUpperCase()
|
||||||
}
|
}
|
||||||
|
if (keycode === " ") {
|
||||||
|
keycode = "Spacebar"
|
||||||
|
}
|
||||||
modifiers.push(keycode)
|
modifiers.push(keycode)
|
||||||
return <[string, string | Translation]>[modifiers.join("+"), documentation]
|
return <[string, string | Translation]>[modifiers.join("+"), documentation]
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue