Use Cmd+K for quick actions on macOS instead of Ctrl+K (#1837)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kolaente <13721712+kolaente@users.noreply.github.com>
This commit is contained in:
Copilot 2025-11-17 22:56:54 +00:00 committed by GitHub
parent 0b0928e273
commit 6b0a05b5ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -3,6 +3,7 @@ import BaseButton from '@/components/base/BaseButton.vue'
import {useBaseStore} from '@/stores/base'
import {onBeforeUnmount, onMounted} from 'vue'
import {eventToHotkeyString} from '@github/hotkey'
import {isAppleDevice} from '@/helpers/isAppleDevice'
const baseStore = useBaseStore()
@ -10,7 +11,11 @@ const baseStore = useBaseStore()
function openQuickActionsViaHotkey(event) {
const hotkeyString = eventToHotkeyString(event)
if (!hotkeyString) return
if (hotkeyString !== 'Control+k' && hotkeyString !== 'Meta+k') return
// On macOS, use Cmd+K (Meta+K), on other platforms use Ctrl+K (Control+K)
const expectedHotkey = isAppleDevice() ? 'Meta+k' : 'Control+k'
if (hotkeyString !== expectedHotkey) return
event.preventDefault()
openQuickActions()