diff --git a/client/src/olympusapp.ts b/client/src/olympusapp.ts index 25d6548a..981b0412 100644 --- a/client/src/olympusapp.ts +++ b/client/src/olympusapp.ts @@ -253,6 +253,17 @@ export class OlympusApp { this.getUnitsManager().deselectAllUnits(); }, "code": "Escape" + }).addKeyboardShortcut( "toggleUnitLabels", { + "altKey": false, + "callback": () => { + const chk = document.querySelector( `label[title="Show unit labels"] input[type="checkbox"]` ); + if ( chk instanceof HTMLElement ) { + chk.click(); + } + }, + "code": "KeyL", + "ctrlKey": false, + "shiftKey": false }); ["KeyW", "KeyA", "KeyS", "KeyD", "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"].forEach(code => { diff --git a/client/src/shortcut/shortcutmanager.ts b/client/src/shortcut/shortcutmanager.ts index fd81b75d..be8b70fe 100644 --- a/client/src/shortcut/shortcutmanager.ts +++ b/client/src/shortcut/shortcutmanager.ts @@ -1,6 +1,6 @@ import { ShortcutKeyboardOptions, ShortcutMouseOptions } from "../interfaces"; import { Manager } from "../other/manager"; -import { Shortcut, ShortcutKeyboard, ShortcutMouse } from "./shortcut"; +import { ShortcutKeyboard, ShortcutMouse } from "./shortcut"; export class ShortcutManager extends Manager {