Skip to content

Command

Command, formerly known as Magic, is a way to change your keyboard's behavior without having to flash or unplug it to use Bootmagic Lite. There is a lot of overlap between this functionality and the Magic Keycodes. Wherever possible we encourage you to use that feature instead of Command.

On some keyboards Command is disabled by default. If this is the case, it must be explicitly enabled in your rules.mk:

make
COMMAND_ENABLE = yes

Usage

To use Command, hold down the key combination defined by the IS_COMMAND() macro. By default this is Left Shift+Right Shift. Then, press the key corresponding to the command you want. For example, to output the current QMK version to the QMK Toolbox console, press Left Shift+Right Shift+V.

Configuration

If you would like to change the key assignments for Command, #define these in your config.h at either the keyboard or keymap level. All keycode assignments here must omit the KC_ prefix.

DefineDefaultDescription
IS_COMMAND()(get_mods() == MOD_MASK_SHIFT)The key combination to activate Command
MAGIC_KEY_SWITCH_LAYER_WITH_FKEYStrueSet default layer with the Function row
MAGIC_KEY_SWITCH_LAYER_WITH_NKEYStrueSet default layer with the number keys
MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOMfalseSet default layer with MAGIC_KEY_LAYER0..9
MAGIC_KEY_DEBUGDToggle debugging over serial
MAGIC_KEY_DEBUG_MATRIXXToggle key matrix debugging
MAGIC_KEY_DEBUG_KBDKToggle keyboard debugging
MAGIC_KEY_DEBUG_MOUSEMToggle mouse debugging
MAGIC_KEY_CONSOLECEnable the Command console
MAGIC_KEY_VERSIONVPrint the running QMK version to the console
MAGIC_KEY_STATUSSPrint the current keyboard status to the console
MAGIC_KEY_HELPHPrint Command help to the console
MAGIC_KEY_HELP_ALTSLASHPrint Command help to the console (alternate)
MAGIC_KEY_LAYER00Make layer 0 the default layer
MAGIC_KEY_LAYER0_ALTGRAVEMake layer 0 the default layer (alternate)
MAGIC_KEY_LAYER11Make layer 1 the default layer
MAGIC_KEY_LAYER22Make layer 2 the default layer
MAGIC_KEY_LAYER33Make layer 3 the default layer
MAGIC_KEY_LAYER44Make layer 4 the default layer
MAGIC_KEY_LAYER55Make layer 5 the default layer
MAGIC_KEY_LAYER66Make layer 6 the default layer
MAGIC_KEY_LAYER77Make layer 7 the default layer
MAGIC_KEY_LAYER88Make layer 8 the default layer
MAGIC_KEY_LAYER99Make layer 9 the default layer
MAGIC_KEY_BOOTLOADERBJump to bootloader
MAGIC_KEY_BOOTLOADER_ALTESCJump to bootloader (alternate)
MAGIC_KEY_LOCKCAPSLock the keyboard so nothing can be typed
MAGIC_KEY_EEPROMEPrint stored EEPROM config to the console
MAGIC_KEY_EEPROM_CLEARBSPACEClear the EEPROM
MAGIC_KEY_NKRONToggle N-Key Rollover (NKRO)
MAGIC_KEY_SLEEP_LEDZToggle LED when computer is sleeping