Character key shortcuts

A shortcut fired by one letter, number, or symbol, which can accidentally hijack typing, voice input, or screen reader commands.

single letter shortcutstyping triggers random commandsvoice control keeps activating buttonsthe page steals my keyboardpressing s opened a search box by itselfhow do I turn off single letter shortcutsdictation sets off buttons on the pagecharactor key shortcuts

See it

Live demo coming soon

What it is

Character key shortcuts are commands triggered by one printable key, such as pressing S to save or ? for help, with no Ctrl, Alt, Command, or other non-character key. They are fast for some power users but dangerous for speech input users, whose dictated words can generate those keystrokes, and for screen reader users whose own single-key navigation commands may collide with the page. Gmail's c to compose and j and k to move between threads are the classic set; GitHub shipped the canonical remedy, an account setting that turns character key shortcuts off entirely.

WCAG 2.1.4 allows a shortcut made only from letters, numbers, punctuation, or symbols when users can turn it off, remap it to include a non-printable modifier or key, or when it works only while the relevant control has focus. That makes focused controls, configurable shortcuts, and familiar modifier combinations safer choices than document-wide letter listeners.

Gotcha: ignoring events in input elements is necessary but not sufficient. Textareas, select elements, and contenteditable regions also accept character input, and a screen reader can be in a mode where letters never reach the page. Do not advertise a bare key as the only way to perform an action; every command still needs an operable control.

Ask AI for it

Fix every document-wide single-character shortcut to meet WCAG 2.1.4 Character Key Shortcuts. Find KeyboardEvent listeners that act on KeyboardEvent.key without Ctrl, Alt, Meta, or another non-character key. For each one, either remove it, require a configurable modifier, or limit it to the focused widget that owns the command. Never fire while the event target is an input, textarea, select, or contenteditable element. Add a keyboard-shortcuts settings panel where users can disable or remap remaining bare-key commands, persist that choice, and expose a visible button for every action. Test dictated text, ordinary typing, screen reader browse mode, and focus inside and outside each widget.

You might have meant

keyboard navigationassistive technologyscreen readerfocus management

Go deeper