aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/_summary.md50
-rw-r--r--docs/config_options.md299
-rw-r--r--docs/contributing.md2
-rw-r--r--docs/faq_keymap.md11
-rw-r--r--docs/feature_advanced_keycodes.md (renamed from docs/feature_common_shortcuts.md)18
-rw-r--r--docs/feature_dynamic_macros.md (renamed from docs/dynamic_macros.md)0
-rw-r--r--docs/feature_key_lock.md (renamed from docs/key_lock.md)0
-rw-r--r--docs/feature_macros.md (renamed from docs/macros.md)0
-rw-r--r--docs/feature_mouse_keys.md (renamed from docs/mouse_keys.md)0
-rw-r--r--docs/feature_space_cadet.md (renamed from docs/space_cadet_shift.md)0
-rw-r--r--docs/feature_tap_dance.md (renamed from docs/tap_dance.md)0
-rw-r--r--docs/feature_unicode.md (renamed from docs/unicode.md)0
-rw-r--r--docs/features.md125
-rw-r--r--docs/getting_started_make_guide.md2
-rw-r--r--docs/glossary.md12
-rw-r--r--docs/hardware.md8
-rw-r--r--docs/hardware_avr.md157
-rw-r--r--docs/hardware_drivers.md27
-rw-r--r--docs/hardware_keyboard_guidelines.md (renamed from docs/adding_a_keyboard_to_qmk.md)34
-rw-r--r--docs/keycodes.md36
-rw-r--r--docs/porting_your_keyboard_to_qmk.md63
-rw-r--r--docs/quantum_keycodes.md2
-rw-r--r--docs/redirects.json34
23 files changed, 530 insertions, 350 deletions
diff --git a/docs/_summary.md b/docs/_summary.md
index 55cfd2ab3..b433181a6 100644
--- a/docs/_summary.md
+++ b/docs/_summary.md
@@ -12,57 +12,61 @@
12 * [Debugging/Troubleshooting QMK](faq_debug.md) 12 * [Debugging/Troubleshooting QMK](faq_debug.md)
13 * [Keymap](faq_keymap.md) 13 * [Keymap](faq_keymap.md)
14 14
15* [Hardware](hardware.md)
16 * [Keyboard Guidelines](hardware_keyboard_guidelines.md)
17 * [AVR Processors](hardware_avr.md)
18 * ARM Processors (TBD)
19 * [Drivers](hardware_drivers.md)
20
15* [Features](features.md) 21* [Features](features.md)
16 * [Layouts](feature_layouts.md) 22 * [Advanced Keycodes](feature_advanced_keycodes.md)
17 * [Common Shortcuts](feature_common_shortcuts.md) 23 * [Audio](feature_audio.md)
18 * [Userspace](feature_userspace.md)
19 * [Backlight](feature_backlight.md) 24 * [Backlight](feature_backlight.md)
20 * [Bootmagic](feature_bootmagic.md) 25 * [Bootmagic](feature_bootmagic.md)
21 * [Dynamic Macros](dynamic_macros.md) 26 * [Dynamic Macros](feature_dynamic_macros.md)
22 * [Key Lock](key_lock.md) 27 * [Key Lock](feature_key_lock.md)
28 * [Layouts](feature_layouts.md)
23 * [Leader Key](feature_leader_key.md) 29 * [Leader Key](feature_leader_key.md)
24 * [Macros](macros.md) 30 * [Macros](feature_macros.md)
25 * [Mouse keys](mouse_keys.md) 31 * [Mouse keys](feature_mouse_keys.md)
26 * [Pointing Device](feature_pointing_device.md) 32 * [Pointing Device](feature_pointing_device.md)
27 * [PS2 Mouse](feature_ps2_mouse.md) 33 * [PS2 Mouse](feature_ps2_mouse.md)
28 * [Space Cadet](space_cadet_shift.md) 34 * [Space Cadet](feature_space_cadet.md)
29 * [Tap Dance](tap_dance.md) 35 * [Stenography](feature_stenography.md)
30 * [Audio](feature_audio.md) 36 * [Tap Dance](feature_tap_dance.md)
31 * [Thermal Printer](feature_thermal_printer.md)
32 * [Stenography](stenography.md)
33 * [Unicode](unicode.md)
34 * [Terminal](feature_terminal.md) 37 * [Terminal](feature_terminal.md)
38 * [Thermal Printer](feature_thermal_printer.md)
39 * [Unicode](feature_unicode.md)
40 * [Userspace](feature_userspace.md)
35 41
36* Reference 42* Reference
43 * [Config Options](config_options.md)
44 * [Customizing Functionality](custom_quantum_functions.md)
45 * [Documentation Best Practices](documentation_best_practices.md)
46 * [Documentation Templates](documentation_templates.md)
37 * [Glossary](glossary.md) 47 * [Glossary](glossary.md)
38 * [Keymap overview](keymap.md) 48 * [Keymap overview](keymap.md)
39 * [Keycodes](keycodes.md) 49 * [Keycodes](keycodes.md)
40 * [Basic](keycodes_basic.md)
41 * [Quantum](quantum_keycodes.md)
42 * [Backlight](feature_backlight.md#backlight-keycodes) 50 * [Backlight](feature_backlight.md#backlight-keycodes)
51 * [Basic](keycodes_basic.md)
43 * [Bluetooth](feature_bluetooth.md#bluetooth-keycodes) 52 * [Bluetooth](feature_bluetooth.md#bluetooth-keycodes)
44 * [Bootmagic](feature_bootmagic.md#bootmagic-keycodes) 53 * [Bootmagic](feature_bootmagic.md#bootmagic-keycodes)
45 * [Layer Switching](feature_common_shortcuts.md#switching-and-toggling-layers) 54 * [Layer Switching](feature_common_shortcuts.md#switching-and-toggling-layers)
46 * [Mod+Key](feature_common_shortcuts.md#modifier-keys) 55 * [Mod+Key](feature_common_shortcuts.md#modifier-keys)
47 * [Mod Tap](feature_common_shortcuts.md#mod-tap) 56 * [Mod Tap](feature_common_shortcuts.md#mod-tap)
48 * [One Shot Keys](feature_common_shortcuts.md#one-shot-keys) 57 * [One Shot Keys](feature_common_shortcuts.md#one-shot-keys)
49 * [Shifted Keys](feature_common_shortcuts.md#shifted-keycodes) 58 * [Quantum](quantum_keycodes.md)
50 * [Stenography](stenography.md#keycode-reference)
51 * [RGB Light](feature_rgblight.md#rgblight-keycodes) 59 * [RGB Light](feature_rgblight.md#rgblight-keycodes)
60 * [Shifted Keys](feature_common_shortcuts.md#shifted-keycodes)
61 * [Stenography](feature_stenography.md#keycode-reference)
52 * [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes) 62 * [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes)
53 * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) 63 * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
54 * [The `config.h` File](config_options.md)
55 * [Customizing Functionality](custom_quantum_functions.md)
56 * [Documentation Best Practices](documentation_best_practices.md)
57 * [Documentation Templates](documentation_templates.md)
58 * [Unit Testing](unit_testing.md) 64 * [Unit Testing](unit_testing.md)
59 65
60* For Makers and Modders 66* For Makers and Modders
61 * [Adding a keyboard to QMK](adding_a_keyboard_to_qmk.md)
62 * [Hand Wiring Guide](hand_wiring.md) 67 * [Hand Wiring Guide](hand_wiring.md)
63 * [ISP flashing guide](isp_flashing_guide.md) 68 * [ISP flashing guide](isp_flashing_guide.md)
64 * [Modding your keyboard](modding_your_keyboard.md) 69 * [Modding your keyboard](modding_your_keyboard.md)
65 * [Porting your keyboard to QMK](porting_your_keyboard_to_qmk.md)
66 70
67* For a Deeper Understanding 71* For a Deeper Understanding
68 * [How Keyboards Work](how_keyboards_work.md) 72 * [How Keyboards Work](how_keyboards_work.md)
diff --git a/docs/config_options.md b/docs/config_options.md
index b71dbb8ae..de67630ad 100644
--- a/docs/config_options.md
+++ b/docs/config_options.md
@@ -1,129 +1,198 @@
1# The `config.h` file 1# Configuring QMK
2
3This 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 (namely keymaps). This file can exist at a couple different levels:
4
5## Keyboard
6 2
7```c 3QMK 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.
8#ifndef CONFIG_H
9#define CONFIG_H
10 4
11#include "config_common.h" 5There are two main types of configuration files in QMK- `config.h` and `rules.mk`. 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:
12 6
13// config options 7* QMK Default
8* Keyboard
9* Folders (Up to 5 levels deep)
10* Keymap
14 11
15#endif 12## QMK Default
16```
17 13
18This file contains config options that should apply to the whole keyboard, and won't change in revisions, or most keymaps. The revision block here only applies to keyboards with revisions. 14Every 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.
19 15
20## Revisions 16## Keyboard
21
22```c
23#ifndef <revision>_CONFIG_H
24#define <revision>_CONFIG_H
25
26#include "config_common.h"
27 17
28// config options 18This 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.
29 19
30#endif 20## Folders
31```
32 21
33For keyboards that have revisions, this file contains config options that should apply to only that revisions, and won't change in most keymaps. 22Some 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.
34 23
35## Keymap 24## Keymap
36 25
37```c 26This 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.
38#ifndef CONFIG_USER_H
39#define CONFIG_USER_H
40
41#include "config_common.h"
42
43// config options
44
45#endif
46```
47
48This file 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.
49
50# Config Options
51
52```c
53#define VENDOR_ID 0x1234 // defines your VID, and for most DIY projects, can be whatever you want
54#define PRODUCT_ID 0x5678 // defines your PID, and for most DIY projects, can be whatever you want
55#define DEVICE_VER 0 // defines the device version (often used for revisions)
56
57#define MANUFACTURER Me // generally who/whatever brand produced the board
58#define PRODUCT Board // the name of the keyboard
59#define DESCRIPTION a keyboard // a short description of what the keyboard is
60
61#define MATRIX_ROWS 5 // the number of rows in your keyboard's matrix
62#define MATRIX_COLS 15 // the number of columns in your keyboard's matrix
63
64#define MATRIX_ROW_PINS { D0, D5, B5, B6 } // pins of the rows, from top to bottom
65#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } // pins of the columns, from left to right
66#define UNUSED_PINS { D1, D2, D3, B1, B2, B3 } // pins unused by the keyboard for reference
67#define MATRIX_HAS_GHOST // define is matrix has ghost (unlikely)
68#define DIODE_DIRECTION COL2ROW // COL2ROW or ROW2COL - how your matrix is configured
69// COL2ROW means the black mark on your diode is facing to the rows, and between the switch and the rows
70 27
71#define AUDIO_VOICES // turns on the alternate audio voices (to cycle through) 28# The `config.h` file
72#define C6_AUDIO // enables audio on pin C6
73#define B5_AUDIO // enables audio on pin B5 (duophony is enable if both are enabled)
74
75#define BACKLIGHT_PIN B7 // pin of the backlight - B5, B6, B7 use PWM, others use softPWM
76#define BACKLIGHT_LEVELS 3 // number of levels your backlight will have (not including off)
77
78#define DEBOUNCING_DELAY 5 // the delay when reading the value of the pin (5 is default)
79
80#define LOCKING_SUPPORT_ENABLE // mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
81#define LOCKING_RESYNC_ENABLE // tries to keep switch state consistent with keyboard LED state
82
83#define IS_COMMAND() ( \ // key combination that allows the use of magic commands (useful for debugging)
84 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
85)
86
87// the following options can save on file size at the expense of that feature
88#define NO_DEBUG // disable debuging (saves on file size)
89#define NO_PRINT // disable printing (saves of file size)
90#define NO_ACTION_LAYER // no layers
91#define NO_ACTION_TAPPING // no tapping for layers/mods
92#define NO_ACTION_ONESHOT // no oneshot for layers/mods
93#define NO_ACTION_MACRO // no macros
94#define NO_ACTION_FUNCTION // no functions
95
96#define FORCE_NKRO // NKRO by default requires to be turned on, this forces it to be on always
97
98#define PREVENT_STUCK_MODIFIERS // when switching layers, this will release all mods
99
100#define TAPPING_TERM 200 // how long before a tap becomes a hold
101#define TAPPING_TOGGLE 2 // how many taps before triggering the toggle
102
103#define PERMISSIVE_HOLD // makes tap and hold keys work better for fast typers who don't want tapping term set above 500
104
105#define LEADER_TIMEOUT 300 // how long before the leader key times out
106
107#define ONESHOT_TIMEOUT 300 // how long before oneshot times out
108#define ONESHOT_TAP_TOGGLE 2 // how many taps before oneshot toggle is triggered
109
110#define IGNORE_MOD_TAP_INTERRUPT // makes it possible to do rolling combos (zx) with keys that convert to other keys on hold
111
112// ws2812 options
113#define RGB_DI_PIN D7 // pin the DI on the ws2812 is hooked-up to
114#define RGBLIGHT_ANIMATIONS // run RGB animations
115#define RGBLED_NUM 15 // number of LEDs
116#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue
117#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation
118#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness)
119
120#define RGBW_BB_TWI // bit-bangs twi to EZ RGBW LEDs (only required for Ergodox EZ)
121
122// mousekey options (self-describing)
123#define MOUSEKEY_INTERVAL 20
124#define MOUSEKEY_DELAY 0
125#define MOUSEKEY_TIME_TO_MAX 60
126#define MOUSEKEY_MAX_SPEED 7
127#define MOUSEKEY_WHEEL_DELAY 0
128 29
129``` \ No newline at end of file 30This 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.
31
32## `config.h` Options
33
34### Hardware Options
35* `#define VENDOR_ID 0x1234`
36 * defines your VID, and for most DIY projects, can be whatever you want
37* `#define PRODUCT_ID 0x5678`
38 * defines your PID, and for most DIY projects, can be whatever you want
39* `#define DEVICE_VER 0`
40 * defines the device version (often used for revisions)
41* `#define MANUFACTURER Me`
42 * generally who/whatever brand produced the board
43* `#define PRODUCT Board`
44 * the name of the keyboard
45* `#define DESCRIPTION a keyboard`
46 * a short description of what the keyboard is
47* `#define MATRIX_ROWS 5`
48 * the number of rows in your keyboard's matrix
49* `#define MATRIX_COLS 15`
50 * the number of columns in your keyboard's matrix
51* `#define MATRIX_ROW_PINS { D0, D5, B5, B6 }`
52 * pins of the rows, from top to bottom
53* `#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }`
54 * pins of the columns, from left to right
55* `#define UNUSED_PINS { D1, D2, D3, B1, B2, B3 }`
56 * pins unused by the keyboard for reference
57* `#define MATRIX_HAS_GHOST`
58 * define is matrix has ghost (unlikely)
59* `#define DIODE_DIRECTION COL2ROW`
60 * 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.
61* `#define AUDIO_VOICES`
62 * turns on the alternate audio voices (to cycle through)
63* `#define C6_AUDIO`
64 * enables audio on pin C6
65* `#define B5_AUDIO`
66 * enables audio on pin B5 (duophony is enable if both are enabled)
67* `#define BACKLIGHT_PIN B7`
68 * pin of the backlight - B5, B6, B7 use PWM, others use softPWM
69* `#define BACKLIGHT_LEVELS 3`
70 * number of levels your backlight will have (not including off)
71* `#define DEBOUNCING_DELAY 5`
72 * the delay when reading the value of the pin (5 is default)
73* `#define LOCKING_SUPPORT_ENABLE`
74 * mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
75* `#define LOCKING_RESYNC_ENABLE`
76 * tries to keep switch state consistent with keyboard LED state
77* `#define IS_COMMAND() ( keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) )`
78 * key combination that allows the use of magic commands (useful for debugging)
79
80### Features That Can Be Disabled
81
82If you define these options you will disable the associated feature, which can save on code size.
83
84* `#define NO_DEBUG`
85 * disable debuging
86* `#define NO_PRINT`
87 * disable printing/debugging using hid_listen
88* `#define NO_ACTION_LAYER`
89 * disable layers
90* `#define NO_ACTION_TAPPING`
91 * disable tap dance and other tapping features
92* `#define NO_ACTION_ONESHOT`
93 * disable one-shot modifiers
94* `#define NO_ACTION_MACRO`
95 * disable all macro handling
96* `#define NO_ACTION_FUNCTION`
97 * disable the action function (deprecated)
98
99### Features That Can Be Enabled
100
101If you define these options you will enable the associated feature, which may increase your code size.
102
103* `#define FORCE_NKRO`
104 * 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.
105* `#define PREVENT_STUCK_MODIFIERS`
106 * when switching layers, this will release all mods
107
108### Behaviors That Can Be Configured
109
110* `#define TAPPING_TERM 200`
111 * how long before a tap becomes a hold
112* `#define TAPPING_TOGGLE 2`
113 * how many taps before triggering the toggle
114* `#define PERMISSIVE_HOLD`
115 * makes tap and hold keys work better for fast typers who don't want tapping term set above 500
116* `#define LEADER_TIMEOUT 300`
117 * how long before the leader key times out
118* `#define ONESHOT_TIMEOUT 300`
119 * how long before oneshot times out
120* `#define ONESHOT_TAP_TOGGLE 2`
121 * how many taps before oneshot toggle is triggered
122* `#define IGNORE_MOD_TAP_INTERRUPT`
123 * makes it possible to do rolling combos (zx) with keys that convert to other keys on hold
124
125### RGB Light Configuration
126
127* `#define RGB_DI_PIN D7`
128 * pin the DI on the ws2812 is hooked-up to
129* `#define RGBLIGHT_ANIMATIONS`
130 * run RGB animations
131* `#define RGBLED_NUM 15`
132 * number of LEDs
133* `#define RGBLIGHT_HUE_STEP 12`
134 * units to step when in/decreasing hue
135* `#define RGBLIGHT_SAT_STEP 25`
136 * units to step when in/decresing saturation
137* `#define RGBLIGHT_VAL_STEP 12`
138 * units to step when in/decreasing value (brightness)
139* `#define RGBW_BB_TWI`
140 * bit-bangs twi to EZ RGBW LEDs (only required for Ergodox EZ)
141
142### Mouse Key Options
143
144* `#define MOUSEKEY_INTERVAL 20`
145* `#define MOUSEKEY_DELAY 0`
146* `#define MOUSEKEY_TIME_TO_MAX 60`
147* `#define MOUSEKEY_MAX_SPEED 7`
148* `#define MOUSEKEY_WHEEL_DELAY 0`
149
150# The `rules.mk` File
151
152This 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.
153
154## `rules.mk` options
155
156### Build Options
157
158* `DEFAULT_FOLDER`
159 * Used to specify a default folder when a keyboard has more than one sub-folder.
160* `SRC`
161 * Used to add files to the compilation/linking list.
162* `LAYOUTS`
163 * A list of [layouts](feature_layouts.md) this keyboard supports.
164
165### AVR MCU Options
166* `MCU = atmega32u4`
167* `F_CPU = 16000000`
168* `ARCH = AVR8`
169* `F_USB = $(F_CPU)`
170* `OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT`
171* `OPT_DEFS += -DBOOTLOADER_SIZE=4096`
172
173### Feature Options
174
175Use 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.
176
177* `BOOTMAGIC_ENABLE`
178 * Virtual DIP switch configuration(+1000)
179* `MOUSEKEY_ENABLE`
180 * Mouse keys(+4700)
181* `EXTRAKEY_ENABLE`
182 * Audio control and System control(+450)
183* `CONSOLE_ENABLE`
184 * Console for debug(+400)
185* `COMMAND_ENABLE`
186 * Commands for debug and configuration
187* `NKRO_ENABLE`
188 * USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
189* `AUDIO_ENABLE`
190 * Enable the audio subsystem.
191* `RGBLIGHT_ENABLE`
192 * Enable keyboard underlight functionality
193* `MIDI_ENABLE`
194 * MIDI controls
195* `UNICODE_ENABLE`
196 * Unicode
197* `BLUETOOTH_ENABLE`
198 * Enable Bluetooth with the Adafruit EZ-Key HID
diff --git a/docs/contributing.md b/docs/contributing.md
index 58af8ce53..4acbdc1f0 100644
--- a/docs/contributing.md
+++ b/docs/contributing.md
@@ -144,4 +144,4 @@ To maintain a clear vision of how things are laid out in QMK we try to plan out
144 144
145# What does the Code of Conduct mean for me? 145# What does the Code of Conduct mean for me?
146 146
147Our Code of Conduct means that you are responsible for treating everyone on the project with respect and courtesy regardless of their identity. If you are the victim of any inappropriate behavior or comments as described in our Code of Conduct, we are here for you and will do the best to ensure that the abuser is reprimanded appropriately, per our code. 147Our [Code of Conduct](https://github.com/qmk/qmk_firmware/blob/master/CODE_OF_CONDUCT.md) means that you are responsible for treating everyone on the project with respect and courtesy regardless of their identity. If you are the victim of any inappropriate behavior or comments as described in our Code of Conduct, we are here for you and will do the best to ensure that the abuser is reprimanded appropriately, per our code.
diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md
index eb49a3699..83eeb235e 100644
--- a/docs/faq_keymap.md
+++ b/docs/faq_keymap.md
@@ -7,6 +7,17 @@ See [Keycodes](keycodes.md) for an index of keycodes available to you. These lin
7 7
8Keycodes are actually defined in [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h). 8Keycodes are actually defined in [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h).
9 9
10## What Are The Default Keycodes?
11
12There are 3 standard keyboard layouts in use around the world- ANSI, ISO, and JIS. North America primarily uses ANSI, Europe and Africa primarily use ISO, and Japan uses JIS. Regions not mentioned typically use either ANSI or ISO. The keycodes corresponding to these layouts are shown here:
13
14<!-- Source for this image: http://www.keyboard-layout-editor.com/#/gists/9ce023dc6caadc0cf11c88c782350a8c -->
15![Keyboard Layout Image](https://i.imgur.com/45m4mRf.png)
16
17## The Menu Key Isn't Working
18
19The key found on most modern keyboards that is located between `KC_RGUI` and `KC_RCTL` is actually called `KC_APP`. This is because when that key was invented there was already a key named `MENU` in the relevant standards, so MS chose to call that the `APP` key.
20
10## `KC_SYSREQ` isn't working 21## `KC_SYSREQ` isn't working
11Use keycode for Print Screen(`KC_PSCREEN` or `KC_PSCR`) instead of `KC_SYSREQ`. Key combination of 'Alt + Print Screen' is recognized as 'System request'. 22Use keycode for Print Screen(`KC_PSCREEN` or `KC_PSCR`) instead of `KC_SYSREQ`. Key combination of 'Alt + Print Screen' is recognized as 'System request'.
12 23
diff --git a/docs/feature_common_shortcuts.md b/docs/feature_advanced_keycodes.md
index e942b26c8..95a20340e 100644
--- a/docs/feature_common_shortcuts.md
+++ b/docs/feature_advanced_keycodes.md
@@ -1,6 +1,8 @@
1# Common Keymap Shortcuts 1# Advanced Keycodes
2 2
3Your keymap can include shortcuts to common operations, for example shifted keys. This page documents the functions that are available to you. 3Your keymap can include keycodes that are more advanced than normal, for example shifted keys. This page documents the functions that are available to you.
4
5### Assigning Custom Names
4 6
5People often define custom names using `#define`. For example: 7People often define custom names using `#define`. For example:
6 8
@@ -15,7 +17,7 @@ This will allow you to use `FN_CAPS` and `ALT_TAB` in your `KEYMAP()`, keeping i
15 17
16Currently, the keycodes able to used with these functions are limited to the [Basic Keycodes](keycodes_basic.html), meaning you can't use keycodes like `KC_TILD`, or anything greater than 0xFF. For a full list of the keycodes able to be used see [Basic Keycodes](keycodes_basic.html). 18Currently, the keycodes able to used with these functions are limited to the [Basic Keycodes](keycodes_basic.html), meaning you can't use keycodes like `KC_TILD`, or anything greater than 0xFF. For a full list of the keycodes able to be used see [Basic Keycodes](keycodes_basic.html).
17 19
18## Switching and toggling layers 20# Switching and toggling layers
19 21
20These functions allow you to activate layers in various ways. 22These functions allow you to activate layers in various ways.
21 23
@@ -25,7 +27,7 @@ These functions allow you to activate layers in various ways.
25* `TO(layer)` - Goes to a layer. This code is special, because it lets you go either up or down the stack -- just goes directly to the layer you want. So while other codes only let you go _up_ the stack (from layer 0 to layer 3, for example), `TO(2)` is going to get you to layer 2, no matter where you activate it from -- even if you're currently on layer 5. This gets activated on keydown (as soon as the key is pressed). 27* `TO(layer)` - Goes to a layer. This code is special, because it lets you go either up or down the stack -- just goes directly to the layer you want. So while other codes only let you go _up_ the stack (from layer 0 to layer 3, for example), `TO(2)` is going to get you to layer 2, no matter where you activate it from -- even if you're currently on layer 5. This gets activated on keydown (as soon as the key is pressed).
26* `TT(layer)` - Layer Tap-Toggle. If you hold the key down, the layer becomes active, and then deactivates when you let go. And if you tap it, the layer simply becomes active (toggles on). It needs 5 taps by default, but you can set it by defining `TAPPING_TOGGLE`, for example, `#define TAPPING_TOGGLE 2` for just two taps. 28* `TT(layer)` - Layer Tap-Toggle. If you hold the key down, the layer becomes active, and then deactivates when you let go. And if you tap it, the layer simply becomes active (toggles on). It needs 5 taps by default, but you can set it by defining `TAPPING_TOGGLE`, for example, `#define TAPPING_TOGGLE 2` for just two taps.
27 29
28## Working With Layers 30# Working With Layers
29 31
30Care must be taken when switching layers, it's possible to lock yourself into a layer with no way to deactivate that layer (without unplugging your keyboard.) We've created some guidelines to help users avoid the most common problems. 32Care must be taken when switching layers, it's possible to lock yourself into a layer with no way to deactivate that layer (without unplugging your keyboard.) We've created some guidelines to help users avoid the most common problems.
31 33
@@ -47,7 +49,7 @@ Once you have a good feel for how layers work and what you can do, you can get m
47 49
48Layers stack on top of each other in numerical order. When determining what a keypress does, QMK scans the layers from the top down, stopping when it reaches the first active layer that is not set to `KC_TRNS`. As a result if you activate a layer that is numerically lower than your current layer, and your current layer (or another layer that is active and higher than your target layer) has something other than `KC_TRNS`, that is the key that will be sent, not the key on the layer you just activated. This is the cause of most people's "why doesn't my layer get switched" problem. 50Layers stack on top of each other in numerical order. When determining what a keypress does, QMK scans the layers from the top down, stopping when it reaches the first active layer that is not set to `KC_TRNS`. As a result if you activate a layer that is numerically lower than your current layer, and your current layer (or another layer that is active and higher than your target layer) has something other than `KC_TRNS`, that is the key that will be sent, not the key on the layer you just activated. This is the cause of most people's "why doesn't my layer get switched" problem.
49 51
50## Modifier keys 52# Modifier keys
51 53
52These functions allow you to combine a mod with a keycode. When pressed the keydown for the mod will be sent first, and then *kc* will be sent. When released the keyup for *kc* will be sent and then the mod will be sent. 54These functions allow you to combine a mod with a keycode. When pressed the keydown for the mod will be sent first, and then *kc* will be sent. When released the keyup for *kc* will be sent and then the mod will be sent.
53 55
@@ -67,7 +69,7 @@ You can also chain these, like this:
67 69
68 LALT(LCTL(KC_DEL)) -- this makes a key that sends Alt, Control, and Delete in a single keypress. 70 LALT(LCTL(KC_DEL)) -- this makes a key that sends Alt, Control, and Delete in a single keypress.
69 71
70## Shifted Keycodes 72# Shifted Keycodes
71 73
72The following shortcuts automatically add `LSFT()` to keycodes to get commonly used symbols. 74The following shortcuts automatically add `LSFT()` to keycodes to get commonly used symbols.
73 75
@@ -95,7 +97,7 @@ The following shortcuts automatically add `LSFT()` to keycodes to get commonly u
95| KC_PIPE | &#x7C; | 97| KC_PIPE | &#x7C; |
96| KC_COLN | : | 98| KC_COLN | : |
97 99
98## Mod Tap 100# Mod Tap
99 101
100`MT(mod, kc)` - is *mod* (modifier key - MOD_LCTL, MOD_LSFT) when held, and *kc* when tapped. In other words, you can have a key that sends Esc (or the letter O or whatever) when you tap it, but works as a Control key or a Shift key when you hold it down. 102`MT(mod, kc)` - is *mod* (modifier key - MOD_LCTL, MOD_LSFT) when held, and *kc* when tapped. In other words, you can have a key that sends Esc (or the letter O or whatever) when you tap it, but works as a Control key or a Shift key when you hold it down.
101 103
@@ -125,7 +127,7 @@ We've added shortcuts to make common modifier/tap (mod-tap) mappings more compac
125 * `LCAG_T(kc)` - is CtrlAltGui when held and *kc* when tapped 127 * `LCAG_T(kc)` - is CtrlAltGui when held and *kc* when tapped
126 * `MEH_T(kc)` - is like Hyper, but not as cool -- does not include the Cmd/Win key, so just sends Alt+Ctrl+Shift. 128 * `MEH_T(kc)` - is like Hyper, but not as cool -- does not include the Cmd/Win key, so just sends Alt+Ctrl+Shift.
127 129
128## One Shot Keys 130# One Shot Keys
129 131
130One shot keys are keys that remain active until the next key is pressed, and then are releasd. This allows you to type keyboard combinations without pressing more than one key at a time. 132One shot keys are keys that remain active until the next key is pressed, and then are releasd. This allows you to type keyboard combinations without pressing more than one key at a time.
131 133
diff --git a/docs/dynamic_macros.md b/docs/feature_dynamic_macros.md
index 4dd8a39e6..4dd8a39e6 100644
--- a/docs/dynamic_macros.md
+++ b/docs/feature_dynamic_macros.md
diff --git a/docs/key_lock.md b/docs/feature_key_lock.md
index e424061a9..e424061a9 100644
--- a/docs/key_lock.md
+++ b/docs/feature_key_lock.md
diff --git a/docs/macros.md b/docs/feature_macros.md
index 66d2bc090..66d2bc090 100644
--- a/docs/macros.md
+++ b/docs/feature_macros.md
diff --git a/docs/mouse_keys.md b/docs/feature_mouse_keys.md
index 560bd0470..560bd0470 100644
--- a/docs/mouse_keys.md
+++ b/docs/feature_mouse_keys.md
diff --git a/docs/space_cadet_shift.md b/docs/feature_space_cadet.md
index a1ec256de..a1ec256de 100644
--- a/docs/space_cadet_shift.md
+++ b/docs/feature_space_cadet.md
diff --git a/docs/tap_dance.md b/docs/feature_tap_dance.md
index 32dffa9cd..32dffa9cd 100644
--- a/docs/tap_dance.md
+++ b/docs/feature_tap_dance.md
diff --git a/docs/unicode.md b/docs/feature_unicode.md
index 2dfb38d96..2dfb38d96 100644
--- a/docs/unicode.md
+++ b/docs/feature_unicode.md
diff --git a/docs/features.md b/docs/features.md
index 2ef436156..afffead49 100644
--- a/docs/features.md
+++ b/docs/features.md
@@ -1,105 +1,24 @@
1# QMK Features 1# QMK Features
2 2
3 3QMK has a staggering number of features for building your keyboard. It can take some time to understand all of them and determine which one will acheive your goal.
4## Space Cadet Shift: The future, built in 4
5 5
6Steve Losh [described](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/) the Space Cadet Shift quite well. Essentially, you hit the left Shift on its own, and you get an opening parenthesis; hit the right Shift on its own, and you get the closing one. When hit with other keys, the Shift key keeps working as it always does. Yes, it's as cool as it sounds. Head on over to the [Space Cadet Shift](space_cadet_shift.md) page to read about it. 6* [Advanced Keycodes](feature_advanced_keycodes.md) - Change layers, type shifted keys, and more. Go beyond typing simple characters.
7 7* [Audio](feature_audio.md) - Connect a speaker to your keyboard for audio feedback, midi support, and music mode.
8## The Leader key: A new kind of modifier 8* [Backlight](feature_backlight.md) - LED lighting support for your keyboard
9 9* [Bootmagic](feature_bootmagic.md) - Adjust the behavior of your keyboard using hotkeys
10Most modifiers have to be held or toggled. But what if you had a key that indicated the start of a sequence? You could press that key and then rapidly press 1-3 more keys to trigger a macro, or enter a special layer, or anything else you might want to do. To learn more about it check out the [Leader Key](feature_leader_key.md) page. 10* [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself.
11 11* [Key Lock](feature_key_lock.md) - Lock a key in the "down" state.
12## Tap Dance: A single key can do 3, 5, or 100 different things 12* [Layouts](feature_layouts.md) - Use one keymap with any keyboard that supports your layout.
13 13* [Leader Key](feature_leader_key.md) - Tap the leader key followed by a sequence to trigger custom behavior.
14Hit the semicolon key once, send a semicolon. Hit it twice, rapidly -- send a colon. Hit it three times, and your keyboard's LEDs do a wild dance. That's just one example of what Tap Dance can do. Read more about it on the [Tap Dance](tap_dance.md) page. 14* [Macros](feature_macros.md) - Send multiple key presses when pressing only one physical key
15 15* [Mouse keys](feature_mouse_keys.md) - Control your mouse pointer from your keyboard
16## Temporarily setting the default layer 16* [Pointing Device](feature_pointing_device.md) - Framework for connecting your custom pointing device to your keyboard.
17 17* [PS2 Mouse](feature_ps2_mouse.md) - Driver for connecting a ps2 mouse directly to your keyboard.
18`DF(layer)` - sets default layer to _layer_. The default layer is the one at the "bottom" of the layer stack - the ultimate fallback layer. This currently does not persist over power loss. When you plug the keyboard back in, layer 0 will always be the default. It is theoretically possible to work around that, but that's not what `DF` does. 18* [Space Cadet](feature_space_cadet_shift.md) - Use your left/right shift keys to type parenthesis and brackets.
19 19* [Stenography](feature_stenography.md) - Put your keyboard into Plover mode for stenography use.
20## Macro shortcuts: Send a whole string when pressing just one key 20* [Tap Dance](feature_tap_dance.md) - Make a single key do as many things as you want
21 21* [Terminal](feature_terminal.md) - CLI interface to the internals of your keyboard
22How would you like a single keypress to send a whole word, sentence, paragraph, or even document? Head on over to the [Macros](macros.md) page to read up on all aspects of Simple and Dynamic Macros. 22* [Thermal Printer](feature_thermal_printer.md) - Connect a thermal printer to your keyboard to be able to toggle on a printed log of everything you type.
23 23* [Unicode](feature_unicode.md) - Unicode input support.
24## Additional keycode aliases for software-implemented layouts \(Colemak, Dvorak, etc\) 24* [Userspace](feature_userspace.md) - Share code between different keymaps and keyboards
25
26Everything is assuming you're in Qwerty \(in software\) by default, but there is built-in support for using a Colemak or Dvorak layout by including this at the top of your keymap:
27
28```
29#include <keymap_colemak.h>
30```
31
32If you use Dvorak, use `keymap_dvorak.h` instead of `keymap_colemak.h` for this line. After including this line, you will get access to:
33
34* `CM_*` for all of the Colemak-equivalent characters
35* `DV_*` for all of the Dvorak-equivalent characters
36
37These implementations assume you're using Colemak or Dvorak on your OS, not on your keyboard - this is referred to as a software-implemented layout. If your computer is in Qwerty and your keymap is in Colemak or Dvorak, this is referred to as a firmware-implemented layout, and you won't need these features.
38
39To give an example, if you're using software-implemented Colemak, and want to get an `F`, you would use `CM_F`. Using `KC_F` under these same circumstances would result in `T`.
40
41## Backlight Breathing
42
43In order to enable backlight breathing, the following line must be added to your config.h file.
44
45```
46#define BACKLIGHT_BREATHING
47```
48
49The following function calls are used to control the breathing effect.
50
51* `breathing_enable()` - Enable the free-running breathing effect.
52* `breathing_disable()` - Disable the free-running breathing effect immediately.
53* `breathing_self_disable()` - Disable the free-running breathing effect after the current effect ends.
54* `breathing_toggle()` - Toggle the free-running breathing effect.
55* `breathing_defaults()` - Reset the speed and brightness settings of the breathing effect.
56
57The following function calls are used to control the maximum brightness of the breathing effect.
58
59* `breathing_intensity_set(value)` - Set the brightness of the breathing effect when it is at its max value.
60* `breathing_intensity_default()` - Reset the brightness of the breathing effect to the default value based on the current backlight intensity.
61
62The following function calls are used to control the cycling speed of the breathing effect.
63
64* `breathing_speed_set(value)` - Set the speed of the breathing effect - how fast it cycles.
65* `breathing_speed_inc(value)` - Increase the speed of the breathing effect by a fixed value.
66* `breathing_speed_dec(value)` - Decrease the speed of the breathing effect by a fixed value.
67* `breathing_speed_default()` - Reset the speed of the breathing effect to the default value.
68
69The following example shows how to enable the backlight breathing effect when the FUNCTION layer macro button is pressed:
70
71```
72case MACRO_FUNCTION:
73 if (record->event.pressed)
74 {
75 breathing_speed_set(3);
76 breathing_enable();
77 layer_on(LAYER_FUNCTION);
78 }
79 else
80 {
81 breathing_speed_set(1);
82 breathing_self_disable();
83 layer_off(LAYER_FUNCTION);
84 }
85 break;
86```
87
88The following example shows how to pulse the backlight on-off-on when the RAISED layer macro button is pressed:
89
90```
91case MACRO_RAISED:
92 if (record->event.pressed)
93 {
94 layer_on(LAYER_RAISED);
95 breathing_speed_set(2);
96 breathing_pulse();
97 update_tri_layer(LAYER_LOWER, LAYER_RAISED, LAYER_ADJUST);
98 }
99 else
100 {
101 layer_off(LAYER_RAISED);
102 update_tri_layer(LAYER_LOWER, LAYER_RAISED, LAYER_ADJUST);
103 }
104 break;
105``` \ No newline at end of file
diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md
index b6f0f4ee2..29560b846 100644
--- a/docs/getting_started_make_guide.md
+++ b/docs/getting_started_make_guide.md
@@ -131,7 +131,7 @@ This consumes about 5390 bytes.
131 131
132`KEY_LOCK_ENABLE` 132`KEY_LOCK_ENABLE`
133 133
134This enables [key lock](key_lock.md). This consumes an additional 260 bytes. 134This enables [key lock](feature_key_lock.md). This consumes an additional 260 bytes.
135 135
136## Customizing Makefile options on a per-keymap basis 136## Customizing Makefile options on a per-keymap basis
137 137
diff --git a/docs/glossary.md b/docs/glossary.md
index e1103ec94..67820c7b2 100644
--- a/docs/glossary.md
+++ b/docs/glossary.md
@@ -36,7 +36,7 @@ An alternative keyboard layout developed by Dr. August Dvorak in the 1930's. A s
36## Dynamic Macro 36## Dynamic Macro
37A macro which has been recorded on the keyboard and which will be lost when the keyboard is unplugged or the computer rebooted. 37A macro which has been recorded on the keyboard and which will be lost when the keyboard is unplugged or the computer rebooted.
38 38
39* [Dynamic Macro Documentation](dynamic_macros.html) 39* [Dynamic Macro Documentation](feature_dynamic_macros.md)
40 40
41## Eclipse 41## Eclipse
42An IDE that is popular with many C developers. 42An IDE that is popular with many C developers.
@@ -93,7 +93,7 @@ A wiring pattern of columns and rows that enables the MCU to detect keypresses w
93## Macro 93## Macro
94A feature that lets you send muiltple keypress events (hid reports) after having pressed only a single key. 94A feature that lets you send muiltple keypress events (hid reports) after having pressed only a single key.
95 95
96* [Macro Documentation](macros.html) 96* [Macro Documentation](feature_macros.md)
97 97
98## MCU 98## MCU
99Microcontrol Unit, the processor that powers your keyboard. 99Microcontrol Unit, the processor that powers your keyboard.
@@ -104,7 +104,7 @@ A key that is held down while typing another key to modify the action of that ke
104## Mousekeys 104## Mousekeys
105A feature that lets you control your mouse cursor and click from your keyboard. 105A feature that lets you control your mouse cursor and click from your keyboard.
106 106
107* [Mousekeys Documentation](mouse_keys.html) 107* [Mousekeys Documentation](feature_mouse_keys.html)
108 108
109## N-Key Rollover (NKRO) 109## N-Key Rollover (NKRO)
110A term that applies to keyboards that are capable of reporting any number of key-presses at once. 110A term that applies to keyboards that are capable of reporting any number of key-presses at once.
@@ -133,7 +133,7 @@ A 1 byte number that is sent as part of a HID report over USB that represents a
133## Space Cadet Shift 133## Space Cadet Shift
134A special set of shift keys which allow you to type various types of braces by tapping the left or right shift one or more times. 134A special set of shift keys which allow you to type various types of braces by tapping the left or right shift one or more times.
135 135
136* [Space Cadet Shift Documentation](space_cadet_shift.html) 136* [Space Cadet Shift Documentation](feature_space_cadet.html)
137 137
138## Tap 138## Tap
139Pressing and releasing a key. In some situations you will need to distinguish between a key down and a key up event, and Tap always refers to both at once. 139Pressing and releasing a key. In some situations you will need to distinguish between a key down and a key up event, and Tap always refers to both at once.
@@ -141,7 +141,7 @@ Pressing and releasing a key. In some situations you will need to distinguish be
141## Tap Dance 141## Tap Dance
142A feature that lets you assign muiltple keycodes to the same key based on how many times you press it. 142A feature that lets you assign muiltple keycodes to the same key based on how many times you press it.
143 143
144* [Tap Dance Documentation](tap_dance.md) 144* [Tap Dance Documentation](feature_tap_dance.md)
145 145
146## Teensy 146## Teensy
147A low-cost AVR development board that is commonly used for hand-wired builds. A teensy is often chosen despite costing a few dollors more due to its halfkay bootloader, which makes flashing very simple. 147A low-cost AVR development board that is commonly used for hand-wired builds. A teensy is often chosen despite costing a few dollors more due to its halfkay bootloader, which makes flashing very simple.
@@ -152,7 +152,7 @@ A generic term for LEDs that light the underside of the board. These LED's typic
152## Unicode 152## Unicode
153In the larger computer world Unicode is a set of encoding schemes for representing characters in any language. As it relates to QMK it means using various OS schemes to send unicode codepoints instead of scancodes. 153In the larger computer world Unicode is a set of encoding schemes for representing characters in any language. As it relates to QMK it means using various OS schemes to send unicode codepoints instead of scancodes.
154 154
155* [Unicode Documentation](unicode.md) 155* [Unicode Documentation](feature_unicode.md)
156 156
157## Unit Testing 157## Unit Testing
158A framework for running automated tests against QMK. Unit testing helps us be confident that our changes do not break anything. 158A framework for running automated tests against QMK. Unit testing helps us be confident that our changes do not break anything.
diff --git a/docs/hardware.md b/docs/hardware.md
new file mode 100644
index 000000000..cce89c115
--- /dev/null
+++ b/docs/hardware.md
@@ -0,0 +1,8 @@
1# Hardware
2
3QMK runs on a variety of hardware. If your processor can be targetted by [LUFA](http://www.fourwalledcubicle.com/LUFA.php) or [ChibiOS](http://www.chibios.com) you can probably get QMK running on it. This section explores getting QMK running on, and communicating with, hardware of all kinds.
4
5* [Keyboard Guidelines](hardware_keyboard_guidelines.md)
6* [AVR Processors](hardware_avr.md)
7* ARM Processors (TBD)
8* [Drivers](hardware_drivers.md)
diff --git a/docs/hardware_avr.md b/docs/hardware_avr.md
new file mode 100644
index 000000000..23589e4bf
--- /dev/null
+++ b/docs/hardware_avr.md
@@ -0,0 +1,157 @@
1# Keyboards With AVR Processors
2
3This page describes the support for for AVR processors in QMK. AVR processors include the atmega32u4, atmega32u2, at90usb1286, and other processors from Atmel Corporation. AVR processors are 8-bit MCU's that are designed to be easy to work with. The most common AVR processors in keyboards have on-board USB and plenty of GPIO for supporting large keyboard matrices. They are the most popular MCU for use in keyboards today.
4
5If you have not yet you should read the [Keyboard Guidelines](hardware_keyboard_guidelines.md) to get a sense of how keyboards fit into QMK.
6
7## Adding Your AVR Keyboard to QMK
8
9QMK has a number of features to simplify working with AVR keyboards. For most keyboards you don't have to write a single line of code. To get started run the `util/new_project.sh` script:
10
11```
12$ util/new_project.sh my_awesome_keyboard
13######################################################
14# /keyboards/my_awesome_keyboard project created. To start
15# working on things, cd into keyboards/my_awesome_keyboard
16######################################################
17```
18
19This will create all the files needed to support your new keyboard, and populate the settings with default values. Now you just need to customize it for your keyboard.
20
21## `readme.md`
22
23This is where you'll describe your keyboard. Please follow the [Keyboard Readme Template](documentation_templates.md#keyboard-readmemd-template) when writing your `readme.md`. You're encouraged to place an image at the top of your `readme.md`, please use an external service such as [Imgur](http://imgur.com) to host the images.
24
25## `<keyboard>.c`
26
27This is where all the custom logic for your keyboard goes. Many keyboards do not need to put anything at all in here. You can learn more about writing custom logic in [Custom Quantum Functions](custom_quantum_functions.md).
28
29## `<keyboard>.h`
30
31This is the file you define your [Layout Macro(s)](feature_layouts.md) in. At minumum you should have a `#define LAYOUT` for your keyboard that looks something like this:
32
33```
34#define LAYOUT( \
35 k00, k01, k02, \
36 k10, k11 \
37) { \
38 { k00, k01, k02 }, \
39 { k10, KC_NO, k11 }, \
40}
41```
42
43The first half of the `LAYOUT` pre-processor macro defines the physical arrangement of keys. The second half of the macro defines the matrix the switches are connected to. This allows you to have a physical arrangement of keys that differs from the wiring matrix.
44
45Each of the `k__` variables needs to be unique, and typically they follow the format `k<row><col>`.
46
47The physical matrix (the second half) must have a number of rows equalling `MATRIX_ROWS`, and each row must have exactly `MATRIX_COLS` elements in it. If you do not have this many physical keys you can use `KC_NO` to fill in the blank spots.
48
49## `config.h`
50
51The `config.h` file is where you configure the hardware and feature set for your keyboard. There are a lot of options that can be placed in that file, too many to list there. For a complete overview of available options see the [Config Options](config_options.md) page.
52
53### Hardware Configuration
54
55
56At the top of the `config.h` you'll find USB related settings. These control how your keyboard appears to the Operating System. If you don't have a good reason to change you should leave the `VENDOR_ID` as `0xFEED`. For the `PRODUCT_ID` you should pick a number that is not yet in use.
57
58Do change the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` lines to accurately reflect your keyboard.
59
60```
61#define VENDOR_ID 0xFEED
62#define PRODUCT_ID 0x6060
63#define DEVICE_VER 0x0001
64#define MANUFACTURER You
65#define PRODUCT my_awesome_keyboard
66#define DESCRIPTION A custom keyboard
67```
68
69{% hint style='info' %}
70Note: On Windows and macOS the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` fields will be displayed in the list of USB devices. On Linux these values will not be visible in `lsusb`, since Linux takes that information from the list published by the USB-IF.
71{% endhint %}
72
73### Keyboard Matrix Configuration
74
75The next section of the `config.h` file deals with your keyboard's matrix. The first thing you should set is the matrix's size. This is usually, but not always, the same number of rows and columns as the physical key arrangement.
76
77```
78#define MATRIX_ROWS 2
79#define MATRIX_COLS 3
80```
81
82Once you've defined the size of your matrix you need to define which pins on your MCU are connected to rows and columns. To do so simply specify the names of those pins:
83
84```
85#define MATRIX_ROW_PINS { D0, D5 }
86#define MATRIX_COL_PINS { F1, F0, B0 }
87#define UNUSED_PINS
88```
89
90The number of `MATRIX_ROW_PINS` entries must be the same as the number you assigned to `MATRIX_ROWS`, and likewise for `MATRIX_COL_PINS` and `MATRIX_COLS`. You do not have to specify `UNUSED_PINS`, but you can if you want to document what pins are open.
91
92Finally, you can specify the direction your diodes point. This can be `COL2ROW`, `ROW2COL`, or `CUSTOM_MATRIX`.
93
94```
95#define DIODE_DIRECTION COL2ROW
96```
97
98### Backlight Configuration
99
100By default QMK supports backlighting on pins `B5`, `B6`, and `B7`. If you are using one of those you can simply enable it here. For more details see the [Backlight Documentation](feature_backlight.md).
101
102```
103#define BACKLIGHT_PIN B7
104#define BACKLIGHT_BREATHING
105#define BACKLIGHT_LEVELS 3
106```
107
108{% hint style='info' %}
109You can use backlighting on any pin you like, but you will have to do more work to support that. See the [Backlight Documentation](feature_backlight.md) for more details.
110{% endhint %}
111
112### Other Configuration Options
113
114There are a lot of features that can be configured or tuned in `config.h`. You should see the [Config Options](config_options.md) page for more details.
115
116## `rules.mk`
117
118You use the `rules.mk` file to tell QMK what files to build and what features to enable. If you are building around an atmega32u4 you can largely leave these defaults alone. If you are using another MCU you may have to tweak some parameters.
119
120### MCU Options
121
122These options tell the build system what CPU to build for. Be very careful if you change any of these settings, you can render your keyboard inoperable.
123
124```
125MCU = atmega32u4
126F_CPU = 16000000
127ARCH = AVR8
128F_USB = $(F_CPU)
129OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
130```
131
132### Bootloader Size
133
134The bootloader is a special section of your MCU that allows you to upgrade the code stored on the MCU. Think of it like a Rescue Partition for your keyboard. If you are using a teensy 2.0, or a device like the Ergodox EZ that uses the teensy bootloader you should set this to `512`. Most other bootloaders should be set to `4096`, but `1024` and `2048` are other possible values you may encounter.
135
136#### Teensy 2.0 Bootloader Example
137
138```
139OPT_DEFS += -DBOOTLOADER_SIZE=512
140```
141
142#### Teensy 2.0++ Bootloader Example
143
144```
145OPT_DEFS += -DBOOTLOADER_SIZE=1024
146```
147
148#### Atmel DFU Loader Example
149
150```
151OPT_DEFS += -DBOOTLOADER_SIZE=4096
152```
153
154### Build Options
155
156There are a number of features that can be turned on or off in `rules.mk`. See the [Config Options](config_options.md#feature-options) page for a detailed list and description.
157
diff --git a/docs/hardware_drivers.md b/docs/hardware_drivers.md
new file mode 100644
index 000000000..a298a8dc3
--- /dev/null
+++ b/docs/hardware_drivers.md
@@ -0,0 +1,27 @@
1# QMK Hardware Drivers
2
3QMK is used on a lot of different hardware. While support for the most common MCU's and matrix configurations is built-in there are a number of drivers that can be added to a keyboard to support additional hardware. Examples include mice and other pointing devices, i/o expanders for split keyboards, bluetooth modules, and LCD, OLED, and TFT screens.
4
5<!-- FIXME: This should talk about how drivers are integrated into QMK and how you can add your own driver.
6
7# Driver System Overview
8
9-->
10
11# Available Drivers
12
13## ProMicro (AVR only)
14
15Support for addressing pins on the ProMicro by their Arduino name rather than their AVR name. This needs to be better documented, if you are trying to do this and reading the code doesn't help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) and we can help you through the process.
16
17## SSD1306 (AVR only)
18
19Support for SSD1306 based OLED displays. This needs to be better documented, if you are trying to do this and reading the code doesn't help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) and we can help you through the process.
20
21## uGFX
22
23You can make use of uGFX within QMK to drive character and graphic LCD's, LED arrays, OLED, TFT, and other display technologies. This needs to be better documented, if you are trying to do this and reading the code doesn't help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) and we can help you through the process.
24
25## WS2812 (AVR only)
26
27Support for WS2811/WS2812{a,b,c} LED's. For more information see the [RGB Light](feature_rgblight.md) page.
diff --git a/docs/adding_a_keyboard_to_qmk.md b/docs/hardware_keyboard_guidelines.md
index 5ee2c8cca..8d348a944 100644
--- a/docs/adding_a_keyboard_to_qmk.md
+++ b/docs/hardware_keyboard_guidelines.md
@@ -1,35 +1,49 @@
1# Adding your keyboard to QMK 1# QMK Keyboard Guidelines
2 2
3We welcome all keyboard projects into QMK, but ask that you try to stick to a couple guidelines that help us keep things organised and consistent. 3We welcome all keyboard projects into QMK, but ask that you try to stick to a couple guidelines that help us keep things organised and consistent.
4 4
5## Naming your directory/project 5## Naming your keyboard/project
6 6
7All names should be lowercase alphanumeric, and separated by an underscore (`_`), but not begin with one. Your directory and your `.h` and `.c` files should have exactly the same name. All folders should follow the same format. 7All names should be lowercase alphanumeric, and separated by an underscore (`_`), but not begin with one. Your directory and your `.h` and `.c` files should have exactly the same name. All folders should follow the same format.
8 8
9## `readme.md` 9## `readme.md`
10 10
11All projects need to have a `readme.md` file that explains what the keyboard is, who made it, where it is available, and links to move information (template coming). 11All projects need to have a `readme.md` file that explains what the keyboard is, who made it, where it is available, and links to more information. Please follow the [published template](documentation_templates.md#keyboard-readmemd-template).
12 12
13## Image/Hardware files 13## Image/Hardware files
14 14
15In an effort to keep the repo size down, we're no longer accepting images of any format in the repo, with few exceptions. Hosting them elsewhere (imgur) and linking them in the readme.md is the preferred method. 15In an effort to keep the repo size down, we're no longer accepting images of any format in the repo, with few exceptions. Hosting them elsewhere (imgur) and linking them in the `readme.md` is the preferred method.
16 16
17Any sort of hardware file (plate, case, pcb) can't be stored in qmk_firmware, but we have the [qmk.fm repo](https://github.com/qmk/qmk.fm) where such files (as well as in-depth info) can be store, and viewed on [qmk.fm](http://qmk.fm). Downloadable files are stored in `/<keyboard>/` (name follows the same format as above) which are served at `http://qmk.fm/<keyboard>/`, and pages are generated from `/_pages/<keyboard>/` which are served at the same location (.md files are generated into .html files through Jekyll). Check out the `lets_split` directory for an example. 17Any sort of hardware file (plate, case, pcb) can't be stored in qmk_firmware, but we have the [qmk.fm repo](https://github.com/qmk/qmk.fm) where such files (as well as in-depth info) can be stored and viewed on [qmk.fm](http://qmk.fm). Downloadable files are stored in `/<keyboard>/` (name follows the same format as above) which are served at `http://qmk.fm/<keyboard>/`, and pages are generated from `/_pages/<keyboard>/` which are served at the same location (.md files are generated into .html files through Jekyll). Check out the `lets_split` directory for an example.
18 18
19## Non-production/handwired projects 19## Non-production/handwired projects
20 20
21We're happy to accept any project that uses QMK, including prototypes and handwired ones, but we have a separate `/keyboards/handwired/` folder for them, so the main `/keyboards/` folder doesn't get overcrowded. If a prototype project becomes a production project at some point in the future, we'd be happy to move it to the main `/keyboards/` folder! 21We're happy to accept any project that uses QMK, including prototypes and handwired ones, but we have a separate `/keyboards/handwired/` folder for them, so the main `/keyboards/` folder doesn't get overcrowded. If a prototype project becomes a production project at some point in the future, we'd be happy to move it to the main `/keyboards/` folder!
22 22
23## Warnings as errors 23## Warnings as errors
24 24
25When developing your keyboard, keep in mind that all warnings will be treated as errors - these small warnings can build-up and cause larger errors down the road (and keeping them is generally a bad practice). 25When developing your keyboard, keep in mind that all warnings will be treated as errors - these small warnings can build-up and cause larger errors down the road (and keeping them is generally a bad practice).
26 26
27## Licenses 27## Copyright Blurb
28 28
29If you're adapting your keyboard's setup from another project, but not using the same code, but sure to update the copyright header at the top of the files to show your name, in this format: 29If you're adapting your keyboard's setup from another project, but not using the same code, but sure to update the copyright header at the top of the files to show your name, in this format:
30 30
31 Copyright 2017 Your Name <your@email.com> 31 Copyright 2017 Your Name <your@email.com>
32 32
33If you are modifying someone else's code and have made only trivial changes you should leave their name in the copyright statement. If you have done significant work on the file you should add your name to theirs, like so:
34
35 Copyright 2017 Their Name <original_author@example.com> Your Name <you@example.com>
36
37The year should be the first year the file is created. If work was done to that file in later years you can reflect that by appending the second year to the first, like so:
38
39 Copyright 2015-2017 Your Name <you@example.com>
40
41## License
42
43The core of QMK is licensed under the [GNU General Public License](https://www.gnu.org/licenses/licenses.en.html). If you are shipping binaries for AVR processors you may choose either [GPLv2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html) or [GPLv3](https://www.gnu.org/licenses/gpl.html). If you are shipping binaries for ARM processors you must choose [GPL Version 3](https://www.gnu.org/licenses/gpl.html) to comply with the [ChibiOS](http://www.chibios.org) GPLv3 license.
44
45If your keyboard makes use of the [uGFX](https://ugfx.io) features within QMK you must comply with the [uGFX License](https://ugfx.io/license.html), which requires a separate commercial license before selling a device containing uGFX.
46
33## Technical details 47## Technical details
34 48
35If you're looking for more information on making your keyboard work with QMK, [check out this guide](porting_your_keyboard_to_qmk.md)! 49If you're looking for more information on making your keyboard work with QMK, [check out the hardware section](hardware.md)!
diff --git a/docs/keycodes.md b/docs/keycodes.md
index e45cb7da6..bffdbea61 100644
--- a/docs/keycodes.md
+++ b/docs/keycodes.md
@@ -187,22 +187,22 @@ When defining a [keymap](keymap.md) each key needs a valid key definition. This
187|`KC_KP_EQUAL_AS400`||Keypad Equal Sign| 187|`KC_KP_EQUAL_AS400`||Keypad Equal Sign|
188|`KC_NO`||Ignore this key. (NOOP) | 188|`KC_NO`||Ignore this key. (NOOP) |
189|`KC_TRNS`||Make this key transparent to find the key on a lower layer.| 189|`KC_TRNS`||Make this key transparent to find the key on a lower layer.|
190|[`KC_MS_UP`](mouse_keys.md)|`KC_MS_U`|Mouse Cursor Up| 190|[`KC_MS_UP`](feature_mouse_keys.md)|`KC_MS_U`|Mouse Cursor Up|
191|[`KC_MS_DOWN`](mouse_keys.md)|`KC_MS_D`|Mouse Cursor Down| 191|[`KC_MS_DOWN`](feature_mouse_keys.md)|`KC_MS_D`|Mouse Cursor Down|
192|[`KC_MS_LEFT`](mouse_keys.md)|`KC_MS_L`|Mouse Cursor Left| 192|[`KC_MS_LEFT`](feature_mouse_keys.md)|`KC_MS_L`|Mouse Cursor Left|
193|[`KC_MS_RIGHT`](mouse_keys.md)|`KC_MS_R`|Mouse Cursor Right| 193|[`KC_MS_RIGHT`](feature_mouse_keys.md)|`KC_MS_R`|Mouse Cursor Right|
194|[`KC_MS_BTN1`](mouse_keys.md)|`KC_BTN1`|Mouse Button 1| 194|[`KC_MS_BTN1`](feature_mouse_keys.md)|`KC_BTN1`|Mouse Button 1|
195|[`KC_MS_BTN2`](mouse_keys.md)|`KC_BTN2`|Mouse Button 2| 195|[`KC_MS_BTN2`](feature_mouse_keys.md)|`KC_BTN2`|Mouse Button 2|
196|[`KC_MS_BTN3`](mouse_keys.md)|`KC_BTN3`|Mouse Button 3| 196|[`KC_MS_BTN3`](feature_mouse_keys.md)|`KC_BTN3`|Mouse Button 3|
197|[`KC_MS_BTN4`](mouse_keys.md)|`KC_BTN4`|Mouse Button 4| 197|[`KC_MS_BTN4`](feature_mouse_keys.md)|`KC_BTN4`|Mouse Button 4|
198|[`KC_MS_BTN5`](mouse_keys.md)|`KC_BTN5`|Mouse Button 5| 198|[`KC_MS_BTN5`](feature_mouse_keys.md)|`KC_BTN5`|Mouse Button 5|
199|[`KC_MS_WH_UP`](mouse_keys.md)|`KC_WH_U`|Mouse Wheel Up| 199|[`KC_MS_WH_UP`](feature_mouse_keys.md)|`KC_WH_U`|Mouse Wheel Up|
200|[`KC_MS_WH_DOWN`](mouse_keys.md)|`KC_WH_D`|Mouse Wheel Down| 200|[`KC_MS_WH_DOWN`](feature_mouse_keys.md)|`KC_WH_D`|Mouse Wheel Down|
201|[`KC_MS_WH_LEFT`](mouse_keys.md)|`KC_WH_L`|Mouse Wheel Left| 201|[`KC_MS_WH_LEFT`](feature_mouse_keys.md)|`KC_WH_L`|Mouse Wheel Left|
202|[`KC_MS_WH_RIGHT`](mouse_keys.md)|`KC_WH_R`|Mouse Wheel Right| 202|[`KC_MS_WH_RIGHT`](feature_mouse_keys.md)|`KC_WH_R`|Mouse Wheel Right|
203|[`KC_MS_ACCEL0`](mouse_keys.md)|`KC_ACL0`|Mouse Acceleration 0| 203|[`KC_MS_ACCEL0`](feature_mouse_keys.md)|`KC_ACL0`|Mouse Acceleration 0|
204|[`KC_MS_ACCEL1`](mouse_keys.md)|`KC_ACL1`|Mouse Acceleration 1| 204|[`KC_MS_ACCEL1`](feature_mouse_keys.md)|`KC_ACL1`|Mouse Acceleration 1|
205|[`KC_MS_ACCEL2`](mouse_keys.md)|`KC_ACL2`|Mouse Acceleration 2| 205|[`KC_MS_ACCEL2`](feature_mouse_keys.md)|`KC_ACL2`|Mouse Acceleration 2|
206|[`RESET`](quantum_keycodes.md#qmk-keycodes)||Put the keyboard into DFU mode for flashing| 206|[`RESET`](quantum_keycodes.md#qmk-keycodes)||Put the keyboard into DFU mode for flashing|
207|[`DEBUG`](quantum_keycodes.md#qmk-keycodes)||Toggles debug mode| 207|[`DEBUG`](quantum_keycodes.md#qmk-keycodes)||Toggles debug mode|
208|[`KC_GESC`](quantum_keycodes.md#qmk-keycodes)|`GRAVE_ESC`|Acts as escape when pressed normally but when pressed with Shift or GUI will send a `~`| 208|[`KC_GESC`](quantum_keycodes.md#qmk-keycodes)|`GRAVE_ESC`|Acts as escape when pressed normally but when pressed with Shift or GUI will send a `~`|
@@ -311,5 +311,5 @@ When defining a [keymap](keymap.md) each key needs a valid key definition. This
311|[`TT(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||tap toggle? idk FIXME`| 311|[`TT(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||tap toggle? idk FIXME`|
312|[`OSM(mod)`](quantum_keycodes.md#one-shot-keys)||hold mod for one keypress| 312|[`OSM(mod)`](quantum_keycodes.md#one-shot-keys)||hold mod for one keypress|
313|[`OSL(layer)`](quantum_keycodes.md#one-shot-keys)||switch to layer for one keypress| 313|[`OSL(layer)`](quantum_keycodes.md#one-shot-keys)||switch to layer for one keypress|
314|[`UNICODE(n)`](unicode.md)|[`UC(n)`](unicode.md)|if `UNICODE_ENABLE`, this will send characters up to `0x7FFF`| 314|[`UNICODE(n)`](feature_unicode.md)|[`UC(n)`](feature_unicode.md)|if `UNICODE_ENABLE`, this will send characters up to `0x7FFF`|
315|[`X(n)`](unicode.md)||if `UNICODEMAP_ENABLE`, also sends unicode via a different method| 315|[`X(n)`](feature_unicode.md)||if `UNICODEMAP_ENABLE`, also sends unicode via a different method|
diff --git a/docs/porting_your_keyboard_to_qmk.md b/docs/porting_your_keyboard_to_qmk.md
deleted file mode 100644
index 3fa08830b..000000000
--- a/docs/porting_your_keyboard_to_qmk.md
+++ /dev/null
@@ -1,63 +0,0 @@
1# Porting your keyboard to QMK
2
3This page describes the technical details of porting an existing keyboard to QMK. If you're looking to add your keyboard to QMK, please [look through these guidelines](adding_a_keyboard_to_qmk.md)!
4
5If your keyboard is running an Atmega chip (atmega32u4 and others), it's pretty easy to get things setup for compiling your own firmware to flash onto your board. There is a `/util/new_project.sh <keyboard>` script to help get you started - you can simply pass your keyboard's name into the script, and all of the necessary files will be created. The components of each are described below.
6
7## `/keyboards/<keyboard>/config.h`
8
9The `USB Device descriptor parameter` block contains parameters are used to uniquely identify your keyboard, but they don't really matter to the machine.
10
11Your `MATRIX_ROWS` and `MATRIX_COLS` are the numbers of rows and cols in your keyboard matrix - this may be different than the number of actual rows and columns on your keyboard. There are some tricks you can pull to increase the number of keys in a given matrix, but most keyboards are pretty straight-forward.
12
13The `MATRIX_ROW_PINS` and `MATRIX_COL_PINS` are the pins your MCU uses on each row/column. Your schematic (if you have one) will have this information on it, and the values will vary depending on your setup. This is one of the most important things to double-check in getting your keyboard setup correctly.
14
15For the `DIODE_DIRECTION`, most hand-wiring guides will instruct you to wire the diodes in the `COL2ROW` position, but it's possible that they are in the other - people coming from EasyAVR often use `ROW2COL`. Nothing will function if this is incorrect.
16
17`BACKLIGHT_PIN` is the pin that your PWM-controlled backlight (if one exists) is hooked-up to. Currently only B5, B6, and B7 are supported.
18
19`BACKLIGHT_BREATHING` is a fancier backlight feature that adds breathing/pulsing/fading effects to the backlight. It uses the same timer as the normal backlight. These breathing effects must be called by code in your keymap.
20
21`BACKLIGHT_LEVELS` is how many levels exist for your backlight - max is 15, and they are computed automatically from this number.
22
23## `/keyboards/<keyboard>/rules.mk`
24
25The values at the top likely won't need to be changed, since most boards use the `atmega32u4` chip. The `BOOTLOADER_SIZE` will need to be adjusted based on your MCU type. It's defaulted to the Teensy, since that's the most common controller. Below is quoted from the `Makefile`.
26
27```
28# Boot Section Size in *bytes*
29# Teensy halfKay 512
30# Teensy++ halfKay 1024
31# Atmel DFU loader 4096
32# LUFA bootloader 4096
33# USBaspLoader 2048
34OPT_DEFS += -DBOOTLOADER_SIZE=512
35```
36
37At the bottom of the file, you'll find lots of features to turn on and off - all of these options should be set with `?=` to allow for the keymap overrides. `?=` only assigns if the variable was previously undefined. For the full documenation of these features, see the [Makefile options](getting_started_make_guide.md#makefile-options).
38
39## `/keyboards/<keyboard>/readme.md`
40
41This is where you'll describe your keyboard - please write as much as you can about it! Talking about default functionality/features is useful here. Feel free to link to external pages/sites if necessary. Images can be included here as well, as long as they're hosted elsewhere (imgur).
42
43## `/keyboards/<keyboard>/<keyboard>.c`
44
45This is where all of the custom logic for your keyboard goes - you may not need to put anything in this file, since a lot of things are configured automatically. All of the `*_kb()` functions are defined here. If you modify them, remember to keep the calls to `*_user()`, or things in the keymaps might not work. You can read more about the functions [here](custom_quantum_functions.md).
46
47## `/keyboards/<keyboard>/<keyboard>.h`
48
49Here is where you can (optionally) define your `KEYMAP` function to remap your matrix into a more readable format. With ortholinear boards, this isn't always necessary, but it can help to accomodate the dead spots on your matrix, where there are keys that take up more than one space (2u, staggering, 6.25u, etc). The example shows the difference between the physical keys, and the matrix design:
50
51```
52#define KEYMAP( \
53 k00, k01, k02, \
54 k10, k11 \
55) \
56{ \
57 { k00, k01, k02 }, \
58 { k10, KC_NO, k11 }, \
59}
60```
61
62Each of the `kxx` variables needs to be unique, and usually follows the format `k<row><col>`. You can place `KC_NO` where your dead keys are in your matrix.
63
diff --git a/docs/quantum_keycodes.md b/docs/quantum_keycodes.md
index a5160bf94..c92dff787 100644
--- a/docs/quantum_keycodes.md
+++ b/docs/quantum_keycodes.md
@@ -16,7 +16,7 @@ On this page we have documented keycodes between `0x00FF` and `0xFFFF` which are
16|`KC_LSPO`|Left shift when held, open paranthesis when tapped| 16|`KC_LSPO`|Left shift when held, open paranthesis when tapped|
17|`KC_RSPC`|Right shift when held, close paranthesis when tapped| 17|`KC_RSPC`|Right shift when held, close paranthesis when tapped|
18|`KC_LEAD`|The [leader key](feature_leader_key.md)| 18|`KC_LEAD`|The [leader key](feature_leader_key.md)|
19|`KC_LOCK`|The [lock key](key_lock.md)| 19|`KC_LOCK`|The [lock key](feature_key_lock.md)|
20|`FUNC(n)`/`F(n)`|Call `fn_action(n)` (deprecated)| 20|`FUNC(n)`/`F(n)`|Call `fn_action(n)` (deprecated)|
21|`M(n)`|to call macro n| 21|`M(n)`|to call macro n|
22|`MACROTAP(n)`|to macro-tap n idk FIXME| 22|`MACROTAP(n)`|to macro-tap n idk FIXME|
diff --git a/docs/redirects.json b/docs/redirects.json
index 11f217a7c..b84808364 100644
--- a/docs/redirects.json
+++ b/docs/redirects.json
@@ -1,12 +1,44 @@
1{ 1{
2 "redirects": [ 2 "redirects": [
3 { 3 {
4 "from": "adding_a_keyboard_to_qmk.html",
5 "to": "hardware_keyboard_guidelines.html"
6 },
7 {
4 "from": "build_environment_setup.html", 8 "from": "build_environment_setup.html",
5 "to": "getting_started_build_tools.html" 9 "to": "getting_started_build_tools.html"
6 }, 10 },
7 { 11 {
12 "from": "dynamic_macros.html",
13 "to": "feature_dynamic_macros.html"
14 },
15 {
16 "from": "feature_common_shortcuts.html",
17 "to": "feature_advanced_keycodes.html"
18 },
19 {
20 "from": "key_lock.html",
21 "to": "feature_key_lock.html"
22 },
23 {
8 "from": "make_instructions.html", 24 "from": "make_instructions.html",
9 "to": "getting_started_make_guide.html" 25 "to": "getting_started_make_guide.html"
26 },
27 {
28 "from": "porting_your_keyboard_to_qmk.html",
29 "to": "hardware_avr.html"
30 },
31 {
32 "from": "space_cadet_shift.html",
33 "to": "feature_space_cadet.html"
34 },
35 {
36 "from": "tap_dance.html",
37 "to": "feature_tap_dance.html"
38 },
39 {
40 "from": "unicode.html",
41 "to": "feature_unicode.html"
10 } 42 }
11 ] 43 ]
12} \ No newline at end of file 44}