Extend maximum number of backlight levels to 31 (#6351)
[jackhill/qmk/firmware.git] / docs / quantum_keycodes.md
CommitLineData
d5244c6c
JH
1# Quantum Keycodes
2
c6184d2e 3Quantum keycodes allow for easier customization of your keymap than the basic ones provide, without having to define custom actions.
9b879b12 4
bb53635f 5All keycodes within quantum are numbers between `0x0000` and `0xFFFF`. Within your `keymap.c` it may look like you have functions and other special cases, but ultimately the C preprocessor will translate those into a single 4 byte integer. QMK has reserved `0x0000` through `0x00FF` for standard keycodes. These are keycodes such as `KC_A`, `KC_1`, and `KC_LCTL`, which are basic keys defined in the USB HID specification.
910d32c0 6
9b879b12 7On this page we have documented keycodes between `0x00FF` and `0xFFFF` which are used to implement advanced quantum features. If you define your own custom keycodes they will be put into this range as well.
910d32c0 8
7b0356d1 9## QMK Keycodes
910d32c0 10
6e44f94f
DJ
11|Key |Aliases |Description |
12|---------------|-----------|---------------------------------------------------------------------|
13|`RESET` | |Put the keyboard into DFU mode for flashing |
14|`DEBUG` | |Toggle debug mode |
15|`EEPROM_RESET` |`EEP_RST` |Resets EEPROM state by reinitializing it |
16|`KC_GESC` |`GRAVE_ESC`|Escape when tapped, <code>&#96;</code> when pressed with Shift or GUI|
17|`KC_LSPO` | |Left Shift when held, `(` when tapped |
18|`KC_RSPC` | |Right Shift when held, `)` when tapped |
c6184d2e
X
19|`KC_LCPO` | |Left Control when held, `(` when tapped |
20|`KC_RCPC` | |Right Control when held, `)` when tapped |
21|`KC_LAPO` | |Left Alt when held, `(` when tapped |
22|`KC_RAPC` | |Right Alt when held, `)` when tapped |
23|`KC_SFTENT` | |Right Shift when held, Enter when tapped |
6e44f94f
DJ
24|`KC_LEAD` | |The [Leader key](feature_leader_key.md) |
25|`KC_LOCK` | |The [Lock key](feature_key_lock.md) |
26|`FUNC(n)` |`F(n)` |Call `fn_action(n)` (deprecated) |
27|`M(n)` | |Call macro `n` |
28|`MACROTAP(n)` | |Macro-tap `n` idk FIXME |