From 800a8c34a186fa46f2224e027c68222970225e55 Mon Sep 17 00:00:00 2001 From: Bruno Charest Date: Tue, 2 Jun 2026 14:01:35 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20raccourcis=20palette=20=E2=80=94=20Ctrl+?= =?UTF-8?q?Shift+Espace=20fichiers,=20Ctrl+Alt+Espace=20commandes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/js/palette.js | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) 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