fix(command): alternative to cmd+/ (#414)
This commit is contained in:
parent
f99bbeb362
commit
9db04467d9
@ -11,8 +11,16 @@ import {
|
||||
const isMac = useIsMac()
|
||||
|
||||
// TODO: temporary, await for keybind system
|
||||
// open search panel
|
||||
// listen to ctrl+k on windows/linux or cmd+k on mac
|
||||
// open command panel
|
||||
// listen to ctrl+/ on windows/linux or cmd+/ on mac
|
||||
// or shift+ctrl+k on windows/linux or shift+cmd+k on mac
|
||||
useEventListener('keydown', (e: KeyboardEvent) => {
|
||||
if (e.key === 'k' && (isMac.value ? e.metaKey : e.ctrlKey)) {
|
||||
e.preventDefault()
|
||||
openCommandPanel(e.shiftKey)
|
||||
}
|
||||
if (e.key === '/' && (isMac.value ? e.metaKey : e.ctrlKey)) {
|
||||
e.preventDefault()
|
||||
openCommandPanel(true)
|
||||
|
Loading…
Reference in New Issue
Block a user