properly display Space in hotkeys (fixes #76)

This commit is contained in:
Eugene Pankov 2017-07-06 10:28:33 +02:00
parent dc9b2553ae
commit 8ee93297be
2 changed files with 4 additions and 1 deletions

View file

@ -45,7 +45,9 @@ export function stringifyKeySequence (events: NativeKeyEvent[]): string[] {
// TODO make this optional?
continue
}
if (event.key.length === 1) {
if (event.key === ' ') {
itemKeys.push('Space')
} else if (event.key.length === 1) {
itemKeys.push(event.key.toUpperCase())
} else {
itemKeys.push(event.key)

View file

@ -73,6 +73,7 @@ export class HotkeyInputModalComponent {
}
ngOnDestroy () {
this.hotkeys.clearCurrentKeystrokes()
this.hotkeys.enable()
clearInterval(this.keyTimeoutInterval)
}