Skip to content

Commit 66eaa02

Browse files
echobtfactorydroid
andauthored
fix(gui): prevent AccessibilityHelp dialog from interfering with typing '?' (#322)
The keyboard shortcut Ctrl+Shift+? for opening the accessibility help dialog was potentially interfering with typing '?' on some keyboard layouts. Added explicit checks for !e.altKey and !e.metaKey to ensure only the exact key combination Ctrl+Shift+? triggers the dialog, not any variant that might occur on different keyboard layouts. Co-authored-by: Droid Agent <droid@factory.ai>
1 parent 3aed5ae commit 66eaa02

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

cortex-gui/src/components/AccessibilityHelp.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,10 @@ export function AccessibilityHelp() {
267267
return;
268268
}
269269

270-
// Ctrl+Shift+? to open
271-
if (e.ctrlKey && e.shiftKey && e.key === "?") {
270+
// Ctrl+Shift+? to open (require ONLY Ctrl+Shift, not Alt or Meta)
271+
// Note: We explicitly check for ctrlKey to avoid interfering with typing "?"
272+
// which only requires Shift on most keyboard layouts
273+
if (e.ctrlKey && e.shiftKey && !e.altKey && !e.metaKey && e.key === "?") {
272274
e.preventDefault();
273275
setIsOpen(true);
274276
return;

0 commit comments

Comments
 (0)