aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/GlobalKeyHandler.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-10-02 16:17:00 -0400
committerbobzel <zzzman@gmail.com>2020-10-02 16:17:00 -0400
commit3b9ca92421f54514f30bcb828e81172e6a9e6658 (patch)
treea90a4b73887e52d0a13cd0203b4074c9eb62cf46 /src/client/views/GlobalKeyHandler.ts
parent9f2eadb8696aa5b66e7e3fef9934d2b34ccd7d91 (diff)
fixed creating groups
Diffstat (limited to 'src/client/views/GlobalKeyHandler.ts')
-rw-r--r--src/client/views/GlobalKeyHandler.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/GlobalKeyHandler.ts b/src/client/views/GlobalKeyHandler.ts
index 2ea1c464f..c48ba109a 100644
--- a/src/client/views/GlobalKeyHandler.ts
+++ b/src/client/views/GlobalKeyHandler.ts
@@ -51,11 +51,11 @@ export class KeyManager {
}
public unhandle = action((e: KeyboardEvent) => {
- if (e.key.toLowerCase() === "shift") KeyManager.Instance.ShiftPressed = false;
+ if (e.key?.toLowerCase() === "shift") KeyManager.Instance.ShiftPressed = false;
});
public handle = action(async (e: KeyboardEvent) => {
- if (e.key.toLowerCase() === "shift" && e.ctrlKey && e.altKey) KeyManager.Instance.ShiftPressed = true;
+ if (e.key?.toLowerCase() === "shift" && e.ctrlKey && e.altKey) KeyManager.Instance.ShiftPressed = true;
if (!Doc.UserDoc().noviceMode && e.key.toLocaleLowerCase() === "shift") DocServer.PRINT_CACHE();
const keyname = e.key && e.key.toLowerCase();
this.handleGreedy(keyname);