Skip to main content
WWindows
LLinux
AAndroid
mmacOS
iiOS

Modifiers#

Modifiers are the special keyboard keys: shift, alt, control & GUI.

Modifiers can be used in two forms within ZMK:

  • Modifier Keys โ†’ LEFT_SHIFT
  • Modifier Functions โ†’ LS(code)
NamesDescriptionWLAmi
LEFT_SHIFT
LSHIFT
LSHFT
LS(code)
Left Shift โ‡งโญโญโญโญโญ
RIGHT_SHIFT
RSHIFT
RSHFT
RS(code)
Right Shift โ‡งโญโญโญโญโญ
LEFT_CONTROL
LCTRL
LC(code)
Left Controlโญโญโญโญโญ
RIGHT_CONTROL
RCTRL
RC(code)
Right Controlโญโญโญโญโญ
LEFT_ALT
LALT
LA(code)
Left Altโญโญโญโญโญ
RIGHT_ALT
RALT
RA(code)
Right Altโญโญโญโญโญ
LEFT_GUI
LGUI
LG(code)
LEFT_WIN
LWIN
LEFT_COMMAND
LCMD
LEFT_META
LMETA
Left GUI (Windows / Command / Meta)โญโญโญโญโญ
RIGHT_GUI
RGUI
RG(code)
RIGHT_WIN
RWIN
RIGHT_COMMAND
RCMD
RIGHT_META
RMETA
Right GUI (Windows / Command / Meta)โญโญโญโญโญ

Modifier Keys#

These act like any other key code.

  • e.g. &kp LEFT_GUI pushes and releases the left GUI key.

Modifier Functions#

Modifier functions add one or more modifiers to a code.

These functions take the form: XX(code)

  • Modifier functions apply a modifier to a code:
    • &kp LS(A) = LEFT_SHIFT+A (a capitalized A).
  • They can be combined:
    • &kp LC(RA(B)) = LEFT_CONTROL+RIGHT_ALT+B
  • Some basic codes already include a modifier function in their definition:
    • DOLLAR = LS(NUMBER_4)
  • There are left- and right-handed versions of each modifier (also see table above):
    • LS(x), LC(x), LA(x), LG(x), RS(x), RC(x), RA(x), RG(x)
  • Modified keys can safely be rolled-over. Modifier functions are released when another key is pressed.
    • Press &kp LS(A), then press &kp B, release &kp LS(A) and release &kp B results in Ab. Only the A is capitalized.