1
0

feat(task): save currently opened task with control/meta + s

This commit is contained in:
kolaente
2023-10-11 17:44:17 +02:00
parent 40538df392
commit f0b340a9c7
4 changed files with 27 additions and 4 deletions

View File

@ -5,13 +5,12 @@ import {onBeforeUnmount, onMounted} from 'vue'
import {eventToHotkeyString} from '@github/hotkey'
const baseStore = useBaseStore()
const GLOBAL_HOTKEY = 'Control+k'
// See https://github.com/github/hotkey/discussions/85#discussioncomment-5214660
function openQuickActionsViaHotkey(event) {
const hotkeyString = eventToHotkeyString(event)
if (!hotkeyString) return
if (hotkeyString !== GLOBAL_HOTKEY) return
if (hotkeyString !== 'Control+k' && hotkeyString !== 'Meta+k') return
event.preventDefault()
openQuickActions()

View File

@ -152,6 +152,10 @@ export const KEYBOARD_SHORTCUTS : ShortcutGroup[] = [
title: 'keyboardShortcuts.task.favorite',
keys: ['s'],
},
{
title: 'keyboardShortcuts.task.save',
keys: [ctrl, 's'],
},
],
},
]