Physical Key Mapping via KeyboardEvent.code
W3C UI Events CodeUnlike event.key which changes with Caps Lock, Shift, or international input layouts, KeyboardEvent.code maps directly to the physical switch position on ANSI 104-key and Tenkeyless (TKL) boards—even distinguishing ShiftLeft from ShiftRight and AltLeft from AltRight.