You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

485 lines
24 KiB

  1. # Configuring QMK
  2. QMK is nearly infinitely configurable. Wherever possible we err on the side of allowing users to customize their keyboard, even at the expense of code size. That level of flexibility makes for a daunting configuration experience, however.
  3. There are three main types of configuration files in QMK:
  4. * `config.h`, which contains various preprocessor directives (`#define`, `#ifdef`)
  5. * `rules.mk`, which contains additional variables
  6. * `info.json`, which is utilized for [data-driven configuration](https://docs.qmk.fm/#/data_driven_config)
  7. This page will only discuss the first two types, `config.h` and `rules.mk`.
  8. ?> While not all settings have data-driven equivalents yet, keyboard makers are encouraged to utilize the `info.json` file to set the metadata for their boards when possible. See the [`info.json` Format](https://docs.qmk.fm/#/reference_info_json) page for more details.
  9. These files exist at various levels in QMK and all files of the same type are combined to build the final configuration. The levels, from lowest priority to highest priority, are:
  10. * QMK Default
  11. * Keyboard
  12. * Folders (Up to 5 levels deep)
  13. * Keymap
  14. ## QMK Default
  15. Every available setting in QMK has a default. If that setting is not set at the Keyboard, Folder, or Keymap level this is the setting that will be used.
  16. ## Keyboard
  17. This level contains config options that should apply to the whole keyboard. Some settings won't change in revisions, or most keymaps. Other settings are merely defaults for this keyboard and can be overridden by folders and/or keymaps.
  18. ## Folders
  19. Some keyboards have folders and sub-folders to allow for different hardware configurations. Most keyboards only go 1 folder deep, but QMK supports structures up to 5 folders deep. Each folder can have its own `config.h` and `rules.mk` files that are incorporated into the final configuration.
  20. ## Keymap
  21. This level contains all of the options for that particular keymap. If you wish to override a previous declaration, you can use `#undef <variable>` to undefine it, where you can then redefine it without an error.
  22. # The `config.h` File
  23. This is a C header file that is one of the first things included, and will persist over the whole project (if included). Lots of variables can be set here and accessed elsewhere. The `config.h` file shouldn't be including other `config.h` files.
  24. ## Hardware Options
  25. * `#define VENDOR_ID 0x1234`
  26. * defines your VID, and for most DIY projects, can be whatever you want
  27. * `#define PRODUCT_ID 0x5678`
  28. * defines your PID, and for most DIY projects, can be whatever you want
  29. * `#define DEVICE_VER 0x0100`
  30. * defines the device version (often used for revisions)
  31. * `#define MANUFACTURER "Me"`
  32. * generally who/whatever brand produced the board
  33. * `#define PRODUCT "Board"`
  34. * the name of the keyboard
  35. * `#define MATRIX_ROWS 5`
  36. * the number of rows in your keyboard's matrix
  37. * `#define MATRIX_COLS 15`
  38. * the number of columns in your keyboard's matrix
  39. * `#define MATRIX_ROW_PINS { D0, D5, B5, B6 }`
  40. * pins of the rows, from top to bottom
  41. * may be omitted by the keyboard designer if matrix reads are handled in an alternate manner. See [low-level matrix overrides](custom_quantum_functions.md?id=low-level-matrix-overrides) for more information.
  42. * `#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }`
  43. * pins of the columns, from left to right
  44. * may be omitted by the keyboard designer if matrix reads are handled in an alternate manner. See [low-level matrix overrides](custom_quantum_functions.md?id=low-level-matrix-overrides) for more information.
  45. * `#define MATRIX_IO_DELAY 30`
  46. * the delay in microseconds when between changing matrix pin state and reading values
  47. * `#define MATRIX_HAS_GHOST`
  48. * define is matrix has ghost (unlikely)
  49. * `#define MATRIX_UNSELECT_DRIVE_HIGH`
  50. * On un-select of matrix pins, rather than setting pins to input-high, sets them to output-high.
  51. * `#define DIODE_DIRECTION COL2ROW`
  52. * COL2ROW or ROW2COL - how your matrix is configured. COL2ROW means the black mark on your diode is facing to the rows, and between the switch and the rows.
  53. * `#define DIRECT_PINS { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }`
  54. * pins mapped to rows and columns, from left to right. Defines a matrix where each switch is connected to a separate pin and ground.
  55. * `#define AUDIO_VOICES`
  56. * turns on the alternate audio voices (to cycle through)
  57. * `#define C4_AUDIO`
  58. * enables audio on pin C4
  59. * Deprecated. Use `#define AUDIO_PIN C4`
  60. * `#define C5_AUDIO`
  61. * enables audio on pin C5
  62. * Deprecated. Use `#define AUDIO_PIN C5`
  63. * `#define C6_AUDIO`
  64. * enables audio on pin C6
  65. * Deprecated. Use `#define AUDIO_PIN C6`
  66. * `#define B5_AUDIO`
  67. * enables audio on pin B5 (duophony is enabled if one of B pins is enabled along with one of C pins)
  68. * Deprecated. Use `#define AUDIO_PIN B5`, or use `#define AUDIO_PIN_ALT B5` if a `C` pin is enabled with `AUDIO_PIN`
  69. * `#define B6_AUDIO`
  70. * enables audio on pin B6 (duophony is enabled if one of B pins is enabled along with one of C pins)
  71. * Deprecated. Use `#define AUDIO_PIN B6`, or use `#define AUDIO_PIN_ALT B6` if a `C` pin is enabled with `AUDIO_PIN`
  72. * `#define B7_AUDIO`
  73. * enables audio on pin B7 (duophony is enabled if one of B pins is enabled along with one of C pins)
  74. * Deprecated. Use `#define AUDIO_PIN B7`, or use `#define AUDIO_PIN_ALT B7` if a `C` pin is enabled with `AUDIO_PIN`
  75. * `#define BACKLIGHT_PIN B7`
  76. * pin of the backlight
  77. * `#define BACKLIGHT_LEVELS 3`
  78. * number of levels your backlight will have (maximum 31 excluding off)
  79. * `#define BACKLIGHT_BREATHING`
  80. * enables backlight breathing
  81. * `#define BREATHING_PERIOD 6`
  82. * the length of one backlight "breath" in seconds
  83. * `#define DEBOUNCE 5`
  84. * the delay when reading the value of the pin (5 is default)
  85. * `#define LOCKING_SUPPORT_ENABLE`
  86. * mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
  87. * `#define LOCKING_RESYNC_ENABLE`
  88. * tries to keep switch state consistent with keyboard LED state
  89. * `#define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)`
  90. * key combination that allows the use of magic commands (useful for debugging)
  91. * `#define USB_MAX_POWER_CONSUMPTION 500`
  92. * sets the maximum power (in mA) over USB for the device (default: 500)
  93. * `#define USB_POLLING_INTERVAL_MS 10`
  94. * sets the USB polling rate in milliseconds for the keyboard, mouse, and shared (NKRO/media keys) interfaces
  95. * `#define USB_SUSPEND_WAKEUP_DELAY 0`
  96. * sets the number of milliseconds to pause after sending a wakeup packet.
  97. Disabled by default, you might want to set this to 200 (or higher) if the
  98. keyboard does not wake up properly after suspending.
  99. * `#define F_SCL 100000L`
  100. * sets the I2C clock rate speed for keyboards using I2C. The default is `400000L`, except for keyboards using `split_common`, where the default is `100000L`.
  101. ## Features That Can Be Disabled
  102. If you define these options you will disable the associated feature, which can save on code size.
  103. * `#define NO_DEBUG`
  104. * disable debugging
  105. * `#define NO_PRINT`
  106. * disable printing/debugging using hid_listen
  107. * `#define NO_ACTION_LAYER`
  108. * disable layers
  109. * `#define NO_ACTION_TAPPING`
  110. * disable tap dance and other tapping features
  111. * `#define NO_ACTION_ONESHOT`
  112. * disable one-shot modifiers
  113. ## Features That Can Be Enabled
  114. If you define these options you will enable the associated feature, which may increase your code size.
  115. * `#define ENABLE_COMPILE_KEYCODE`
  116. * Enables the `QK_MAKE` keycode
  117. * `#define FORCE_NKRO`
  118. * NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of EEPROM setting. NKRO can still be turned off but will be turned on again if the keyboard reboots.
  119. * `#define STRICT_LAYER_RELEASE`
  120. * force a key release to be evaluated using the current layer stack instead of remembering which layer it came from (used for advanced cases)
  121. ## Behaviors That Can Be Configured
  122. * `#define TAPPING_TERM 200`
  123. * how long before a key press becomes a hold
  124. * `#define TAPPING_TERM_PER_KEY`
  125. * enables handling for per key `TAPPING_TERM` settings
  126. * `#define RETRO_TAPPING`
  127. * tap anyway, even after `TAPPING_TERM`, if there was no other key interruption between press and release
  128. * See [Retro Tapping](tap_hold.md#retro-tapping) for details
  129. * `#define RETRO_TAPPING_PER_KEY`
  130. * enables handling for per key `RETRO_TAPPING` settings
  131. * `#define TAPPING_TOGGLE 2`
  132. * how many taps before triggering the toggle
  133. * `#define PERMISSIVE_HOLD`
  134. * makes tap and hold keys trigger the hold if another key is pressed before releasing, even if it hasn't hit the `TAPPING_TERM`
  135. * See [Permissive Hold](tap_hold.md#permissive-hold) for details
  136. * `#define PERMISSIVE_HOLD_PER_KEY`
  137. * enabled handling for per key `PERMISSIVE_HOLD` settings
  138. * `#define QUICK_TAP_TERM 100`
  139. * tap-then-hold timing to use a dual role key to repeat keycode
  140. * See [Quick Tap Term](tap_hold.md#quick-tap-term)
  141. * Changes the timing of Tap Toggle functionality (`TT` or the One Shot Tap Toggle)
  142. * Defaults to `TAPPING_TERM` if not defined
  143. * `#define QUICK_TAP_TERM_PER_KEY`
  144. * enables handling for per key `QUICK_TAP_TERM` settings
  145. * `#define HOLD_ON_OTHER_KEY_PRESS`
  146. * selects the hold action of a dual-role key as soon as the tap of the dual-role key is interrupted by the press of another key.
  147. * See "[hold on other key press](tap_hold.md#hold-on-other-key-press)" for details
  148. * `#define HOLD_ON_OTHER_KEY_PRESS_PER_KEY`
  149. * enables handling for per key `HOLD_ON_OTHER_KEY_PRESS` settings
  150. * `#define LEADER_TIMEOUT 300`
  151. * how long before the leader key times out
  152. * If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped.
  153. * `#define LEADER_PER_KEY_TIMING`
  154. * sets the timer for leader key chords to run on each key press rather than overall
  155. * `#define LEADER_KEY_STRICT_KEY_PROCESSING`
  156. * Disables keycode filtering for Mod-Tap and Layer-Tap keycodes. Eg, if you enable this, you would need to specify `MT(MOD_CTL, KC_A)` if you want to use `KC_A`.
  157. * `#define MOUSE_EXTENDED_REPORT`
  158. * Enables support for extended reports (-32767 to 32767, instead of -127 to 127), which may allow for smoother reporting, and prevent maxing out of the reports. Applies to both Pointing Device and Mousekeys.
  159. * `#define ONESHOT_TIMEOUT 300`
  160. * how long before oneshot times out
  161. * `#define ONESHOT_TAP_TOGGLE 2`
  162. * how many taps before oneshot toggle is triggered
  163. * `#define COMBO_TERM 200`
  164. * how long for the Combo keys to be detected. Defaults to `TAPPING_TERM` if not defined.
  165. * `#define COMBO_MUST_HOLD_MODS`
  166. * Flag for enabling extending timeout on Combos containing modifiers
  167. * `#define COMBO_MOD_TERM 200`
  168. * Allows for extending COMBO_TERM for mod keys while mid-combo.
  169. * `#define COMBO_MUST_HOLD_PER_COMBO`
  170. * Flag to enable per-combo COMBO_TERM extension and `get_combo_must_hold()` function
  171. * `#define COMBO_TERM_PER_COMBO`
  172. * Flag to enable per-combo COMBO_TERM extension and `get_combo_term()` function
  173. * `#define COMBO_STRICT_TIMER`
  174. * Only start the combo timer on the first key press instead of on all key presses.
  175. * `#define COMBO_NO_TIMER`
  176. * Disable the combo timer completely for relaxed combos.
  177. * `#define TAP_CODE_DELAY 100`
  178. * Sets the delay between `register_code` and `unregister_code`, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds and defaults to `0`.
  179. * `#define TAP_HOLD_CAPS_DELAY 80`
  180. * Sets the delay for Tap Hold keys (`LT`, `MT`) when using `KC_CAPS_LOCK` keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher.
  181. * `#define KEY_OVERRIDE_REPEAT_DELAY 500`
  182. * Sets the key repeat interval for [key overrides](feature_key_overrides.md).
  183. * `#define LEGACY_MAGIC_HANDLING`
  184. * Enables magic configuration handling for advanced keycodes (such as Mod Tap and Layer Tap)
  185. ## RGB Light Configuration
  186. * `#define WS2812_DI_PIN D7`
  187. * pin the DI on the WS2812 is hooked-up to
  188. * `#define RGBLIGHT_LAYERS`
  189. * Lets you define [lighting layers](feature_rgblight.md?id=lighting-layers) that can be toggled on or off. Great for showing the current keyboard layer or caps lock state.
  190. * `#define RGBLIGHT_MAX_LAYERS`
  191. * Defaults to 8. Can be expanded up to 32 if more [lighting layers](feature_rgblight.md?id=lighting-layers) are needed.
  192. * Note: Increasing the maximum will increase the firmware size and slow sync on split keyboards.
  193. * `#define RGBLIGHT_LAYER_BLINK`
  194. * Adds ability to [blink](feature_rgblight.md?id=lighting-layer-blink) a lighting layer for a specified number of milliseconds (e.g. to acknowledge an action).
  195. * `#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF`
  196. * If defined, then [lighting layers](feature_rgblight?id=overriding-rgb-lighting-onoff-status) will be shown even if RGB Light is off.
  197. * `#define RGBLIGHT_LED_COUNT 12`
  198. * number of LEDs
  199. * `#define RGBLIGHT_SPLIT`
  200. * Needed if both halves of the board have RGB LEDs wired directly to the RGB output pin on the controllers instead of passing the output of the left half to the input of the right half
  201. * `#define RGBLED_SPLIT { 6, 6 }`
  202. * number of LEDs connected that are directly wired to the RGB pin on each half of a split keyboard
  203. * First value indicates number of LEDs for left half, second value is for the right half
  204. * When RGBLED_SPLIT is defined, RGBLIGHT_SPLIT is implicitly defined.
  205. * `#define RGBLIGHT_HUE_STEP 12`
  206. * units to step when in/decreasing hue
  207. * `#define RGBLIGHT_SAT_STEP 25`
  208. * units to step when in/decreasing saturation
  209. * `#define RGBLIGHT_VAL_STEP 12`
  210. * units to step when in/decreasing value (brightness)
  211. * `#define RGBW`
  212. * Enables RGBW LED support
  213. ## Mouse Key Options
  214. * `#define MOUSEKEY_INTERVAL 20`
  215. * `#define MOUSEKEY_DELAY 0`
  216. * `#define MOUSEKEY_TIME_TO_MAX 60`
  217. * `#define MOUSEKEY_MAX_SPEED 7`
  218. * `#define MOUSEKEY_WHEEL_DELAY 0`
  219. ## Split Keyboard Options
  220. Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk
  221. * `SPLIT_TRANSPORT = custom`
  222. * Allows replacing the standard split communication routines with a custom one. ARM based split keyboards must use this at present.
  223. ### Setting Handedness
  224. One thing to remember, the side that the USB port is plugged into is always the master half. The side not plugged into USB is the slave.
  225. There are a few different ways to set handedness for split keyboards (listed in order of precedence):
  226. 1. Set `SPLIT_HAND_PIN`: Reads a pin to determine handedness. If pin is high, it's the left side, if low, the half is determined to be the right side
  227. 2. Set `EE_HANDS` and flash `eeprom-lefthand.eep`/`eeprom-righthand.eep` to each half
  228. * For boards with DFU bootloader you can use `:dfu-split-left`/`:dfu-split-right` to flash these EEPROM files
  229. * For boards with Caterina bootloader (like stock Pro Micros), use `:avrdude-split-left`/`:avrdude-split-right`
  230. * For boards with ARM DFU bootloader (like Proton C), use `:dfu-util-split-left`/`:dfu-util-split-right`
  231. 3. Set `MASTER_RIGHT`: Half that is plugged into the USB port is determined to be the master and right half (inverse of the default)
  232. 4. Default: The side that is plugged into the USB port is the master half and is assumed to be the left half. The slave side is the right half
  233. #### Defines for handedness
  234. * `#define SPLIT_HAND_PIN B7`
  235. * For using high/low pin to determine handedness, low = right hand, high = left hand. Replace `B7` with the pin you are using. This is optional, and if you leave `SPLIT_HAND_PIN` undefined, then you can still use the EE_HANDS method or MASTER_LEFT / MASTER_RIGHT defines like the stock Let's Split uses.
  236. * `#define SPLIT_HAND_MATRIX_GRID <out_pin>,<in_pin>`
  237. * The handedness is determined by using the intersection of the keyswitches in the key matrix, which does not exist. Normally, when this intersection is shorted (level low), it is considered right. If you define `#define SPLIT_HAND_MATRIX_GRID_LOW_IS_LEFT`, it is determined to be left when the level is low.
  238. * `#define EE_HANDS` (only works if `SPLIT_HAND_PIN` and `SPLIT_HAND_MATRIX_GRID` are not defined)
  239. * Reads the handedness value stored in the EEPROM after `eeprom-lefthand.eep`/`eeprom-righthand.eep` has been flashed to their respective halves.
  240. * `#define MASTER_RIGHT`
  241. * Master half is defined to be the right half.
  242. ### Other Options
  243. * `#define USE_I2C`
  244. * For using I2C instead of Serial (default is serial; serial transport is supported on ARM -- I2C is AVR-only)
  245. * `#define SOFT_SERIAL_PIN D0`
  246. * When using serial, define this. `D0` or `D1`,`D2`,`D3`,`E6`.
  247. * `#define MATRIX_ROW_PINS_RIGHT { <row pins> }`
  248. * `#define MATRIX_COL_PINS_RIGHT { <col pins> }`
  249. * If you want to specify a different pinout for the right half than the left half, you can define `MATRIX_ROW_PINS_RIGHT`/`MATRIX_COL_PINS_RIGHT`. Currently, the size of `MATRIX_ROW_PINS` must be the same as `MATRIX_ROW_PINS_RIGHT` and likewise for the definition of columns.
  250. * may be omitted by the keyboard designer if matrix reads are handled in an alternate manner. See [low-level matrix overrides](custom_quantum_functions.md?id=low-level-matrix-overrides) for more information.
  251. * `#define DIRECT_PINS_RIGHT { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }`
  252. * If you want to specify a different direct pinout for the right half than the left half, you can define `DIRECT_PINS_RIGHT`. Currently, the size of `DIRECT_PINS` must be the same as `DIRECT_PINS_RIGHT`.
  253. * `#define RGBLED_SPLIT { 6, 6 }`
  254. * See [RGB Light Configuration](#rgb-light-configuration)
  255. * `#define SELECT_SOFT_SERIAL_SPEED <speed>` (default speed is 1)
  256. * Sets the protocol speed when using serial communication
  257. * Speeds:
  258. * 0: about 189kbps (Experimental only)
  259. * 1: about 137kbps (default)
  260. * 2: about 75kbps
  261. * 3: about 39kbps
  262. * 4: about 26kbps
  263. * 5: about 20kbps
  264. * `#define SPLIT_USB_DETECT`
  265. * Detect (with timeout) USB connection when delegating master/slave
  266. * Default behavior for ARM
  267. * Required for AVR Teensy (without hardware mods)
  268. * `#define SPLIT_USB_TIMEOUT 2000`
  269. * Maximum timeout when detecting master/slave when using `SPLIT_USB_DETECT`
  270. * `#define SPLIT_USB_TIMEOUT_POLL 10`
  271. * Poll frequency when detecting master/slave when using `SPLIT_USB_DETECT`
  272. * `#define SPLIT_WATCHDOG_ENABLE`
  273. * Reboot slave if no communication from master within timeout.
  274. * Helps resolve issue where both sides detect as slave using `SPLIT_USB_DETECT`
  275. * `#define SPLIT_WATCHDOG_TIMEOUT 3000`
  276. * Maximum slave timeout when waiting for communication from master when using `SPLIT_WATCHDOG_ENABLE`
  277. * `#define FORCED_SYNC_THROTTLE_MS 100`
  278. * Deadline for synchronizing data from master to slave when using the QMK-provided split transport.
  279. * `#define SPLIT_TRANSPORT_MIRROR`
  280. * Mirrors the master-side matrix on the slave when using the QMK-provided split transport.
  281. * `#define SPLIT_LAYER_STATE_ENABLE`
  282. * Ensures the current layer state is available on the slave when using the QMK-provided split transport.
  283. * `#define SPLIT_LED_STATE_ENABLE`
  284. * Ensures the current host indicator state (caps/num/scroll) is available on the slave when using the QMK-provided split transport.
  285. * `#define SPLIT_MODS_ENABLE`
  286. * Ensures the current modifier state (normal, weak, and oneshot) is available on the slave when using the QMK-provided split transport.
  287. * `#define SPLIT_WPM_ENABLE`
  288. * Ensures the current WPM is available on the slave when using the QMK-provided split transport.
  289. * `#define SPLIT_OLED_ENABLE`
  290. * Syncs the on/off state of the OLED between the halves.
  291. * `#define SPLIT_ST7565_ENABLE`
  292. * Syncs the on/off state of the ST7565 screen between the halves.
  293. * `#define SPLIT_TRANSACTION_IDS_KB .....`
  294. * `#define SPLIT_TRANSACTION_IDS_USER .....`
  295. * Allows for custom data sync with the slave when using the QMK-provided split transport. See [custom data sync between sides](feature_split_keyboard.md#custom-data-sync) for more information.
  296. # The `rules.mk` File
  297. This is a [make](https://www.gnu.org/software/make/manual/make.html) file that is included by the top-level `Makefile`. It is used to set some information about the MCU that we will be compiling for as well as enabling and disabling certain features.
  298. ## Build Options
  299. * `DEFAULT_FOLDER`
  300. * Used to specify a default folder when a keyboard has more than one sub-folder.
  301. * `FIRMWARE_FORMAT`
  302. * Defines which format (bin, hex) is copied to the root `qmk_firmware` folder after building.
  303. * `SRC`
  304. * Used to add files to the compilation/linking list.
  305. * `LIB_SRC`
  306. * Used to add files as a library to the compilation/linking list.
  307. The files specified by `LIB_SRC` is linked after the files specified by `SRC`.
  308. For example, if you specify:
  309. ```
  310. SRC += a.c
  311. LIB_SRC += lib_b.c
  312. SRC += c.c
  313. LIB_SRC += lib_d.c
  314. ```
  315. The link order is as follows.
  316. ```
  317. ... a.o c.o ... lib_b.a lib_d.a ...
  318. ```
  319. * `LAYOUTS`
  320. * A list of [layouts](feature_layouts.md) this keyboard supports.
  321. * `LTO_ENABLE`
  322. * Enables Link Time Optimization (LTO) when compiling the keyboard. This makes the process take longer, but it can significantly reduce the compiled size (and since the firmware is small, the added time is not noticeable).
  323. ## AVR MCU Options
  324. * `MCU = atmega32u4`
  325. * `F_CPU = 16000000`
  326. * `ARCH = AVR8`
  327. * `F_USB = $(F_CPU)`
  328. * `OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT`
  329. * `BOOTLOADER = atmel-dfu` with the following options:
  330. * `atmel-dfu`
  331. * `lufa-dfu`
  332. * `qmk-dfu`
  333. * `halfkay`
  334. * `caterina`
  335. * `bootloadhid`
  336. * `usbasploader`
  337. ## Feature Options :id=feature-options
  338. Use these to enable or disable building certain features. The more you have enabled the bigger your firmware will be, and you run the risk of building a firmware too large for your MCU.
  339. * `MAGIC_ENABLE`
  340. * MAGIC actions (BOOTMAGIC without the boot)
  341. * `BOOTMAGIC_ENABLE`
  342. * Enable Bootmagic Lite
  343. * `MOUSEKEY_ENABLE`
  344. * Mouse keys
  345. * `EXTRAKEY_ENABLE`
  346. * Audio control and System control
  347. * `CONSOLE_ENABLE`
  348. * Console for debug
  349. * `COMMAND_ENABLE`
  350. * Commands for debug and configuration
  351. * `COMBO_ENABLE`
  352. * Key combo feature
  353. * `NKRO_ENABLE`
  354. * USB N-Key Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
  355. * `RING_BUFFERED_6KRO_REPORT_ENABLE`
  356. * USB 6-Key Rollover - Instead of stopping any new input once 6 keys are pressed, the oldest key is released and the new key is pressed.
  357. * `AUDIO_ENABLE`
  358. * Enable the audio subsystem.
  359. * `KEY_OVERRIDE_ENABLE`
  360. * Enable the key override feature
  361. * `RGBLIGHT_ENABLE`
  362. * Enable keyboard underlight functionality
  363. * `LEADER_ENABLE`
  364. * Enable leader key chording
  365. * `MIDI_ENABLE`
  366. * MIDI controls
  367. * `UNICODE_ENABLE`
  368. * Unicode
  369. * `BLUETOOTH_ENABLE`
  370. * Current options are bluefruit_le, rn42
  371. * `SPLIT_KEYBOARD`
  372. * Enables split keyboard support (dual MCU like the let's split and bakingpy's boards) and includes all necessary files located at quantum/split_common
  373. * `CUSTOM_MATRIX`
  374. * Allows replacing the standard matrix scanning routine with a custom one.
  375. * `DEBOUNCE_TYPE`
  376. * Allows replacing the standard key debouncing routine with an alternative or custom one.
  377. * `WAIT_FOR_USB`
  378. * Forces the keyboard to wait for a USB connection to be established before it starts up
  379. * `NO_USB_STARTUP_CHECK`
  380. * Disables usb suspend check after keyboard startup. Usually the keyboard waits for the host to wake it up before any tasks are performed. This is useful for split keyboards as one half will not get a wakeup call but must send commands to the master.
  381. * `DEFERRED_EXEC_ENABLE`
  382. * Enables deferred executor support -- timed delays before callbacks are invoked. See [deferred execution](custom_quantum_functions.md#deferred-execution) for more information.
  383. * `DYNAMIC_TAPPING_TERM_ENABLE`
  384. * Allows to configure the global tapping term on the fly.
  385. ## USB Endpoint Limitations
  386. In order to provide services over USB, QMK has to use USB endpoints.
  387. These are a finite resource: each microcontroller has only a certain number.
  388. This limits what features can be enabled together.
  389. If the available endpoints are exceeded, a build error is thrown.
  390. The following features can require separate endpoints:
  391. * `MOUSEKEY_ENABLE`
  392. * `EXTRAKEY_ENABLE`
  393. * `CONSOLE_ENABLE`
  394. * `NKRO_ENABLE`
  395. * `MIDI_ENABLE`
  396. * `RAW_ENABLE`
  397. * `VIRTSER_ENABLE`
  398. In order to improve utilisation of the endpoints, the HID features can be combined to use a single endpoint.
  399. By default, `MOUSEKEY`, `EXTRAKEY`, and `NKRO` are combined into a single endpoint.
  400. The base keyboard functionality can also be combined into the endpoint,
  401. by setting `KEYBOARD_SHARED_EP = yes`.
  402. This frees up one more endpoint,
  403. but it can prevent the keyboard working in some BIOSes,
  404. as they do not implement Boot Keyboard protocol switching.
  405. Combining the mouse also breaks Boot Mouse compatibility.
  406. The mouse can be uncombined by setting `MOUSE_SHARED_EP = no` if this functionality is required.