Create global keyboard shortcut handler (#10145)

This commit is contained in:
DS Boyce
2026-04-03 10:06:51 -07:00
committed by GitHub
parent e0ea778e58
commit cca3326b21
16 changed files with 257 additions and 182 deletions
+8
View File
@@ -45,3 +45,11 @@ export function listenPostCreated(fn: () => void): UnlistenFn {
emitter.on('post-created', fn)
return () => emitter.off('post-created', fn)
}
export function emitFocusSearch() {
emitter.emit('focus-search')
}
export function listenFocusSearch(fn: () => void): UnlistenFn {
emitter.on('focus-search', fn)
return () => emitter.off('focus-search', fn)
}