e87c39d3 |
1 | # Command (Formerly known as Magic) |
2 | |
3 | Command is a way to change your keyboard's behavior without having to flash or unplug it to use [Bootmagic](feature_bootmagic.md). There is a lot of overlap between this functionality and the [Bootmagic Keycodes](feature_bootmagic.md). Whenever possible we encourage you to use that functionality instead of Command. |
4 | |
5 | ## Enabling Command |
6 | |
7 | By default Command is disabled. You can enable it in your `rules.mk` file: |
8 | |
9 | COMMAND_ENABLE = yes |
10 | |
11 | ## Usage |
12 | |
13 | To use Command you hold down the key combination defined by `IS_COMMAND`. By default that combination is both shift keys. While holding the key combination press the key corresponding to the command you want. |
14 | |
15 | For example, to write the current QMK version to the QMK Toolbox console, you can press `Left Shift`+`Right Shift`+`V`. |
16 | |
17 | ## Configuration |
18 | |
19 | The following values can be defined in `config.h` to control the behavior of Command. |
20 | |
21 | |Define |Default | Description | |
22 | |-------|--------|-------------| |
23 | |`IS_COMMAND()` |`(keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))`|Key combination to activate Command| |
24 | |`MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS` |`true` |Do layer switching with Function row| |
25 | |`MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS` |`true` |Do layer switching with number keys.| |
26 | |`MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM`|`false` |Do layer switching with custom keys (`MAGIC_KEY_LAYER0..9` below.)| |
27 | |`MAGIC_KEY_HELP1` |`H` |Show help.| |
28 | |`MAGIC_KEY_HELP2` |`SLASH` |Show help.| |
29 | |`MAGIC_KEY_DEBUG` |`D` |Turn on debug mode.| |
30 | |`MAGIC_KEY_DEBUG_MATRIX` |`X` |Turn on matrix debugging.| |
31 | |`MAGIC_KEY_DEBUG_KBD` |`K` |Turn on keyboard debugging.| |
32 | |`MAGIC_KEY_DEBUG_MOUSE` |`M` |Turn on mouse debugging.| |
33 | |`MAGIC_KEY_VERSION` |`V` |Write the QMK version to the console| |
34 | |`MAGIC_KEY_STATUS` |`S` |Show the current keyboard status| |
35 | |`MAGIC_KEY_CONSOLE` |`C` |Enable the Command Console| |
36 | |`MAGIC_KEY_LAYER0_ALT1` |`ESC` |Alternate access to layer 0| |
37 | |`MAGIC_KEY_LAYER0_ALT2` |`GRAVE` |Alternate access to layer 0| |
38 | |`MAGIC_KEY_LAYER0` |`0` |Change default layer to 0| |
39 | |`MAGIC_KEY_LAYER1` |`1` |Change default layer to 1| |
40 | |`MAGIC_KEY_LAYER2` |`2` |Change default layer to 2| |
41 | |`MAGIC_KEY_LAYER3` |`3` |Change default layer to 3| |
42 | |`MAGIC_KEY_LAYER4` |`4` |Change default layer to 4| |
43 | |`MAGIC_KEY_LAYER5` |`5` |Change default layer to 5| |
44 | |`MAGIC_KEY_LAYER6` |`6` |Change default layer to 6| |
45 | |`MAGIC_KEY_LAYER7` |`7` |Change default layer to 7| |
46 | |`MAGIC_KEY_LAYER8` |`8` |Change default layer to 8| |
47 | |`MAGIC_KEY_LAYER9` |`9` |Change default layer to 9| |
48 | |`MAGIC_KEY_BOOTLOADER` |`PAUSE` |Exit keyboard and enter bootloader| |
49 | |`MAGIC_KEY_LOCK` |`CAPS` |Lock the keyboard so nothing can be typed| |
50 | |`MAGIC_KEY_EEPROM` |`E` |Erase EEPROM settings| |
51 | |`MAGIC_KEY_NKRO` |`N` |Toggle NKRO on/off| |
52 | |`MAGIC_KEY_SLEEP_LED` |`Z` |Toggle LED when computer is sleeping on/off| |