The legend is not the event.
Marcin Wichary's platform comparison starts with names that already disagree. Windows calls one key Backspace. Apple calls that key Delete. Windows shortcut labels usually join keys with a plus sign. macOS menus usually place modifier symbols beside the final key.[1]
The disagreement reaches past labels. macOS Option combinations can produce characters. Windows layouts can use AltGr for letters and punctuation. Some Windows layouts also expose AltGr through Ctrl plus Alt. A shortcut that looks free on a US keyboard can take a character away from another layout.
Store the action once. Render and test its keys per platform and input context.
The browser reports meaning after layout.
MDN documents KeyboardEvent.key as the value after modifier state, locale, and keyboard layout are considered. A printable key returns the resulting character. A dead key reports Dead. The same physical press can therefore produce a different value on a different layout.[2]
Use key when the action follows the character the user typed. Use the physical position only when the product truly needs that position, such as a game control. Do not turn every keydown into a command. Text fields, composition, repeated keys, and assistive technology still own parts of the route.
Focus is part of the shortcut.
The W3C ARIA Authoring Practices Guide says every interactive element must work from a keyboard. It also asks authors to keep focus visible and predictable. Its conflict guidance warns about operating-system, assistive-technology, and browser commands.[3]
That makes context a first-class input. A global command, editor command, and text-field command do not share one safe keyspace. The visible menu route matters too. If the shortcut collides or cannot be discovered, the user still needs a button, menu item, or command palette entry.
Test the contract, not the label.
Write the action name before the key chord. Record the target platforms and keyboard layouts. Exercise the chord with focus on the page, in the editor, and inside a text field. Check the operating system, browser, and assistive-technology conflicts that apply to the product.
Then inspect the fallback with the keyboard. The focus ring must stay visible. The action must announce a result. A rejected shortcut must leave typed text and composition intact.