feat(keybinding): several shortcuts per action, mouse buttons, searchable picker
Shortcuts were defined in four places that drifted apart: per-action IPC channel pairs, a hand-written VK table in the service, a second one in the renderer, and three copies of the keycap styling. Adding an action meant editing all of them, so two shortcuts stayed hardcoded in bootstrap and one had no settings entry at all. packages/core/src/keybinding.ts is now the single source for the binding type, the selectable key catalog, the action catalog, normalization, validation, conflict detection, display labels, search and deserialization. Main, preload and renderer all read from it; nothing redefines keys or rules locally. - Each action holds a list of bindings instead of one. AppConfig's four *Shortcut fields collapse into a single keyBindings map, migrated on launch. - Mouse buttons can be bound. Left click is refused, right/middle need a modifier, side buttons are free. uiohook cannot swallow events, so the original click still fires and the UI says so. - Keys can be picked from a grouped dropdown with a search box, not only by recording a keypress. - HOTKEY's 14 channels become KEYBINDING's 9, taking the action as a parameter, so actions no longer multiply channels. The history and command popups moved out of bootstrap into ordinary actions. - displayLabel is gone; labels derive from the binding and follow the app language and platform. Fixes found on the way: - Double-press hands-free was unreachable: lookup returned only the first matching action, and dictation shares its default binding. - Reserved-combination checks compared joined key names, so a different modifier order let Ctrl+C through. - Disabling shortcuts released every global registration in the process, including the popup ones, and never restored them. - Enabling shortcuts after starting disabled left nothing registered. - The dashboard stored the caption event payload instead of the state in it.
This commit is contained in:
parent
0ca9e242fa
commit
4ad1ae6ed4
49 changed files with 5901 additions and 1792 deletions
|
|
@ -270,5 +270,60 @@
|
|||
"mobile.works.historyDescription": "Recherchez et gérez les transcriptions des enregistrements et importations.",
|
||||
"mobile.meetings.templateEmpty": "Aucun modèle de document de réunion disponible. Vous pouvez démarrer la réunion sans modèle.",
|
||||
"mobile.meetings.templateNone": "Démarrer sans modèle",
|
||||
"mobile.meetings.templateNoneDesc": "Choisissez un modèle lors de la génération de documents"
|
||||
"mobile.meetings.templateNoneDesc": "Choisissez un modèle lors de la génération de documents",
|
||||
"keybinding.mouse.left": "Bouton gauche de la souris",
|
||||
"keybinding.mouse.right": "Bouton droit de la souris",
|
||||
"keybinding.mouse.middle": "Bouton du milieu de la souris",
|
||||
"keybinding.mouse.back": "Bouton Précédent de la souris",
|
||||
"keybinding.mouse.forward": "Bouton Suivant de la souris",
|
||||
"keybinding.group.mouse": "Souris",
|
||||
"keybinding.group.modifier": "Touches de modification",
|
||||
"keybinding.group.function": "Touches de fonction",
|
||||
"keybinding.group.letter": "Lettres",
|
||||
"keybinding.group.digit": "Chiffres",
|
||||
"keybinding.group.numpad": "Pavé numérique",
|
||||
"keybinding.group.navigation": "Navigation",
|
||||
"keybinding.group.editing": "Édition",
|
||||
"keybinding.group.punctuation": "Symboles",
|
||||
"keybinding.group.system": "Système",
|
||||
"keybinding.action.dictation": "Dictée",
|
||||
"keybinding.action.dictation.desc": "Enregistre tant que la touche est maintenue.",
|
||||
"keybinding.action.handsFree": "Mode une touche",
|
||||
"keybinding.action.handsFree.desc": "Appuyez deux fois pour activer ou désactiver.",
|
||||
"keybinding.action.command": "Commandes vocales",
|
||||
"keybinding.action.command.desc": "Exécute une commande à la voix.",
|
||||
"keybinding.action.caption": "Sous-titres en direct",
|
||||
"keybinding.action.caption.desc": "Active ou désactive les sous-titres en direct.",
|
||||
"keybinding.action.historyPopup": "Fenêtre d'historique",
|
||||
"keybinding.action.historyPopup.desc": "Ouvre la fenêtre contextuelle de l'historique.",
|
||||
"keybinding.action.commandPopup": "Fenêtre de commandes",
|
||||
"keybinding.action.commandPopup.desc": "Ouvre la fenêtre contextuelle des commandes.",
|
||||
"keybinding.reject.unknownKey": "Cette touche n'est pas prise en charge",
|
||||
"keybinding.reject.systemReserved": "Il s'agit d'un raccourci réservé au système",
|
||||
"keybinding.reject.modifierRequired": "Doit être combinée avec une touche de modification (Ctrl/Alt/Maj)",
|
||||
"keybinding.disabled.mouseLeft": "Le clic gauche sert à toutes les interactions à l'écran, il ne peut pas être affecté",
|
||||
"keybinding.warning.mousePassthrough": "Les boutons de la souris conservent aussi leur action d'origine",
|
||||
"keybinding.ui.add": "Ajouter",
|
||||
"keybinding.ui.remove": "Supprimer",
|
||||
"keybinding.ui.reset": "Valeurs par défaut",
|
||||
"keybinding.ui.tabRecord": "Appuyer sur une touche",
|
||||
"keybinding.ui.tabList": "Choisir dans la liste",
|
||||
"keybinding.ui.search": "Rechercher une touche",
|
||||
"keybinding.ui.searchEmpty": "Aucun résultat",
|
||||
"keybinding.ui.pressKeys": "Appuyez sur la touche ou le bouton de souris souhaité",
|
||||
"keybinding.ui.noBindings": "Aucun raccourci défini",
|
||||
"keybinding.ui.conflictWith": "En conflit avec {{action}}",
|
||||
"keybinding.ui.modifiers": "Touches de modification",
|
||||
"keybinding.ui.selectedKey": "Touche sélectionnée",
|
||||
"keybinding.ui.sectionVoice": "Voix",
|
||||
"keybinding.ui.sectionWindow": "Fenêtres / Pop-ups",
|
||||
"keybinding.ui.duplicate": "Ce raccourci est déjà ajouté",
|
||||
"keybinding.ui.holdMode": "Maintien",
|
||||
"keybinding.ui.doublePress": "Double appui",
|
||||
"keybinding.ui.pickerTitle": "Configurer le raccourci",
|
||||
"keybinding.ui.pressToRecord": "Appuyez pour commencer l'enregistrement",
|
||||
"keybinding.ui.recordHint": "Saisissez une combinaison (ex : Ctrl+Shift+Q) ou une touche seule (ex : F5)",
|
||||
"keybinding.ui.recordAgain": "Ressaisir",
|
||||
"keybinding.ui.saveFailed": "Le raccourci n'a pas pu être enregistré",
|
||||
"keybinding.ui.globalEnabled": "Activer les raccourcis globaux"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue