]> git.donarmstrong.com Git - qmk_firmware.git/blob - docs/quantum_keycodes.md
convert to unix line-endings [skip ci]
[qmk_firmware.git] / docs / quantum_keycodes.md
1 # Quantum Keycodes
2
3 Quantum keycodes allow for easier customisation of your keymap than the basic ones provide, without having to define custom actions.
4
5 All 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. 
6
7 On 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.
8
9 ## QMK keycodes
10
11 |Name|Description|
12 |----|-----------|
13 |`RESET`|Put the keyboard into DFU mode for flashing|
14 |`DEBUG`|Toggles debug mode|
15 |`KC_GESC`/`GRAVE_ESC`|Acts as escape when pressed normally but when pressed with Shift or GUI will send a ```|
16 |`KC_LSPO`|Left shift when held, open paranthesis when tapped|
17 |`KC_RSPC`|Right shift when held, close paranthesis when tapped|
18 |`KC_LEAD`|The [leader key](feature_leader_key.md)|
19 |`KC_LOCK`|The [lock key](feature_key_lock.md)|
20 |`FUNC(n)`/`F(n)`|Call `fn_action(n)` (deprecated)|
21 |`M(n)`|to call macro n|
22 |`MACROTAP(n)`|to macro-tap n idk FIXME|