aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorfauxpark <fauxpark@gmail.com>2017-12-09 16:56:58 +1100
committerJack Humbert <jack.humb@gmail.com>2017-12-09 10:46:11 -0500
commitbb53635f33c213e5a940edea8b07026ef89aed42 (patch)
tree7e170b424e37b7305f8be3072cd8c970f77ca073 /docs
parentaf37bb2f78c39c224c995eb57c757c63034a3d9c (diff)
downloadqmk_firmware-bb53635f33c213e5a940edea8b07026ef89aed42.tar.gz
qmk_firmware-bb53635f33c213e5a940edea8b07026ef89aed42.zip
Trim trailing whitespace
Diffstat (limited to 'docs')
-rw-r--r--docs/contributing.md6
-rw-r--r--docs/custom_quantum_functions.md8
-rw-r--r--docs/faq_build.md12
-rw-r--r--docs/faq_debug.md18
-rw-r--r--docs/faq_keymap.md4
-rw-r--r--docs/feature_advanced_keycodes.md2
-rw-r--r--docs/feature_audio.md2
-rw-r--r--docs/feature_dynamic_macros.md2
-rw-r--r--docs/feature_layouts.md4
-rw-r--r--docs/feature_macros.md4
-rw-r--r--docs/feature_ps2_mouse.md2
-rw-r--r--docs/feature_tap_dance.md8
-rw-r--r--docs/feature_terminal.md8
-rw-r--r--docs/feature_userspace.md10
-rw-r--r--docs/flashing.md6
-rw-r--r--docs/getting_started_build_tools.md6
-rw-r--r--docs/getting_started_make_guide.md12
-rw-r--r--docs/glossary.md2
-rw-r--r--docs/hand_wire.md4
-rw-r--r--docs/hardware_keyboard_guidelines.md2
-rw-r--r--docs/isp_flashing_guide.md24
-rw-r--r--docs/keycode.txt2
-rw-r--r--docs/keycodes_us_ansi_shifted.md2
-rw-r--r--docs/keymap.md14
-rw-r--r--docs/power.txt2
-rw-r--r--docs/quantum_keycodes.md2
-rw-r--r--docs/understanding_qmk.md6
-rw-r--r--docs/unit_testing.md2
28 files changed, 88 insertions, 88 deletions
diff --git a/docs/contributing.md b/docs/contributing.md
index a1534d968..0e8066f00 100644
--- a/docs/contributing.md
+++ b/docs/contributing.md
@@ -75,7 +75,7 @@ Most of our style is pretty easy to pick up on, but right now it's not entirely
75 75
76We have a few different types of changes in QMK, each requiring a different level of rigor. We'd like you to keep the following guidelines in mind no matter what type of change you're making. 76We have a few different types of changes in QMK, each requiring a different level of rigor. We'd like you to keep the following guidelines in mind no matter what type of change you're making.
77 77
78* Separate PR's into logical units. For example, do not submit one PR covering two separate features, instead submit a separate PR for each feature. 78* Separate PR's into logical units. For example, do not submit one PR covering two separate features, instead submit a separate PR for each feature.
79* Check for unnecessary whitespace with `git diff --check` before committing. 79* Check for unnecessary whitespace with `git diff --check` before committing.
80* Make sure your code change actually compiles. 80* Make sure your code change actually compiles.
81 * Keymaps: Make sure that `make keyboard:your_new_keymap` does not return an error 81 * Keymaps: Make sure that `make keyboard:your_new_keymap` does not return an error
@@ -111,7 +111,7 @@ Most first-time QMK contributors start with their personal keymaps. We try to ke
111 111
112Keyboards are the raison d'ĂȘtre for QMK. Some keyboards are community maintained, while others are maintained by the people responsible for making a particular keyboard. The `readme.md` should tell you who maintains a particular keyboard. If you have questions relating to a particular keyboard you can [Open An Issue](https://github.com/qmk/qmk_firmware/issues) and tag the maintainer in your question. 112Keyboards are the raison d'ĂȘtre for QMK. Some keyboards are community maintained, while others are maintained by the people responsible for making a particular keyboard. The `readme.md` should tell you who maintains a particular keyboard. If you have questions relating to a particular keyboard you can [Open An Issue](https://github.com/qmk/qmk_firmware/issues) and tag the maintainer in your question.
113 113
114We also ask that you follow these guidelines: 114We also ask that you follow these guidelines:
115 115
116* Write a `readme.md` using [the template](https://docs.qmk.fm/documentation_templates.html#). 116* Write a `readme.md` using [the template](https://docs.qmk.fm/documentation_templates.html#).
117* Keep the number of commits reasonable or we will squash your PR 117* Keep the number of commits reasonable or we will squash your PR
@@ -136,7 +136,7 @@ Here are some things to keep in mind when working on your feature or bug fix.
136* **Consider revisions and different chip-bases** - there are several keyboards that have revisions that allow for slightly different configurations, and even different chip-bases. Try to make a feature supported in ARM and AVR, or automatically disabled on platforms it doesn't work on. 136* **Consider revisions and different chip-bases** - there are several keyboards that have revisions that allow for slightly different configurations, and even different chip-bases. Try to make a feature supported in ARM and AVR, or automatically disabled on platforms it doesn't work on.
137* **Explain your feature** - Document it in `docs/`, either as a new file or as part of an existing file. If you don't document it other people won't be able to benefit from your hard work. 137* **Explain your feature** - Document it in `docs/`, either as a new file or as part of an existing file. If you don't document it other people won't be able to benefit from your hard work.
138 138
139We also ask that you follow these guidelines: 139We also ask that you follow these guidelines:
140 140
141* Keep the number of commits reasonable or we will squash your PR 141* Keep the number of commits reasonable or we will squash your PR
142* Do not lump keyboards or keymaps in with core changes. Submit your core changes first. 142* Do not lump keyboards or keymaps in with core changes. Submit your core changes first.
diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md
index 16faf9732..928dccc9c 100644
--- a/docs/custom_quantum_functions.md
+++ b/docs/custom_quantum_functions.md
@@ -1,6 +1,6 @@
1# How to Customize Your Keyboard's Behavior 1# How to Customize Your Keyboard's Behavior
2 2
3For a lot of people a custom keyboard is about more than sending button presses to your computer. You want to be able to do things that are more complex than simple button presses and macros. QMK has hooks that allow you to inject code, override functionality, and otherwise customize how your keyboard behaves in different situations. 3For a lot of people a custom keyboard is about more than sending button presses to your computer. You want to be able to do things that are more complex than simple button presses and macros. QMK has hooks that allow you to inject code, override functionality, and otherwise customize how your keyboard behaves in different situations.
4 4
5This page does not assume any special knowledge about QMK, but reading [Understanding QMK](understanding_qmk.md) will help you understand what is going on at a more fundamental level. 5This page does not assume any special knowledge about QMK, but reading [Understanding QMK](understanding_qmk.md) will help you understand what is going on at a more fundamental level.
6 6
@@ -66,7 +66,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
66 66
67### `process_record_*` Function Documentation 67### `process_record_*` Function Documentation
68 68
69* Keyboard/Revision: `bool process_record_kb(uint16_t keycode, keyrecord_t *record)` 69* Keyboard/Revision: `bool process_record_kb(uint16_t keycode, keyrecord_t *record)`
70* Keymap: `bool process_record_user(uint16_t keycode, keyrecord_t *record)` 70* Keymap: `bool process_record_user(uint16_t keycode, keyrecord_t *record)`
71 71
72The `keycode` argument is whatever is defined in your keymap, eg `MO(1)`, `KC_L`, etc. You should use a `switch...case` block to handle these events. 72The `keycode` argument is whatever is defined in your keymap, eg `MO(1)`, `KC_L`, etc. You should use a `switch...case` block to handle these events.
@@ -130,7 +130,7 @@ void led_set_kb(uint8_t usb_led) {
130 130
131### `led_set_*` Function Documentation 131### `led_set_*` Function Documentation
132 132
133* Keyboard/Revision: `void led_set_kb(uint8_t usb_led)` 133* Keyboard/Revision: `void led_set_kb(uint8_t usb_led)`
134* Keymap: `void led_set_user(uint8_t usb_led)` 134* Keymap: `void led_set_user(uint8_t usb_led)`
135 135
136# Matrix Initialization Code 136# Matrix Initialization Code
@@ -155,7 +155,7 @@ void matrix_init_kb(void) {
155 155
156### `matrix_init_*` Function Documentation 156### `matrix_init_*` Function Documentation
157 157
158* Keyboard/Revision: `void matrix_init_kb(void)` 158* Keyboard/Revision: `void matrix_init_kb(void)`
159* Keymap: `void matrix_init_user(void)` 159* Keymap: `void matrix_init_user(void)`
160 160
161# Matrix Scanning Code 161# Matrix Scanning Code
diff --git a/docs/faq_build.md b/docs/faq_build.md
index 0474e2746..d38ca69d0 100644
--- a/docs/faq_build.md
+++ b/docs/faq_build.md
@@ -6,7 +6,7 @@ This page covers questions about building QMK. If you have not yet you should re
6You will need proper permission to operate a device. For Linux users see udev rules below. Easy way is to use `sudo` command, if you are not familiar with this command check its manual with `man sudo` or this page on line. 6You will need proper permission to operate a device. For Linux users see udev rules below. Easy way is to use `sudo` command, if you are not familiar with this command check its manual with `man sudo` or this page on line.
7 7
8In short when your controller is ATMega32u4, 8In short when your controller is ATMega32u4,
9 9
10 $ sudo dfu-programmer atmega32u4 erase --force 10 $ sudo dfu-programmer atmega32u4 erase --force
11 $ sudo dfu-programmer atmega32u4 flash your.hex 11 $ sudo dfu-programmer atmega32u4 flash your.hex
12 $ sudo dfu-programmer atmega32u4 reset 12 $ sudo dfu-programmer atmega32u4 reset
@@ -81,11 +81,11 @@ make: *** [obj_alps64/protocol/lufa/lufa.o] Error 1
81Note that Teensy2.0++ bootloader size is 2048byte. Some Makefiles may have wrong comment. 81Note that Teensy2.0++ bootloader size is 2048byte. Some Makefiles may have wrong comment.
82 82
83``` 83```
84# Boot Section Size in *bytes* 84# Boot Section Size in *bytes*
85# Teensy halfKay 512 85# Teensy halfKay 512
86# Teensy++ halfKay 2048 86# Teensy++ halfKay 2048
87# Atmel DFU loader 4096 (TMK Alt Controller) 87# Atmel DFU loader 4096 (TMK Alt Controller)
88# LUFA bootloader 4096 88# LUFA bootloader 4096
89# USBaspLoader 2048 89# USBaspLoader 2048
90OPT_DEFS += -DBOOTLOADER_SIZE=2048 90OPT_DEFS += -DBOOTLOADER_SIZE=2048
91``` 91```
diff --git a/docs/faq_debug.md b/docs/faq_debug.md
index 25226102d..7c1690d13 100644
--- a/docs/faq_debug.md
+++ b/docs/faq_debug.md
@@ -116,12 +116,12 @@ http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad
116Properly configure bootloader size in **Makefile**. With wrong section size bootloader won't probably start with **Magic command** and **Boot Magic**. 116Properly configure bootloader size in **Makefile**. With wrong section size bootloader won't probably start with **Magic command** and **Boot Magic**.
117``` 117```
118# Size of Bootloaders in bytes: 118# Size of Bootloaders in bytes:
119# Atmel DFU loader(ATmega32U4) 4096 119# Atmel DFU loader(ATmega32U4) 4096
120# Atmel DFU loader(AT90USB128) 8192 120# Atmel DFU loader(AT90USB128) 8192
121# LUFA bootloader(ATmega32U4) 4096 121# LUFA bootloader(ATmega32U4) 4096
122# Arduino Caterina(ATmega32U4) 4096 122# Arduino Caterina(ATmega32U4) 4096
123# USBaspLoader(ATmega***) 2048 123# USBaspLoader(ATmega***) 2048
124# Teensy halfKay(ATmega32U4) 512 124# Teensy halfKay(ATmega32U4) 512
125# Teensy++ halfKay(AT90USB128) 2048 125# Teensy++ halfKay(AT90USB128) 2048
126OPT_DEFS += -DBOOTLOADER_SIZE=4096 126OPT_DEFS += -DBOOTLOADER_SIZE=4096
127``` 127```
@@ -135,14 +135,14 @@ byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286)
135 | | | | 135 | | | |
136 | | | | 136 | | | |
137 | Application | | Application | 137 | Application | | Application |
138 | | | | 138 | | | |
139 = = = = 139 = = = =
140 | | 32KB-4KB | | 128KB-8KB 140 | | 32KB-4KB | | 128KB-8KB
1410x6000 +---------------+ 0x1E000 +---------------+ 1410x6000 +---------------+ 0x1E000 +---------------+
142 | Bootloader | 4KB | Bootloader | 8KB 142 | Bootloader | 4KB | Bootloader | 8KB
1430x7FFF +---------------+ 0x1FFFF +---------------+ 1430x7FFF +---------------+ 0x1FFFF +---------------+
144 144
145 145
146byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286) 146byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286)
1470x0000 +---------------+ 0x00000 +---------------+ 1470x0000 +---------------+ 0x00000 +---------------+
148 | | | | 148 | | | |
@@ -230,7 +230,7 @@ https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034
230## Problem on BIOS (UEFI)/Resume (Sleep & Wake)/Power Cycles 230## Problem on BIOS (UEFI)/Resume (Sleep & Wake)/Power Cycles
231Some people reported their keyboard stops working on BIOS and/or after resume(power cycles). 231Some people reported their keyboard stops working on BIOS and/or after resume(power cycles).
232 232
233As of now root of its cause is not clear but some build options seem to be related. In Makefile try to disable those options like `CONSOLE_ENABLE`, `NKRO_ENABLE`, `SLEEP_LED_ENABLE` and/or others. 233As of now root of its cause is not clear but some build options seem to be related. In Makefile try to disable those options like `CONSOLE_ENABLE`, `NKRO_ENABLE`, `SLEEP_LED_ENABLE` and/or others.
234 234
235https://github.com/tmk/tmk_keyboard/issues/266 235https://github.com/tmk/tmk_keyboard/issues/266
236https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778 236https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md
index f0410fcb4..7093dec20 100644
--- a/docs/faq_keymap.md
+++ b/docs/faq_keymap.md
@@ -48,7 +48,7 @@ For Modifier keys and layer actions you have to place `KC_TRANS` on same positio
48## Mechanical Lock Switch Support 48## Mechanical Lock Switch Support
49 49
50This feature is for *mechanical lock switch* like [this Alps one](http://deskthority.net/wiki/Alps_SKCL_Lock). You can enable it by adding this to your `config.h`: 50This feature is for *mechanical lock switch* like [this Alps one](http://deskthority.net/wiki/Alps_SKCL_Lock). You can enable it by adding this to your `config.h`:
51 51
52``` 52```
53#define LOCKING_SUPPORT_ENABLE 53#define LOCKING_SUPPORT_ENABLE
54#define LOCKING_RESYNC_ENABLE 54#define LOCKING_RESYNC_ENABLE
@@ -187,7 +187,7 @@ ___TO BE IMPROVED___
187real_mods is intended to retains state of real/physical modifier key state, while 187real_mods is intended to retains state of real/physical modifier key state, while
188weak_mods retains state of virtual or temporary modifiers which should not affect state real modifier key. 188weak_mods retains state of virtual or temporary modifiers which should not affect state real modifier key.
189 189
190Let's say you hold down physical left shift key and type ACTION_MODS_KEY(LSHIFT, KC_A), 190Let's say you hold down physical left shift key and type ACTION_MODS_KEY(LSHIFT, KC_A),
191 191
192with weak_mods, 192with weak_mods,
193* (1) hold down left shift: real_mods |= MOD_BIT(LSHIFT) 193* (1) hold down left shift: real_mods |= MOD_BIT(LSHIFT)
diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md
index 3ea28ca4e..0e22154f6 100644
--- a/docs/feature_advanced_keycodes.md
+++ b/docs/feature_advanced_keycodes.md
@@ -41,7 +41,7 @@ If you are just getting started with QMK you will want to keep everything simple
41 41
42### Intermediate Users 42### Intermediate Users
43 43
44Sometimes you need more than one base layer. For example, if you want to switch between QWERTY and Dvorak, switch between layouts for different countries, or switch your layout for different videogames. Your base layers should always be the lowest numbered layers. When you have multiple base layers you should always treat them as mutually exclusive. When one base layer is on the others are off. 44Sometimes you need more than one base layer. For example, if you want to switch between QWERTY and Dvorak, switch between layouts for different countries, or switch your layout for different videogames. Your base layers should always be the lowest numbered layers. When you have multiple base layers you should always treat them as mutually exclusive. When one base layer is on the others are off.
45 45
46### Advanced Users 46### Advanced Users
47 47
diff --git a/docs/feature_audio.md b/docs/feature_audio.md
index 774e0ae5a..6b991a9af 100644
--- a/docs/feature_audio.md
+++ b/docs/feature_audio.md
@@ -49,7 +49,7 @@ It's advised that you wrap all audio features in `#ifdef AUDIO_ENABLE` / `#endif
49 49
50## Music Mode 50## Music Mode
51 51
52The music mode maps your columns to a chromatic scale, and your rows to octaves. This works best with ortholinear keyboards, but can be made to work with others. All keycodes less than `0xFF` get blocked, so you won't type while playing notes - if you have special keys/mods, those will still work. A work-around for this is to jump to a different layer with KC_NOs before (or after) enabling music mode. 52The music mode maps your columns to a chromatic scale, and your rows to octaves. This works best with ortholinear keyboards, but can be made to work with others. All keycodes less than `0xFF` get blocked, so you won't type while playing notes - if you have special keys/mods, those will still work. A work-around for this is to jump to a different layer with KC_NOs before (or after) enabling music mode.
53 53
54Recording is experimental due to some memory issues - if you experience some weird behavior, unplugging/replugging your keyboard will fix things. 54Recording is experimental due to some memory issues - if you experience some weird behavior, unplugging/replugging your keyboard will fix things.
55 55
diff --git a/docs/feature_dynamic_macros.md b/docs/feature_dynamic_macros.md
index 23fefea4c..9803557e9 100644
--- a/docs/feature_dynamic_macros.md
+++ b/docs/feature_dynamic_macros.md
@@ -52,7 +52,7 @@ For users of the earlier versions of dynamic macros: It is still possible to fin
52 52
53```c 53```c
54 uint16_t macro_kc = (keycode == MO(_DYN) ? DYN_REC_STOP : keycode); 54 uint16_t macro_kc = (keycode == MO(_DYN) ? DYN_REC_STOP : keycode);
55 55
56 if (!process_record_dynamic_macro(macro_kc, record)) { 56 if (!process_record_dynamic_macro(macro_kc, record)) {
57 return false; 57 return false;
58 } 58 }
diff --git a/docs/feature_layouts.md b/docs/feature_layouts.md
index fcfe9cd1c..24c42c09f 100644
--- a/docs/feature_layouts.md
+++ b/docs/feature_layouts.md
@@ -1,6 +1,6 @@
1# Layouts: Using a Keymap with Multiple Keyboards 1# Layouts: Using a Keymap with Multiple Keyboards
2 2
3The `layouts/` folder contains different physical key layouts that can apply to different keyboards. 3The `layouts/` folder contains different physical key layouts that can apply to different keyboards.
4 4
5``` 5```
6layouts/ 6layouts/
@@ -21,7 +21,7 @@ layouts/
21| + ... 21| + ...
22``` 22```
23 23
24The `layouts/default/` and `layouts/community/` are two examples of layout "repositories" - currently `default` will contain all of the information concerning the layout, and one default keymap named `default_<layout>`, for users to use as a reference. `community` contains all of the community keymaps, with the eventual goal of being split-off into a separate repo for users to clone into `layouts/`. QMK searches through all folders in `layouts/`, so it's possible to have multiple repositories here. 24The `layouts/default/` and `layouts/community/` are two examples of layout "repositories" - currently `default` will contain all of the information concerning the layout, and one default keymap named `default_<layout>`, for users to use as a reference. `community` contains all of the community keymaps, with the eventual goal of being split-off into a separate repo for users to clone into `layouts/`. QMK searches through all folders in `layouts/`, so it's possible to have multiple repositories here.
25 25
26Each layout folder is named (`[a-z0-9_]`) after the physical aspects of the layout, in the most generic way possible, and contains a `readme.md` with the layout to be defined by the keyboard: 26Each layout folder is named (`[a-z0-9_]`) after the physical aspects of the layout, in the most generic way possible, and contains a `readme.md` with the layout to be defined by the keyboard:
27 27
diff --git a/docs/feature_macros.md b/docs/feature_macros.md
index a9c138e81..dff692bd8 100644
--- a/docs/feature_macros.md
+++ b/docs/feature_macros.md
@@ -1,6 +1,6 @@
1# Macros 1# Macros
2 2
3Macros allow you to send multiple keystrokes when pressing just one key. QMK has a number of ways to define and use macros. These can do anything you want: type common phrases for you, copypasta, repetitive game movements, or even help you code. 3Macros allow you to send multiple keystrokes when pressing just one key. QMK has a number of ways to define and use macros. These can do anything you want: type common phrases for you, copypasta, repetitive game movements, or even help you code.
4 4
5{% hint style='danger' %} 5{% hint style='danger' %}
6**Security Note**: While it is possible to use macros to send passwords, credit card numbers, and other sensitive information it is a supremely bad idea to do so. Anyone who gets a hold of your keyboard will be able to access that information by opening a text editor. 6**Security Note**: While it is possible to use macros to send passwords, credit card numbers, and other sensitive information it is a supremely bad idea to do so. Anyone who gets a hold of your keyboard will be able to access that information by opening a text editor.
@@ -245,7 +245,7 @@ This will clear all keys besides the mods currently pressed.
245 245
246## Advanced Example: Single-Key Copy/Paste 246## Advanced Example: Single-Key Copy/Paste
247 247
248This example defines a macro which sends `Ctrl-C` when pressed down, and `Ctrl-V` when released. 248This example defines a macro which sends `Ctrl-C` when pressed down, and `Ctrl-V` when released.
249 249
250```c 250```c
251const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { 251const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
diff --git a/docs/feature_ps2_mouse.md b/docs/feature_ps2_mouse.md
index 51ae5fa26..909406e7d 100644
--- a/docs/feature_ps2_mouse.md
+++ b/docs/feature_ps2_mouse.md
@@ -135,7 +135,7 @@ These enable settings supported by the PS/2 mouse protocol: http://www.computer-
135 135
136``` 136```
137/* Use remote mode instead of the default stream mode (see link) */ 137/* Use remote mode instead of the default stream mode (see link) */
138#define PS2_MOUSE_USE_REMOTE_MODE 138#define PS2_MOUSE_USE_REMOTE_MODE
139 139
140/* Enable the scrollwheel or scroll gesture on your mouse or touchpad */ 140/* Enable the scrollwheel or scroll gesture on your mouse or touchpad */
141#define PS2_MOUSE_ENABLE_SCROLLING 141#define PS2_MOUSE_ENABLE_SCROLLING
diff --git a/docs/feature_tap_dance.md b/docs/feature_tap_dance.md
index 271d1a0f0..e31e33167 100644
--- a/docs/feature_tap_dance.md
+++ b/docs/feature_tap_dance.md
@@ -187,9 +187,9 @@ enum {
187 SINGLE_TAP = 1, 187 SINGLE_TAP = 1,
188 SINGLE_HOLD = 2, 188 SINGLE_HOLD = 2,
189 DOUBLE_TAP = 3, 189 DOUBLE_TAP = 3,
190 DOUBLE_HOLD = 4, 190 DOUBLE_HOLD = 4,
191 DOUBLE_SINGLE_TAP = 5 //send SINGLE_TAP twice - NOT DOUBLE_TAP 191 DOUBLE_SINGLE_TAP = 5 //send SINGLE_TAP twice - NOT DOUBLE_TAP
192 // Add more enums here if you want for triple, quadruple, etc. 192 // Add more enums here if you want for triple, quadruple, etc.
193}; 193};
194 194
195typedef struct { 195typedef struct {
@@ -209,14 +209,14 @@ int cur_dance (qk_tap_dance_state_t *state) {
209 if (state->interrupted) return DOUBLE_SINGLE_TAP; 209 if (state->interrupted) return DOUBLE_SINGLE_TAP;
210 else if (state->pressed) return DOUBLE_HOLD; 210 else if (state->pressed) return DOUBLE_HOLD;
211 else return DOUBLE_TAP; 211 else return DOUBLE_TAP;
212 } 212 }
213 else return 6; //magic number. At some point this method will expand to work for more presses 213 else return 6; //magic number. At some point this method will expand to work for more presses
214} 214}
215 215
216//**************** Definitions needed for quad function to work *********************// 216//**************** Definitions needed for quad function to work *********************//
217 217
218//instanalize an instance of 'tap' for the 'x' tap dance. 218//instanalize an instance of 'tap' for the 'x' tap dance.
219static tap xtap_state = { 219static tap xtap_state = {
220 .is_press_action = true, 220 .is_press_action = true,
221 .state = 0 221 .state = 0
222}; 222};
diff --git a/docs/feature_terminal.md b/docs/feature_terminal.md
index 5c805e6ca..334a46c2d 100644
--- a/docs/feature_terminal.md
+++ b/docs/feature_terminal.md
@@ -68,11 +68,11 @@ Prints out the entire keymap for a certain layer
68 68
69``` 69```
70> keymap 0 70> keymap 0
710x002b, 0x0014, 0x001a, 0x0008, 0x0015, 0x0017, 0x001c, 0x0018, 0x000c, 0x0012, 0x0013, 0x002a, 710x002b, 0x0014, 0x001a, 0x0008, 0x0015, 0x0017, 0x001c, 0x0018, 0x000c, 0x0012, 0x0013, 0x002a,
720x0029, 0x0004, 0x0016, 0x0007, 0x0009, 0x000a, 0x000b, 0x000d, 0x000e, 0x000f, 0x0033, 0x0034, 720x0029, 0x0004, 0x0016, 0x0007, 0x0009, 0x000a, 0x000b, 0x000d, 0x000e, 0x000f, 0x0033, 0x0034,
730x00e1, 0x001d, 0x001b, 0x0006, 0x0019, 0x0005, 0x0011, 0x0010, 0x0036, 0x0037, 0x0038, 0x0028, 730x00e1, 0x001d, 0x001b, 0x0006, 0x0019, 0x0005, 0x0011, 0x0010, 0x0036, 0x0037, 0x0038, 0x0028,
740x5cd6, 0x00e0, 0x00e2, 0x00e3, 0x5cd4, 0x002c, 0x002c, 0x5cd5, 0x0050, 0x0051, 0x0052, 0x004f, 740x5cd6, 0x00e0, 0x00e2, 0x00e3, 0x5cd4, 0x002c, 0x002c, 0x5cd5, 0x0050, 0x0051, 0x0052, 0x004f,
75> 75>
76``` 76```
77 77
78### `exit` 78### `exit`
diff --git a/docs/feature_userspace.md b/docs/feature_userspace.md
index 9d7737fe1..950377423 100644
--- a/docs/feature_userspace.md
+++ b/docs/feature_userspace.md
@@ -18,7 +18,7 @@ All this only happens when you build a keymap named `<name>`, like this:
18 18
19 make planck:<name> 19 make planck:<name>
20 20
21For example, 21For example,
22 22
23 make planck:jack 23 make planck:jack
24 24
@@ -32,9 +32,9 @@ Please include authorship (your name, github username, email), and optionally [a
32 32
33For a brief example, checkout `/users/_example/` , or for a more detailed examples check out [`template.h`](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/template.h) and [`template.c`](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/template.c) in `/users/drashna/` . 33For a brief example, checkout `/users/_example/` , or for a more detailed examples check out [`template.h`](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/template.h) and [`template.c`](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/template.c) in `/users/drashna/` .
34 34
35### Consolidated Macros 35### Consolidated Macros
36 36
37If you wanted to consolidate macros and other functions into your userspace for all of your keymaps, you can do that. The issue is that you then cannot call any function defined in your userspace, or it gets complicated. To better handle this, you can call the functions here and create new functions to use in individual keymaps. 37If you wanted to consolidate macros and other functions into your userspace for all of your keymaps, you can do that. The issue is that you then cannot call any function defined in your userspace, or it gets complicated. To better handle this, you can call the functions here and create new functions to use in individual keymaps.
38 38
39First, you'd want to go through all of your `keymap.c` files and replace `process_record_user` with `process_record_keymap` instead. This way, you can still use keyboard specific codes on those boards, and use your custom "global" keycodes as well. You'll also want to replace `SAFE_RANGE` with `NEW_SAFE_RANGE` so that you wont have any overlapping keycodes 39First, you'd want to go through all of your `keymap.c` files and replace `process_record_user` with `process_record_keymap` instead. This way, you can still use keyboard specific codes on those boards, and use your custom "global" keycodes as well. You'll also want to replace `SAFE_RANGE` with `NEW_SAFE_RANGE` so that you wont have any overlapping keycodes
40 40
@@ -47,7 +47,7 @@ Once you've done that, you'll want to set the keycode definitions that you need
47 47
48#include "quantum.h" 48#include "quantum.h"
49 49
50// Define all of 50// Define all of
51enum custom_keycodes { 51enum custom_keycodes {
52 KC_MAKE = SAFE_RANGE, 52 KC_MAKE = SAFE_RANGE,
53 NEW_SAFE_RANGE //use "NEW_SAFE_RANGE" for keymap specific codes 53 NEW_SAFE_RANGE //use "NEW_SAFE_RANGE" for keymap specific codes
@@ -90,6 +90,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
90} 90}
91``` 91```
92 92
93This will add a new `KC_MAKE` keycode that can be used in any of your keymaps. And this keycode will output `make <keyboard>:<keymap">`, making frequent compiling easier. And this will work with any keyboard and any keymap as it will output the current boards info, so that you don't have to type this out every time. 93This will add a new `KC_MAKE` keycode that can be used in any of your keymaps. And this keycode will output `make <keyboard>:<keymap">`, making frequent compiling easier. And this will work with any keyboard and any keymap as it will output the current boards info, so that you don't have to type this out every time.
94 94
95Additionally, this should flash the newly compiled firmware automatically, using the correct utility, based on the bootloader settings (or default to just generating the HEX file). However, it should be noted that this may not work on all systems. AVRDUDE doesn't work on WSL, namely (and will dump the HEX in the ".build" folder instead). 95Additionally, this should flash the newly compiled firmware automatically, using the correct utility, based on the bootloader settings (or default to just generating the HEX file). However, it should be noted that this may not work on all systems. AVRDUDE doesn't work on WSL, namely (and will dump the HEX in the ".build" folder instead).
diff --git a/docs/flashing.md b/docs/flashing.md
index 1adacc55c..8e1381f69 100644
--- a/docs/flashing.md
+++ b/docs/flashing.md
@@ -12,7 +12,7 @@ To ensure compatibility with the DFU bootloader, make sure this block is present
12 12
13 # Bootloader 13 # Bootloader
14 # This definition is optional, and if your keyboard supports multiple bootloaders of 14 # This definition is optional, and if your keyboard supports multiple bootloaders of
15 # different sizes, comment this out, and the correct address will be loaded 15 # different sizes, comment this out, and the correct address will be loaded
16 # automatically (+60). See bootloader.mk for all options. 16 # automatically (+60). See bootloader.mk for all options.
17 BOOTLOADER = atmel-dfu 17 BOOTLOADER = atmel-dfu
18 18
@@ -57,7 +57,7 @@ To ensure compatibility with the Caterina bootloader, make sure this block is pr
57 57
58 # Bootloader 58 # Bootloader
59 # This definition is optional, and if your keyboard supports multiple bootloaders of 59 # This definition is optional, and if your keyboard supports multiple bootloaders of
60 # different sizes, comment this out, and the correct address will be loaded 60 # different sizes, comment this out, and the correct address will be loaded
61 # automatically (+60). See bootloader.mk for all options. 61 # automatically (+60). See bootloader.mk for all options.
62 BOOTLOADER = caterina 62 BOOTLOADER = caterina
63 63
@@ -86,7 +86,7 @@ To ensure compatibility with the Halfkay bootloader, make sure this block is pre
86 86
87 # Bootloader 87 # Bootloader
88 # This definition is optional, and if your keyboard supports multiple bootloaders of 88 # This definition is optional, and if your keyboard supports multiple bootloaders of
89 # different sizes, comment this out, and the correct address will be loaded 89 # different sizes, comment this out, and the correct address will be loaded
90 # automatically (+60). See bootloader.mk for all options. 90 # automatically (+60). See bootloader.mk for all options.
91 BOOTLOADER = halfkay 91 BOOTLOADER = halfkay
92 92
diff --git a/docs/getting_started_build_tools.md b/docs/getting_started_build_tools.md
index cd92ed68a..6c8eca0de 100644
--- a/docs/getting_started_build_tools.md
+++ b/docs/getting_started_build_tools.md
@@ -78,15 +78,15 @@ In addition to the Creators Update, you need Windows 10 Subystem for Linux, so i
78### Git 78### Git
79If you already have cloned the repository on your Windows file system you can ignore this section. 79If you already have cloned the repository on your Windows file system you can ignore this section.
80 80
81You will need to clone the repository to your Windows file system using the normal Git for Windows and **not** the WSL Git. So if you haven't installed Git before, [download](https://git-scm.com/download/win) and install it. Then [set it up](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup), it's important that you setup the e-mail and user name, especially if you are planning to contribute. 81You will need to clone the repository to your Windows file system using the normal Git for Windows and **not** the WSL Git. So if you haven't installed Git before, [download](https://git-scm.com/download/win) and install it. Then [set it up](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup), it's important that you setup the e-mail and user name, especially if you are planning to contribute.
82 82
83Once Git is installed, open the Git Bash command and change the directory to where you want to clone QMK; note that you have to use forward slashes, and that your c drive is accessed like this `/c/path/to/where/you/want/to/go`. Then run `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`, this will create a new folder `qmk_firmware` as a subfolder of the current one. 83Once Git is installed, open the Git Bash command and change the directory to where you want to clone QMK; note that you have to use forward slashes, and that your c drive is accessed like this `/c/path/to/where/you/want/to/go`. Then run `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`, this will create a new folder `qmk_firmware` as a subfolder of the current one.
84 84
85### Toolchain Setup 85### Toolchain Setup
86The Toolchain setup is done through the Windows Subsystem for Linux, and the process is fully automated. If you want to do everything manually, there are no other instructions than the scripts themselves, but you can always open issues and ask for more information. 86The Toolchain setup is done through the Windows Subsystem for Linux, and the process is fully automated. If you want to do everything manually, there are no other instructions than the scripts themselves, but you can always open issues and ask for more information.
87 87
881. Open "Bash On Ubuntu On Windows" from the start menu. 881. Open "Bash On Ubuntu On Windows" from the start menu.
892. Go to the directory where you cloned `qmk_firmware`. Note that the paths start with `/mnt/` in the WSL, so you have to write for example `cd /mnt/c/path/to/qmk_firmware`. 892. Go to the directory where you cloned `qmk_firmware`. Note that the paths start with `/mnt/` in the WSL, so you have to write for example `cd /mnt/c/path/to/qmk_firmware`.
903. Run `util/wsl_install.sh` and follow the on-screen instructions. 903. Run `util/wsl_install.sh` and follow the on-screen instructions.
914. Close the Bash command window, and re-open it. 914. Close the Bash command window, and re-open it.
925. You are ready to compile and flash the firmware! 925. You are ready to compile and flash the firmware!
diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md
index ecf030d1d..39ea34a60 100644
--- a/docs/getting_started_make_guide.md
+++ b/docs/getting_started_make_guide.md
@@ -4,7 +4,7 @@ The full syntax of the `make` command is `<keyboard_folder>:<keymap>:<target>`,
4 4
5* `<keyboard_folder>` is the path of the keyboard, for example `planck` 5* `<keyboard_folder>` is the path of the keyboard, for example `planck`
6 * Use `all` to compile all keyboards 6 * Use `all` to compile all keyboards
7 * Specify the path to compile a revision, for example `planck/rev4` or `planck/rev3` 7 * Specify the path to compile a revision, for example `planck/rev4` or `planck/rev3`
8 * If the keyboard doesn't have any folders, it can be left out 8 * If the keyboard doesn't have any folders, it can be left out
9 * To compile the default folder, you can leave it out 9 * To compile the default folder, you can leave it out
10* `<keymap>` is the name of the keymap, for example `algernon` 10* `<keymap>` is the name of the keymap, for example `algernon`
@@ -14,7 +14,7 @@ The full syntax of the `make` command is `<keyboard_folder>:<keymap>:<target>`,
14The `<target>` means the following 14The `<target>` means the following
15* If no target is given, then it's the same as `all` below 15* If no target is given, then it's the same as `all` below
16* `all` compiles as many keyboard/revision/keymap combinations as specified. For example, `make planck/rev4:default` will generate a single .hex, while `make planck/rev4:all` will generate a hex for every keymap available to the planck. 16* `all` compiles as many keyboard/revision/keymap combinations as specified. For example, `make planck/rev4:default` will generate a single .hex, while `make planck/rev4:all` will generate a hex for every keymap available to the planck.
17* `dfu`, `teensy` or `dfu-util`, compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for ChibiOS keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme. 17* `dfu`, `teensy` or `dfu-util`, compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for ChibiOS keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme.
18 * **Note**: some operating systems need root access for these commands to work, so in that case you need to run for example `sudo make planck/rev4:default:dfu`. 18 * **Note**: some operating systems need root access for these commands to work, so in that case you need to run for example `sudo make planck/rev4:default:dfu`.
19* `clean`, cleans the build output folders to make sure that everything is built from scratch. Run this before normal compilation if you have some unexplainable problems. 19* `clean`, cleans the build output folders to make sure that everything is built from scratch. Run this before normal compilation if you have some unexplainable problems.
20 20
@@ -30,7 +30,7 @@ The make command itself also has some additional options, type `make --help` for
30Here are some examples commands 30Here are some examples commands
31 31
32* `make all:all` builds everything (all keyboard folders, all keymaps). Running just `make` from the `root` will also run this. 32* `make all:all` builds everything (all keyboard folders, all keymaps). Running just `make` from the `root` will also run this.
33* `make ergodox_infinity:algernon:clean` will clean the build output of the Ergodox Infinity keyboard. 33* `make ergodox_infinity:algernon:clean` will clean the build output of the Ergodox Infinity keyboard.
34* `make planck/rev4:default:dfu COLOR=false` builds and uploads the keymap without color output. 34* `make planck/rev4:default:dfu COLOR=false` builds and uploads the keymap without color output.
35 35
36## `rules.mk` Options 36## `rules.mk` Options
@@ -53,9 +53,9 @@ This allows you to use the system and audio control key codes.
53 53
54`CONSOLE_ENABLE` 54`CONSOLE_ENABLE`
55 55
56This allows you to print messages that can be read using [`hid_listen`](https://www.pjrc.com/teensy/hid_listen.html). 56This allows you to print messages that can be read using [`hid_listen`](https://www.pjrc.com/teensy/hid_listen.html).
57 57
58By default, all debug (*dprint*) print (*print*, *xprintf*), and user print (*uprint*) messages will be enabled. This will eat up a significant portion of the flash and may make the keyboard .hex file too big to program. 58By default, all debug (*dprint*) print (*print*, *xprintf*), and user print (*uprint*) messages will be enabled. This will eat up a significant portion of the flash and may make the keyboard .hex file too big to program.
59 59
60To disable debug messages (*dprint*) and reduce the .hex file size, include `#define NO_DEBUG` in your `config.h` file. 60To disable debug messages (*dprint*) and reduce the .hex file size, include `#define NO_DEBUG` in your `config.h` file.
61 61
@@ -65,7 +65,7 @@ To disable print messages (*print*, *xprintf*) and **KEEP** user print messages
65 65
66To see the text, open `hid_listen` and enjoy looking at your printed messages. 66To see the text, open `hid_listen` and enjoy looking at your printed messages.
67 67
68**NOTE:** Do not include *uprint* messages in anything other than your keymap code. It must not be used within the QMK system framework. Otherwise, you will bloat other people's .hex files. 68**NOTE:** Do not include *uprint* messages in anything other than your keymap code. It must not be used within the QMK system framework. Otherwise, you will bloat other people's .hex files.
69 69
70Consumes about 400 bytes. 70Consumes about 400 bytes.
71 71
diff --git a/docs/glossary.md b/docs/glossary.md
index 1ccd8f76c..c8c54d6de 100644
--- a/docs/glossary.md
+++ b/docs/glossary.md
@@ -167,4 +167,4 @@ The USB Host is your computer, or whatever device your keyboard is plugged into.
167 167
168# Couldn't Find the Term You're Looking For? 168# Couldn't Find the Term You're Looking For?
169 169
170[Open an issue](https://github.com/qmk/qmk_firmware/issues) with your question and the term in question could be added here. Better still, open a pull request with the definition. :) 170[Open an issue](https://github.com/qmk/qmk_firmware/issues) with your question and the term in question could be added here. Better still, open a pull request with the definition. :)
diff --git a/docs/hand_wire.md b/docs/hand_wire.md
index 4d4bd3c72..1cbc16dfe 100644
--- a/docs/hand_wire.md
+++ b/docs/hand_wire.md
@@ -133,7 +133,7 @@ Starting at the top-left switch, place the diode (with tweezers if you have them
133 │o 133 │o
134 ┌┮┐ o 134 ┌┮┐ o
135 │ │ O 135 │ │ O
136 ├── 136 ├──
137 └┬┘ 137 └┬┘
138 └───────────── 138 └─────────────
139``` 139```
@@ -150,7 +150,7 @@ When the first diode is complete, the next one will need to be soldered to both
150 │o │o 150 │o │o
151 ┌┮┐ o ┌┮┐ o 151 ┌┮┐ o ┌┮┐ o
152 │ │ O │ │ O 152 │ │ O │ │ O
153 ├── ├── 153 ├── ├──
154 └┬┘ └┬┘ 154 └┬┘ └┬┘
155 └────────────────┮───────────── 155 └────────────────┮─────────────
156``` 156```
diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md
index fcc3b75ce..0a4e2d11b 100644
--- a/docs/hardware_keyboard_guidelines.md
+++ b/docs/hardware_keyboard_guidelines.md
@@ -91,7 +91,7 @@ All key positions and rotations are specified in relation to the top-left corner
91* `RY` 91* `RY`
92 * The absolute position of the point to rotate the key around in the vertical axis. Default: `y` 92 * The absolute position of the point to rotate the key around in the vertical axis. Default: `y`
93* `KS` 93* `KS`
94 * Key Shape: define a polygon by providing a list of points, in Key Units. 94 * Key Shape: define a polygon by providing a list of points, in Key Units.
95 * **Important**: These are relative to the top-left of the key, not absolute. 95 * **Important**: These are relative to the top-left of the key, not absolute.
96 * Example ISO Enter: `[ [0,0], [1.5,0], [1.5,2], [0.25,2], [0.25,1], [0,1], [0,0] ]` 96 * Example ISO Enter: `[ [0,0], [1.5,0], [1.5,2], [0.25,2], [0.25,1], [0,1], [0,0] ]`
97 97
diff --git a/docs/isp_flashing_guide.md b/docs/isp_flashing_guide.md
index c2668c63b..8abc45486 100644
--- a/docs/isp_flashing_guide.md
+++ b/docs/isp_flashing_guide.md
@@ -17,8 +17,8 @@ If you're having trouble flashing/erasing your board, and running into cryptic e
17 atmel.c:1434: Error flashing the block: err -2. 17 atmel.c:1434: Error flashing the block: err -2.
18 ERROR 18 ERROR
19 Memory write error, use debug for more info. 19 Memory write error, use debug for more info.
20 commands.c:360: Error writing memory data. (err -4) 20 commands.c:360: Error writing memory data. (err -4)
21 21
22You're likely going to need to ISP flash your board/device to get it working again. Luckily, this process is pretty straight-forward, provided you have any extra programmable keyboard, Arduino, or Teensy 2.0/Teensy 2.0++. There are also dedicated ISP flashers available for this, but most cost >$15, and it's assumed that if you are googling this error, this is the first you've heard about ISP flashing, and don't have one readily available (whereas you might have some other AVR board). __We'll be using a Teensy 2.0 with Windows 10 in this guide__ - if you are comfortable doing this on another system, please consider editing this guide and contributing those instructions! 22You're likely going to need to ISP flash your board/device to get it working again. Luckily, this process is pretty straight-forward, provided you have any extra programmable keyboard, Arduino, or Teensy 2.0/Teensy 2.0++. There are also dedicated ISP flashers available for this, but most cost >$15, and it's assumed that if you are googling this error, this is the first you've heard about ISP flashing, and don't have one readily available (whereas you might have some other AVR board). __We'll be using a Teensy 2.0 with Windows 10 in this guide__ - if you are comfortable doing this on another system, please consider editing this guide and contributing those instructions!
23 23
24## Software Needed 24## Software Needed
@@ -37,7 +37,7 @@ This is pretty straight-forward - we'll be connecting like-things to like-things
37 Flasher B3 <-> Keyboard B3 (MISO) 37 Flasher B3 <-> Keyboard B3 (MISO)
38 Flasher VCC <-> Keyboard VCC 38 Flasher VCC <-> Keyboard VCC
39 Flasher GND <-> Keyboard GND 39 Flasher GND <-> Keyboard GND
40 40
41## The ISP Firmware 41## The ISP Firmware
42 42
43Make sure your keyboard is unplugged from any device, and plug in your Teensy. 43Make sure your keyboard is unplugged from any device, and plug in your Teensy.
@@ -51,20 +51,20 @@ Then scroll down until you see something that looks like this block of code:
51 // Configure which pins to use: 51 // Configure which pins to use:
52 52
53 // The standard pin configuration. 53 // The standard pin configuration.
54 #ifndef ARDUINO_HOODLOADER2 54 #ifndef ARDUINO_HOODLOADER2
55 55
56 #define RESET 0 // Use 0 (B0) instead of 10 56 #define RESET 0 // Use 0 (B0) instead of 10
57 #define LED_HB 11 // Use 11 (LED on the Teensy 2.0) 57 #define LED_HB 11 // Use 11 (LED on the Teensy 2.0)
58 #define LED_ERR 8 // This won't be used unless you have an LED hooked-up to 8 (D3) 58 #define LED_ERR 8 // This won't be used unless you have an LED hooked-up to 8 (D3)
59 #define LED_PMODE 7 // This won't be used unless you have an LED hooked-up to 7 (D2) 59 #define LED_PMODE 7 // This won't be used unless you have an LED hooked-up to 7 (D2)
60
61And make the changes in the last four lines. If you're using something besides the Teensy 2.0, you'll want to choose something else that makes sense for `LED_HB`. We define `RESET` as `0`/`B0` because that's what's close - if you want to use another pin for some reason, [you can use the pinouts to choose something else](https://www.pjrc.com/teensy/pinout.html).
62 60
63Once you've made your changes, you can click the Upload button (right arrow), which will open up the Teensy flasher app - you'll need to press the reset button on the Teensy the first time, but after that, it's automatic (you shouldn't be flashing this more than once, though). Once flashed, the orange LED on the Teensy will flash on and off, indicating it's ready for some action. 61And make the changes in the last four lines. If you're using something besides the Teensy 2.0, you'll want to choose something else that makes sense for `LED_HB`. We define `RESET` as `0`/`B0` because that's what's close - if you want to use another pin for some reason, [you can use the pinouts to choose something else](https://www.pjrc.com/teensy/pinout.html).
62
63Once you've made your changes, you can click the Upload button (right arrow), which will open up the Teensy flasher app - you'll need to press the reset button on the Teensy the first time, but after that, it's automatic (you shouldn't be flashing this more than once, though). Once flashed, the orange LED on the Teensy will flash on and off, indicating it's ready for some action.
64 64
65## The `.hex` File 65## The `.hex` File
66 66
67Before flashing your firmware, you're going to need to and do a little preparation. We'll be appending [this bootloader (also a .hex file)](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32u4_1_0_0.hex) to the end of our firmware by opening the original .hex file in a text editor, and removing the last line, which should be `:00000001FF` (this is an EOF message). After that's been removed, copy the entire bootloader's contents and paste it at the end of the original file, and save it. 67Before flashing your firmware, you're going to need to and do a little preparation. We'll be appending [this bootloader (also a .hex file)](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32u4_1_0_0.hex) to the end of our firmware by opening the original .hex file in a text editor, and removing the last line, which should be `:00000001FF` (this is an EOF message). After that's been removed, copy the entire bootloader's contents and paste it at the end of the original file, and save it.
68 68
69It's possible to use other bootloaders here in the same way, but __you need a bootloader__, otherwise you'll have to ISP to write new firmware to your keyboard. 69It's possible to use other bootloaders here in the same way, but __you need a bootloader__, otherwise you'll have to ISP to write new firmware to your keyboard.
70 70
@@ -75,7 +75,7 @@ Make sure your keyboard is unplugged from any device, and plug in your Teensy.
75Open `cmd` and navigate to your where your modified .hex file is. We'll pretend this file is called `main.hex`, and that your Teensy 2.0 is on the `COM3` port - if you're unsure, you can open your Device Manager, and look for `Ports > USB Serial Device`. Use that COM port here. You can confirm it's the right port with: 75Open `cmd` and navigate to your where your modified .hex file is. We'll pretend this file is called `main.hex`, and that your Teensy 2.0 is on the `COM3` port - if you're unsure, you can open your Device Manager, and look for `Ports > USB Serial Device`. Use that COM port here. You can confirm it's the right port with:
76 76
77 avrdude -c avrisp -P COM3 -p atmega32u4 77 avrdude -c avrisp -P COM3 -p atmega32u4
78 78
79and you should get something like the following output: 79and you should get something like the following output:
80 80
81 avrdude: AVR device initialized and ready to accept instructions 81 avrdude: AVR device initialized and ready to accept instructions
@@ -90,8 +90,8 @@ and you should get something like the following output:
90 90
91Since our keyboard uses an `atmega32u4` (common), that is the chip we'll specify. This is the full command: 91Since our keyboard uses an `atmega32u4` (common), that is the chip we'll specify. This is the full command:
92 92
93 avrdude -c avrisp -P COM3 -p atmega32u4 -U flash:w:main.hex:i 93 avrdude -c avrisp -P COM3 -p atmega32u4 -U flash:w:main.hex:i
94 94
95You should see a couple of progress bars, then you should see: 95You should see a couple of progress bars, then you should see:
96 96
97 avrdude: verifying ... 97 avrdude: verifying ...
@@ -100,7 +100,7 @@ You should see a couple of progress bars, then you should see:
100 avrdude: safemode: Fuses OK 100 avrdude: safemode: Fuses OK
101 101
102 avrdude done. Thank you. 102 avrdude done. Thank you.
103 103
104Which means everything should be ok! Your board may restart automatically, otherwise, unplug your Teensy and plug in your keyboard - you can leave your Teensy wired to your keyboard while testing things, but it's recommended that you desolder it/remove the wiring once you're sure everything works. 104Which means everything should be ok! Your board may restart automatically, otherwise, unplug your Teensy and plug in your keyboard - you can leave your Teensy wired to your keyboard while testing things, but it's recommended that you desolder it/remove the wiring once you're sure everything works.
105 105
106If you have any questions/problems, feel free to [open an issue](https://github.com/qmk/qmk_firmware/issues/new)! 106If you have any questions/problems, feel free to [open an issue](https://github.com/qmk/qmk_firmware/issues/new)!
diff --git a/docs/keycode.txt b/docs/keycode.txt
index 3ecf4242e..b2070f711 100644
--- a/docs/keycode.txt
+++ b/docs/keycode.txt
@@ -183,7 +183,7 @@ KC_RSHIFT KC_RSFT E5 Keyboard RightShift
183KC_RALT E6 Keyboard RightAlt 183KC_RALT E6 Keyboard RightAlt
184KC_RGUI E7 Keyboard Right GUI(Windows/Apple/Meta key) 184KC_RGUI E7 Keyboard Right GUI(Windows/Apple/Meta key)
185 185
186/* 186/*
187 * Virtual keycodes 187 * Virtual keycodes
188 */ 188 */
189/* System Control */ 189/* System Control */
diff --git a/docs/keycodes_us_ansi_shifted.md b/docs/keycodes_us_ansi_shifted.md
index 53b4cad59..5163b3bf1 100644
--- a/docs/keycodes_us_ansi_shifted.md
+++ b/docs/keycodes_us_ansi_shifted.md
@@ -1,6 +1,6 @@
1# US ANSI Shifted Symbols 1# US ANSI Shifted Symbols
2 2
3These keycodes correspond to characters that are "shifted" on a standard US ANSI keyboards. They do not have dedicated keycodes but are instead typed by holding down shift and then sending a keycode. 3These keycodes correspond to characters that are "shifted" on a standard US ANSI keyboards. They do not have dedicated keycodes but are instead typed by holding down shift and then sending a keycode.
4 4
5It's important to remember that all of these keycodes send a left shift - this may cause unintended actions if unaccounted for. The short code is preferred in most situations. 5It's important to remember that all of these keycodes send a left shift - this may cause unintended actions if unaccounted for. The short code is preferred in most situations.
6 6
diff --git a/docs/keymap.md b/docs/keymap.md
index 96d4563c0..8401ee148 100644
--- a/docs/keymap.md
+++ b/docs/keymap.md
@@ -35,8 +35,8 @@ The state of the Keymap layer is determined by two 32 bit parameters:
35 35
36Keymap layer '0' is usually `default_layer`, wither other layers initially off after booting up the firmware, although this can configured differently in `config.h`. It is useful to change `default_layer` when you completely switch a key layout, for example, if you want to switch to Colemak instead of Qwerty. 36Keymap layer '0' is usually `default_layer`, wither other layers initially off after booting up the firmware, although this can configured differently in `config.h`. It is useful to change `default_layer` when you completely switch a key layout, for example, if you want to switch to Colemak instead of Qwerty.
37 37
38 Initial state of Keymap Change base layout 38 Initial state of Keymap Change base layout
39 ----------------------- ------------------ 39 ----------------------- ------------------
40 40
41 31 31 41 31 31
42 30 30 42 30 30
@@ -98,7 +98,7 @@ At the top of the file you'll find this:
98 // Each layer gets a name for readability. 98 // Each layer gets a name for readability.
99 // The underscores don't mean anything - you can 99 // The underscores don't mean anything - you can
100 // have a layer called STUFF or any other name. 100 // have a layer called STUFF or any other name.
101 // Layer names don't all need to be of the same 101 // Layer names don't all need to be of the same
102 // length, and you can also skip them entirely 102 // length, and you can also skip them entirely
103 // and just use numbers. 103 // and just use numbers.
104 #define _BL 0 104 #define _BL 0
@@ -113,9 +113,9 @@ The main part of this file is the `keymaps[]` definition. This is where you list
113 113
114 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 114 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
115 115
116After this you'll find a list of KEYMAP() macros. A KEYMAP() is simply a list of keys to define a single layer. Typically you'll have one or more "base layers" (such as QWERTY, Dvorak, or Colemak) and then you'll layer on top of that one or more "function" layers. Due to the way layers are processed you can't overlay a "lower" layer on top of a "higher" layer. 116After this you'll find a list of KEYMAP() macros. A KEYMAP() is simply a list of keys to define a single layer. Typically you'll have one or more "base layers" (such as QWERTY, Dvorak, or Colemak) and then you'll layer on top of that one or more "function" layers. Due to the way layers are processed you can't overlay a "lower" layer on top of a "higher" layer.
117 117
118`keymaps[][MATRIX_ROWS][MATRIX_COLS]` in QMK holds the 16 bit action code (sometimes referred as the quantum keycode) in it. For the keycode representing typical keys, its high byte is 0 and its low byte is the USB HID usage ID for keyboard. 118`keymaps[][MATRIX_ROWS][MATRIX_COLS]` in QMK holds the 16 bit action code (sometimes referred as the quantum keycode) in it. For the keycode representing typical keys, its high byte is 0 and its low byte is the USB HID usage ID for keyboard.
119 119
120> TMK from which QMK was forked uses `const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS]` instead and holds the 8 bit keycode. Some keycode values are reserved to induce execution of certain action codes via the `fn_actions[]` array. 120> TMK from which QMK was forked uses `const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS]` instead and holds the 8 bit keycode. Some keycode values are reserved to induce execution of certain action codes via the `fn_actions[]` array.
121 121
@@ -153,11 +153,11 @@ Our function layer is, from a code point of view, no different from the base lay
153Some interesting things to note: 153Some interesting things to note:
154 154
155* We have used our `_______` definition to turn `KC_TRNS` into `_______`. This makes it easier to spot the keys that have changed on this layer. 155* We have used our `_______` definition to turn `KC_TRNS` into `_______`. This makes it easier to spot the keys that have changed on this layer.
156* While in this layer if you press one of the `_______` keys it will activate the key in the next lowest active layer. 156* While in this layer if you press one of the `_______` keys it will activate the key in the next lowest active layer.
157 157
158### Custom Functions 158### Custom Functions
159 159
160At the bottom of the file we've defined a single custom function. This function defines a key that sends `KC_ESC` when pressed without modifiers and `KC_GRAVE` when modifiers are held. There are a couple pieces that need to be in place for this to work, and we will go over both of them. 160At the bottom of the file we've defined a single custom function. This function defines a key that sends `KC_ESC` when pressed without modifiers and `KC_GRAVE` when modifiers are held. There are a couple pieces that need to be in place for this to work, and we will go over both of them.
161 161
162#### `fn_actions[]` 162#### `fn_actions[]`
163 163
diff --git a/docs/power.txt b/docs/power.txt
index 0abbbe48e..ff28ba0c7 100644
--- a/docs/power.txt
+++ b/docs/power.txt
@@ -21,7 +21,7 @@ MCUSR MCU Status Register
21 21
22SMCR Sleep Mode Control Register 22SMCR Sleep Mode Control Register
23 SE Sleep Enable 23 SE Sleep Enable
24 SM2:0 24 SM2:0
25 #define set_sleep_mode(mode) \ 25 #define set_sleep_mode(mode) \
26 #define SLEEP_MODE_IDLE (0) 26 #define SLEEP_MODE_IDLE (0)
27 #define SLEEP_MODE_ADC _BV(SM0) 27 #define SLEEP_MODE_ADC _BV(SM0)
diff --git a/docs/quantum_keycodes.md b/docs/quantum_keycodes.md
index 4b7ee9384..1d7fc0e12 100644
--- a/docs/quantum_keycodes.md
+++ b/docs/quantum_keycodes.md
@@ -2,7 +2,7 @@
2 2
3Quantum keycodes allow for easier customisation of your keymap than the basic ones provide, without having to define custom actions. 3Quantum keycodes allow for easier customisation of your keymap than the basic ones provide, without having to define custom actions.
4 4
5All keycodes within quantum are numbers between `0x0000` and `0xFFFF`. Within your `keymap.c` it may look like you have functions and other special cases, but ultimately the C preprocessor will translate those into a single 4 byte integer. QMK has reserved `0x0000` through `0x00FF` for standard keycodes. These are keycodes such as `KC_A`, `KC_1`, and `KC_LCTL`, which are basic keys defined in the USB HID specification. 5All keycodes within quantum are numbers between `0x0000` and `0xFFFF`. Within your `keymap.c` it may look like you have functions and other special cases, but ultimately the C preprocessor will translate those into a single 4 byte integer. QMK has reserved `0x0000` through `0x00FF` for standard keycodes. These are keycodes such as `KC_A`, `KC_1`, and `KC_LCTL`, which are basic keys defined in the USB HID specification.
6 6
7On this page we have documented keycodes between `0x00FF` and `0xFFFF` which are used to implement advanced quantum features. If you define your own custom keycodes they will be put into this range as well. 7On this page we have documented keycodes between `0x00FF` and `0xFFFF` which are used to implement advanced quantum features. If you define your own custom keycodes they will be put into this range as well.
8 8
diff --git a/docs/understanding_qmk.md b/docs/understanding_qmk.md
index 0d3d24017..13b6e2ef6 100644
--- a/docs/understanding_qmk.md
+++ b/docs/understanding_qmk.md
@@ -94,11 +94,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
94} 94}
95``` 95```
96 96
97Notice how all of these arguments match up with the first half of the `KEYMAP()` macro from the last section? This is how we take a keycode and map it to our Matrix Scan from earlier. 97Notice how all of these arguments match up with the first half of the `KEYMAP()` macro from the last section? This is how we take a keycode and map it to our Matrix Scan from earlier.
98 98
99##### State Change Detection 99##### State Change Detection
100 100
101The matrix scanning described above tells us the state of the matrix at a given moment, but your computer only wants to know about changes, it doesn't care about the current state. QMK stores the results from the last matrix scan and compares the results from this matrix to determine when a key has been pressed or released. 101The matrix scanning described above tells us the state of the matrix at a given moment, but your computer only wants to know about changes, it doesn't care about the current state. QMK stores the results from the last matrix scan and compares the results from this matrix to determine when a key has been pressed or released.
102 102
103Let's look at an example. We'll hop into the middle of a keyboard scanning loop to find that our previous scan looks like this: 103Let's look at an example. We'll hop into the middle of a keyboard scanning loop to find that our previous scan looks like this:
104 104
@@ -150,7 +150,7 @@ The `process_record()` function itself is deceptively simple, but hidden within
150 * [`bool process_auto_shift(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_auto_shift.c#L47) 150 * [`bool process_auto_shift(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_auto_shift.c#L47)
151 * [`bool process_unicode_map(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicodemap.c#L47) 151 * [`bool process_unicode_map(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicodemap.c#L47)
152 * [Identify and process quantum specific keycodes](https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum.c#L211) 152 * [Identify and process quantum specific keycodes](https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum.c#L211)
153 153
154At any step during this chain of events a function (such as `process_record_kb()`) can `return false` to halt all further processing. 154At any step during this chain of events a function (such as `process_record_kb()`) can `return false` to halt all further processing.
155 155
156<!-- 156<!--
diff --git a/docs/unit_testing.md b/docs/unit_testing.md
index 31aa79f82..06d23a9cc 100644
--- a/docs/unit_testing.md
+++ b/docs/unit_testing.md
@@ -52,7 +52,7 @@ In that model you would emulate the input, and expect a certain output from the
52 52
53Sometimes you might wonder why a variable gets changed and where, and this can be quite tricky to track down without having a debugger. It's of course possible to manually add print statements to track it, but you can also enable the variable trace feature. This works for both for variables that are changed by the code, and when the variable is changed by some memory corruption. 53Sometimes you might wonder why a variable gets changed and where, and this can be quite tricky to track down without having a debugger. It's of course possible to manually add print statements to track it, but you can also enable the variable trace feature. This works for both for variables that are changed by the code, and when the variable is changed by some memory corruption.
54 54
55To take the feature into use add `VARIABLE_TRACE=x` to the end of you make command. `x` represents the number of variables you want to trace, which is usually 1. 55To take the feature into use add `VARIABLE_TRACE=x` to the end of you make command. `x` represents the number of variables you want to trace, which is usually 1.
56 56
57Then at a suitable place in the code, call `ADD_TRACED_VARIABLE`, to begin the tracing. For example to trace all the layer changes, you can do this 57Then at a suitable place in the code, call `ADD_TRACED_VARIABLE`, to begin the tracing. For example to trace all the layer changes, you can do this
58```c 58```c