diff --git a/frontend/js/palette.js b/frontend/js/palette.js index bff1b7e..cc8f504 100644 --- a/frontend/js/palette.js +++ b/frontend/js/palette.js @@ -41,12 +41,13 @@ function createDOM() {
- Alt+P + Ctrl+Shift+Espace
@@ -265,23 +266,15 @@ function escapeHtml(str) { // ── Init: Register global keyboard shortcut ── export function initCommandPalette() { document.addEventListener('keydown', (e) => { - // Alt+P — open palette (Alt+Shift+P for command mode) - if (e.altKey && !e.ctrlKey && !e.metaKey && e.key === 'p') { + // Ctrl+Shift+Espace — open file palette + if ((e.ctrlKey || e.metaKey) && e.shiftKey && !e.altKey && (e.key === ' ' || e.code === 'Space')) { e.preventDefault(); - if (isOpen()) { - close(); - } else { - open(''); - } + if (isOpen()) { close(); } else { open(''); } } - // Alt+Shift+P — open in command mode - if (e.altKey && e.shiftKey && !e.ctrlKey && !e.metaKey && e.key === 'p') { + // Ctrl+Alt+Espace — open command palette + if ((e.ctrlKey || e.metaKey) && e.altKey && !e.shiftKey && (e.key === ' ' || e.code === 'Space')) { e.preventDefault(); - if (isOpen()) { - close(); - } else { - open('> '); - } + if (isOpen()) { close(); } else { open('> '); } } }); } \ No newline at end of file