refactor(shortcuts): simplify chord display and clean up capture UI

This commit is contained in:
Mohamed Boudra
2026-03-22 17:44:49 +07:00
parent 57f8c7615c
commit cc80d05e49
5 changed files with 41 additions and 21 deletions
@@ -125,11 +125,6 @@ export function KeyboardShortcutsSection() {
event.stopPropagation();
const key = event.key ?? "";
if (key === "Escape") {
cancelCapture();
return;
}
if (key === "Backspace") {
setCapturedCombos((current) => (current.length > 0 ? current.slice(0, -1) : current));
return;
@@ -147,7 +142,7 @@ export function KeyboardShortcutsSection() {
return () => {
window.removeEventListener("keydown", handleKeyDown, true);
};
}, [cancelCapture, capturingBindingId]);
}, [capturingBindingId]);
useEffect(() => {
return () => {