diff --git a/src/util/keyutil.ts b/src/util/keyutil.ts index 16752f44..e9f28503 100644 --- a/src/util/keyutil.ts +++ b/src/util/keyutil.ts @@ -117,6 +117,10 @@ class KeybindManager { curKeybind.info = this.keyDescriptionsMap.get(curKeybind.command).info; } newKeyDescriptions.set(curKeybind.command, curKeybind); + + if (this.isCustomCommand(curKeybind.command)) { + this.registerKeybinding("app", "custom", curKeybind.command, null); + } } } catch (e) { let userError = `${curUserCommand} is invalid: error: ${e}`; @@ -129,6 +133,14 @@ class KeybindManager { this.keyDescriptionsMap = newKeyDescriptions; } + isCustomCommand(keyDescription: string): boolean { + let words = keyDescription.split(":"); + if (words.length >= 2 && words[0] == "custom") { + return true; + } + return false; + } + prettyPrintKeyPress(keyPress: KeyPressDecl): string { let returnString = ""; if (keyPress.mods.Cmd) {