more hotkey fixes

This commit is contained in:
Eugene Pankov
2021-08-06 09:52:34 +02:00
parent 08f1ad4c75
commit eadd8d563e
2 changed files with 10 additions and 6 deletions

View File

@@ -48,12 +48,14 @@ export class HotkeyInputModalComponent extends BaseComponent {
) {
super()
this.hotkeys.clearCurrentKeystrokes()
this.subscribeUntilDestroyed(hotkeys.keystroke$, (keystroke) => {
this.lastKeyEvent = performance.now()
this.value.push(keystroke)
this.subscribeUntilDestroyed(hotkeys.keyEvent$, event => {
event.preventDefault()
event.stopPropagation()
})
this.subscribeUntilDestroyed(hotkeys.keystroke$, keystroke => {
this.lastKeyEvent = performance.now()
this.value.push(keystroke)
})
}
splitKeys (keys: string): string[] {