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. Keycodes above `0x00FF` may not be used with any of the mod/layer-tap keys listed
-# Quantum keycodes
+## QMK keycodes
|Name|Description|
|----|-----------|
|`M(n)`|to call macro n|
|`MACROTAP(n)`|to macro-tap n idk FIXME|
-# Bootmagic Keycodes
+## Bootmagic Keycodes
Shortcuts for bootmagic options (these work even when bootmagic is off.)
|`MAGIC_UNSWAP_ALT_GUI`/`AG_NORM`|Disable the Alt/GUI switching|
|`MAGIC_TOGGLE_NKRO`|Turn NKRO on or off|
-# Audio
+<!-- FIXME: this formatting needs work
+
+## Audio
```c
#ifdef AUDIO_ENABLE
#endif
```
-## Midi
+### Midi
#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
MI_ON, // send midi notes when music mode is enabled
MI_MODSU, // increase modulation speed
#endif // MIDI_ADVANCED
-# Backlight
+-->
+
+## Backlight
These keycodes control the backlight. Most keyboards use this for single color in-switch lighting.
|`BL_TOGG`|Toggle the backlight on or off|
|`BL_STEP`|Step through backlight levels, wrapping around to 0 when you reach the top.|
-# RGBLIGHT WS2818 LEDs
+## RGBLIGHT WS2818 LEDs
This controls the `RGBLIGHT` functionality. Most keyboards use WS2812 (and compatible) LEDs for underlight or case lighting.
|`OUT_USB`|usb only|
|`OUT_BT`|bluetooth (when `BLUETOOTH_ENABLE`)|
-# Modifiers
+## Modifiers
These are special keycodes that simulate pressing several modifiers at once.
* |`KC_LCA`|`LCTL` + `LALT`|
*/
-## Modifiers with keys
+### Modifiers with keys
|Name|Description|
|----|-----------|
|`SCMD(kc)`/`SWIN(kc)`|`LGUI` + `LSFT` + `kc`|
|`LCA(kc)`|`LCTL` + `LALT` + `kc`|
-## One Shot Keys
+### One Shot Keys
Most modifiers work by being held down while you push another key. You can use `OSM()` to setup a "One Shot" modifier. When you tap a one shot mod it will remain is a pressed state until you press another key.
|`OSM(mod)`|use mod for one keypress|
|`OSL(layer)`|switch to layer for one keypress|
-## Mod-tap keys
+### Mod-tap keys
These keycodes will press the mod(s) when held, and the key when tapped. They only work with [basic keycodes](basic_keycodes.md).
|`SCMD_T(kc)`/`SWIN_T(kc)`|`LGUI` + `LSFT` when held, `kc` when tapped|
|`LCA_T(kc)`|`LCTL` + `LALT` when held, `kc` when tapped|
-# US ANSI Shifted symbols
+## US ANSI Shifted symbols
These keycodes correspond to characters that are "shifted" on a standard US ANSI keyboards. They do not have dedicated keycodes but are instead typed by holding down shift and then sending a keycode.
|`KC_QUES`|`KC_QUESTION`|question mark `?`|
|`KC_DQT`/`KC_DQUO`|`KC_DOUBLE_QUOTE`|double quote `"`|
-# Layer Changes
+## Layer Changes
These are keycodes that can be used to change the current layer.
|`TT(layer)`|tap toggle? idk FIXME|
|`OSL(layer)`|switch to layer for one keycode|
-# Unicode
+## Unicode
These keycodes can be used in conjuction with the [Unicode](unicode_and_additional_language_support.md) support.