feat: option to show markdown preview for super notes (skip e2e) (#2048)
This commit is contained in:
@@ -165,6 +165,22 @@ export class KeyboardService {
|
||||
}
|
||||
}
|
||||
|
||||
public triggerCommand(command: KeyboardCommand): void {
|
||||
for (const observer of this.commandHandlers) {
|
||||
if (observer.command !== command) {
|
||||
continue
|
||||
}
|
||||
|
||||
const callback = observer.onKeyDown || observer.onKeyUp
|
||||
if (callback) {
|
||||
const exclusive = callback(new KeyboardEvent('command-trigger'))
|
||||
if (exclusive) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
registerShortcut(shortcut: KeyboardShortcut): void {
|
||||
this.commandMap.set(shortcut.command, shortcut)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user