feat(hotkeys): chaque raccourci se desactive (Suppr pendant la capture)
Off = vk 0, non enregistre : la combinaison reste libre pour les autres applis. Combinaisons retenues en pref DPAPI et rejouees au demarrage, pour qu'un raccourci coupe le reste coffre ferme. Esc annule enfin la capture au lieu de fermer les reglages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+4
-1
@@ -51,7 +51,7 @@ function renderHotkeyConflicts() {
|
||||
|
||||
// Format a combo for human display: "Ctrl+Shift+L".
|
||||
function autofillComboLabel(c) {
|
||||
if (!c || !c.key) return '— not set —';
|
||||
if (!c || !c.key) return 'Off';
|
||||
const parts = [];
|
||||
if (c.ctrl) parts.push('Ctrl');
|
||||
if (c.alt) parts.push('Alt');
|
||||
@@ -92,6 +92,9 @@ function autofillComboValid(c) {
|
||||
function autofillCaptureFromEvent(e) {
|
||||
const k = e.key;
|
||||
if (k === 'Escape') return 'cancel';
|
||||
// Suppr / Retour arriere pendant la capture = raccourci DESACTIVE : il
|
||||
// n'est plus enregistre, la combinaison reste libre pour une autre appli.
|
||||
if (k === 'Delete' || k === 'Backspace') return 'off';
|
||||
// Ignore pure-modifier keydowns (user is still building the combo).
|
||||
if (k === 'Control' || k === 'Shift' || k === 'Alt' ||
|
||||
k === 'Meta' || k === 'OS') return null;
|
||||
|
||||
Reference in New Issue
Block a user