reference_key_names.md
May 15, 2026 ยท View on GitHub
Key names
All keys and modifiers are case-insensitive. And the KEY_ prefix is optional, though the BTN_ prefix is required.
Ordinary keys
Aliases for left and right modifiers, special to xremap
CONTROL_L,CTRL_L,C_LSHIFT_L,S_LALT_L,A_L,M_LSUPER_L,WINDOWS_L,WIN_L,W_L
The original keys are named: KEY_LEFTCTRL, KEY_LEFTSHIFT, KEY_LEFTALT and KEY_LEFTMETA.
Numpad keys are named like
KEY_KP1,KEY_KPDOT,KEY_KPASTERISK
Some special keys
KEY_ESCcan't be replaced withKEY_ESCAPE.KEY_LEFTMETAmeans the left windows key (aka super key).KEY_102NDcan be the key placed near the bottom left of the keyboard.- The print key can have the name
KEY_SYSRQ, even thoughKEY_PRINTalso exists. KEY_SCROLLUPetc. does likely nothing. See below for scroll functionality.BTN_TRIGGER_HAPPY1..BTN_TRIGGER_HAPPY40can be used asvirtual keys, that can be emitted frommodmapand remapped inkeymap. Because they likely has no effect if emitted from xremap.
Modifiers
When a key combo like: Ctrl-a is specified it will match both left and right modifiers. It's the
same as specifying: Both Ctrl_L-a and Ctrl_R-a.
CONTROL,CTRL,CSHIFT,SALT,A,MSUPER,WINDOWS,WIN,W
Numbers
Numbers must be given with quotation marks, when used like this:
keymap:
- remap:
Capslock: "1"
Other positions don't need quotation: like 1: A, or Capslock: C-1
Mouse buttons
Mouse buttons have the prefix: BTN_, which is not optional.
E.g. BTN_LEFT, BTN_RIGHT, BTN_MIDDLE.
Scroll
Some special keys exist: XRIGHTSCROLL, XLEFTSCROLL, XUPSCROLL, XDOWNSCROLL, they
match the when a mouse scrolls. But they cannot be emitted from xremap.
Mouse move
Keys for mouse movement are named: XRIGHTCURSOR, XLEFTCURSOR, XDOWNCURSOR and XUPCURSOR.
Unknown keys
Keys that don't have names can be identified by their key code, e.g. Code_123.