aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/README.md6
-rw-r--r--docs/_summary.md14
-rw-r--r--docs/becoming_a_qmk_collaborator.md2
-rw-r--r--docs/compatible_microcontrollers.md2
-rw-r--r--docs/config_options.md4
-rw-r--r--docs/contributing.md12
-rw-r--r--docs/custom_quantum_functions.md20
-rw-r--r--docs/eclipse.md16
-rw-r--r--docs/faq_build.md10
-rw-r--r--docs/faq_debug.md30
-rw-r--r--docs/faq_general.md3
-rw-r--r--docs/faq_keymap.md32
-rw-r--r--docs/feature_advanced_keycodes.md8
-rw-r--r--docs/feature_audio.md4
-rw-r--r--docs/feature_auto_shift.md16
-rw-r--r--docs/feature_bluetooth.md2
-rw-r--r--docs/feature_dynamic_macros.md2
-rw-r--r--docs/feature_grave_esc.md2
-rw-r--r--docs/feature_key_lock.md2
-rw-r--r--docs/feature_layouts.md6
-rw-r--r--docs/feature_leader_key.md4
-rw-r--r--docs/feature_macros.md18
-rw-r--r--docs/feature_mouse_keys.md10
-rw-r--r--docs/feature_pointing_device.md2
-rw-r--r--docs/feature_ps2_mouse.md16
-rw-r--r--docs/feature_rgblight.md2
-rw-r--r--docs/feature_space_cadet.md2
-rw-r--r--docs/feature_tap_dance.md8
-rw-r--r--docs/feature_terminal.md6
-rw-r--r--docs/feature_unicode.md5
-rw-r--r--docs/feature_userspace.md3
-rw-r--r--docs/flashing.md3
-rw-r--r--docs/getting_started_build_tools.md6
-rw-r--r--docs/getting_started_github.md2
-rw-r--r--docs/getting_started_introduction.md8
-rw-r--r--docs/getting_started_make_guide.md6
-rw-r--r--docs/getting_started_vagrant.md2
-rw-r--r--docs/glossary.md4
-rw-r--r--docs/hand_wire.md30
-rw-r--r--docs/hardware_avr.md3
-rw-r--r--docs/hardware_drivers.md6
-rw-r--r--docs/hardware_keyboard_guidelines.md12
-rw-r--r--docs/how_keyboards_work.md6
-rw-r--r--docs/isp_flashing_guide.md8
-rw-r--r--docs/keycodes_basic.md2
-rw-r--r--docs/keycodes_us_ansi_shifted.md2
-rw-r--r--docs/keymap.md6
-rw-r--r--docs/quantum_keycodes.md2
-rw-r--r--docs/unit_testing.md12
49 files changed, 191 insertions, 198 deletions
diff --git a/docs/README.md b/docs/README.md
index 065263edb..93347a42e 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -4,13 +4,13 @@
4 4
5QMK (*Quantum Mechanical Keyboard*) is an open source community that maintains QMK Firmware, QMK Flasher, qmk.fm, and these docs. QMK Firmware is a keyboard firmware based on the [tmk\_keyboard](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/). It has also been ported to ARM chips using ChibiOS. You can use it to power your own hand-wired or custom keyboard PCB. 5QMK (*Quantum Mechanical Keyboard*) is an open source community that maintains QMK Firmware, QMK Flasher, qmk.fm, and these docs. QMK Firmware is a keyboard firmware based on the [tmk\_keyboard](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/). It has also been ported to ARM chips using ChibiOS. You can use it to power your own hand-wired or custom keyboard PCB.
6 6
7## How to get it {#how-to-get-it} 7## How to Get It {#how-to-get-it}
8 8
9If you plan on contributing a keymap, keyboard, or features to QMK, the easiest thing to do is [fork the repo through Github](https://github.com/qmk/qmk_firmware#fork-destination-box), and clone your repo locally to make your changes, push them, then open a [Pull Request](https://github.com/qmk/qmk_firmware/pulls) from your fork. 9If you plan on contributing a keymap, keyboard, or features to QMK, the easiest thing to do is [fork the repo through Github](https://github.com/qmk/qmk_firmware#fork-destination-box), and clone your repo locally to make your changes, push them, then open a [Pull Request](https://github.com/qmk/qmk_firmware/pulls) from your fork.
10 10
11Otherwise, you can either download it directly ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), or clone it via git (`git@github.com:qmk/qmk_firmware.git`), or https (`https://github.com/qmk/qmk_firmware.git`). 11Otherwise, you can either download it directly ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), or clone it via git (`git@github.com:qmk/qmk_firmware.git`), or https (`https://github.com/qmk/qmk_firmware.git`).
12 12
13## How to compile {#how-to-compile} 13## How to Compile {#how-to-compile}
14 14
15Before you are able to compile, you'll need to [install an environment](getting_started_build_tools.md) for AVR or/and ARM development. Once that is complete, you'll use the `make` command to build a keyboard and keymap with the following notation: 15Before you are able to compile, you'll need to [install an environment](getting_started_build_tools.md) for AVR or/and ARM development. Once that is complete, you'll use the `make` command to build a keyboard and keymap with the following notation:
16 16
@@ -20,6 +20,6 @@ This would build the `rev4` revision of the `planck` with the `default` keymap.
20 20
21 make preonic:default 21 make preonic:default
22 22
23## How to customize {#how-to-customize} 23## How to Customize {#how-to-customize}
24 24
25QMK has lots of [features](features.md) to explore, and a good deal of [reference documentation](http://docs.qmk.fm) to dig through. Most features are taken advantage of by modifying your [keymap](keymap.md), and changing the [keycodes](keycodes.md). 25QMK has lots of [features](features.md) to explore, and a good deal of [reference documentation](http://docs.qmk.fm) to dig through. Most features are taken advantage of by modifying your [keymap](keymap.md), and changing the [keycodes](keycodes.md).
diff --git a/docs/_summary.md b/docs/_summary.md
index 10bda51c0..0192db0d7 100644
--- a/docs/_summary.md
+++ b/docs/_summary.md
@@ -1,9 +1,9 @@
1* [Getting started](README.md) 1* [Getting Started](README.md)
2 * [QMK Introduction](getting_started_introduction.md) 2 * [QMK Introduction](getting_started_introduction.md)
3 * [Install Build Tools](getting_started_build_tools.md) 3 * [Install Build Tools](getting_started_build_tools.md)
4 * Alternative: [Vagrant Guide](getting_started_vagrant.md) 4 * Alternative: [Vagrant Guide](getting_started_vagrant.md)
5 * [Build/Compile instructions](getting_started_make_guide.md) 5 * [Build/Compile Instructions](getting_started_make_guide.md)
6 * [Flashing instructions](flashing.md) 6 * [Flashing Instructions](flashing.md)
7 * [Contributing to QMK](contributing.md) 7 * [Contributing to QMK](contributing.md)
8 * [How to Use Github](getting_started_github.md) 8 * [How to Use Github](getting_started_github.md)
9 9
@@ -31,9 +31,9 @@
31 * [Layouts](feature_layouts.md) 31 * [Layouts](feature_layouts.md)
32 * [Leader Key](feature_leader_key.md) 32 * [Leader Key](feature_leader_key.md)
33 * [Macros](feature_macros.md) 33 * [Macros](feature_macros.md)
34 * [Mouse keys](feature_mouse_keys.md) 34 * [Mouse Keys](feature_mouse_keys.md)
35 * [Pointing Device](feature_pointing_device.md) 35 * [Pointing Device](feature_pointing_device.md)
36 * [PS2 Mouse](feature_ps2_mouse.md) 36 * [PS/2 Mouse](feature_ps2_mouse.md)
37 * [RGB Lighting](feature_rgblight.md) 37 * [RGB Lighting](feature_rgblight.md)
38 * [Space Cadet](feature_space_cadet.md) 38 * [Space Cadet](feature_space_cadet.md)
39 * [Stenography](feature_stenography.md) 39 * [Stenography](feature_stenography.md)
@@ -65,12 +65,12 @@
65 * [Documentation Best Practices](documentation_best_practices.md) 65 * [Documentation Best Practices](documentation_best_practices.md)
66 * [Documentation Templates](documentation_templates.md) 66 * [Documentation Templates](documentation_templates.md)
67 * [Glossary](glossary.md) 67 * [Glossary](glossary.md)
68 * [Keymap overview](keymap.md) 68 * [Keymap Overview](keymap.md)
69 * [Unit Testing](unit_testing.md) 69 * [Unit Testing](unit_testing.md)
70 70
71* For Makers and Modders 71* For Makers and Modders
72 * [Hand Wiring Guide](hand_wire.md) 72 * [Hand Wiring Guide](hand_wire.md)
73 * [ISP flashing guide](isp_flashing_guide.md) 73 * [ISP Flashing Guide](isp_flashing_guide.md)
74 74
75* For a Deeper Understanding 75* For a Deeper Understanding
76 * [How Keyboards Work](how_keyboards_work.md) 76 * [How Keyboards Work](how_keyboards_work.md)
diff --git a/docs/becoming_a_qmk_collaborator.md b/docs/becoming_a_qmk_collaborator.md
index 1427675fd..3cac63c97 100644
--- a/docs/becoming_a_qmk_collaborator.md
+++ b/docs/becoming_a_qmk_collaborator.md
@@ -4,4 +4,4 @@ A QMK collaborator is a keyboard maker/designer that is interested in helping QM
4* **Maintain the your keyboard's directory** - this may just require an initial setup to get your keyboard working, but it could also include accommodating changes made to QMK's core. 4* **Maintain the your keyboard's directory** - this may just require an initial setup to get your keyboard working, but it could also include accommodating changes made to QMK's core.
5* **Approve and merge your keyboard's keymap pull requests** - we like to encourage users to contribute their keymaps for others to see and work from when creating their own. 5* **Approve and merge your keyboard's keymap pull requests** - we like to encourage users to contribute their keymaps for others to see and work from when creating their own.
6 6
7If you feel you meet these requirements, shoot us an email at hello@qmk.fm with an introduction and some links to your keyboard! \ No newline at end of file 7If you feel you meet these requirements, shoot us an email at hello@qmk.fm with an introduction and some links to your keyboard!
diff --git a/docs/compatible_microcontrollers.md b/docs/compatible_microcontrollers.md
index 20ba620f6..6e3f8372c 100644
--- a/docs/compatible_microcontrollers.md
+++ b/docs/compatible_microcontrollers.md
@@ -22,4 +22,4 @@ You can also use any ARM processor that [ChibiOS](http://www.chibios.org) suppor
22* [Kinetis MKL26Z64](http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/kinetis-cortex-m-mcus/l-series-ultra-low-power-m0-plus/kinetis-kl2x-48-mhz-usb-ultra-low-power-microcontrollers-mcus-based-on-arm-cortex-m0-plus-core:KL2x) 22* [Kinetis MKL26Z64](http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/kinetis-cortex-m-mcus/l-series-ultra-low-power-m0-plus/kinetis-kl2x-48-mhz-usb-ultra-low-power-microcontrollers-mcus-based-on-arm-cortex-m0-plus-core:KL2x)
23* [Kinetis MK20DX128](http://www.nxp.com/assets/documents/data/en/data-sheets/K20P64M50SF0.pdf) 23* [Kinetis MK20DX128](http://www.nxp.com/assets/documents/data/en/data-sheets/K20P64M50SF0.pdf)
24* [Kinetis MK20DX128](http://www.nxp.com/assets/documents/data/en/data-sheets/K20P64M50SF0.pdf) 24* [Kinetis MK20DX128](http://www.nxp.com/assets/documents/data/en/data-sheets/K20P64M50SF0.pdf)
25* [Kinetis MK20DX256](http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/kinetis-cortex-m-mcus/k-series-performance-m4/k2x-usb/kinetis-k20-72-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-mcus-based-on-arm-cortex-m4-core:K20_72) \ No newline at end of file 25* [Kinetis MK20DX256](http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/kinetis-cortex-m-mcus/k-series-performance-m4/k2x-usb/kinetis-k20-72-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-mcus-based-on-arm-cortex-m4-core:K20_72)
diff --git a/docs/config_options.md b/docs/config_options.md
index d971f1b69..abc5e141c 100644
--- a/docs/config_options.md
+++ b/docs/config_options.md
@@ -25,7 +25,7 @@ Some keyboards have folders and sub-folders to allow for different hardware conf
25 25
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. 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.
27 27
28# The `config.h` file 28# The `config.h` File
29 29
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. The `config.h` file shouldn't be including other `config.h` files, or anything besides this: 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. The `config.h` file shouldn't be including other `config.h` files, or anything besides this:
31 31
@@ -164,7 +164,7 @@ If you define these options you will enable the associated feature, which may in
164 164
165This 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. 165This 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.
166 166
167## `rules.mk` options 167## `rules.mk` Options
168 168
169### Build Options 169### Build Options
170 170
diff --git a/docs/contributing.md b/docs/contributing.md
index c9dca9d08..05f0e5e6a 100644
--- a/docs/contributing.md
+++ b/docs/contributing.md
@@ -1,4 +1,4 @@
1# How To Contribute 1# How to Contribute
2 2
3👍🎉 First off, thanks for taking the time to read this and contribute! 🎉👍 3👍🎉 First off, thanks for taking the time to read this and contribute! 🎉👍
4 4
@@ -9,7 +9,7 @@ Third-party contributions help us grow and improve QMK. We want to make the pull
9* [General Guidelines](#general-guidelines) 9* [General Guidelines](#general-guidelines)
10* [What does the Code of Conduct mean for me?](#what-does-the-code-of-conduct-mean-for-me) 10* [What does the Code of Conduct mean for me?](#what-does-the-code-of-conduct-mean-for-me)
11 11
12## I Don't Want To Read This Whole Thing I Just Have a Question! 12## I Don't Want to Read This Whole Thing! I Just Have a Question!
13 13
14If you'd like to ask questions about QMK you can do so on the [OLKB Subreddit](https://reddit.com/r/olkb) or on [Gitter](https://gitter.im/qmk/qmk_firmware). 14If you'd like to ask questions about QMK you can do so on the [OLKB Subreddit](https://reddit.com/r/olkb) or on [Gitter](https://gitter.im/qmk/qmk_firmware).
15 15
@@ -27,7 +27,7 @@ QMK is largely written in C, with specific features and parts written in C++. It
27 27
28<!-- FIXME: We should include a list of resources for learning C here. --> 28<!-- FIXME: We should include a list of resources for learning C here. -->
29 29
30# Where can I go for help? 30# Where Can I Go for Help?
31 31
32If you need help you can [open an issue](https://github.com/qmk/qmk_firmware/issues) or [chat on gitter](http://gitter.im/QMK/qmk_firmware). 32If you need help you can [open an issue](https://github.com/qmk/qmk_firmware/issues) or [chat on gitter](http://gitter.im/QMK/qmk_firmware).
33 33
@@ -52,7 +52,7 @@ Never made an open source contribution before? Wondering how contributions work
5214. Make changes to the pull request if the reviewing maintainer recommends them. 5214. Make changes to the pull request if the reviewing maintainer recommends them.
5315. Celebrate your success after your pull request is merged! 5315. Celebrate your success after your pull request is merged!
54 54
55# Coding conventions 55# Coding Conventions
56 56
57Most of our style is pretty easy to pick up on, but right now it's not entirely consistent. You should match the style of the code surrounding your change, but if that code is inconsistent or unclear use the following guidelines: 57Most of our style is pretty easy to pick up on, but right now it's not entirely consistent. You should match the style of the code surrounding your change, but if that code is inconsistent or unclear use the following guidelines:
58 58
@@ -64,7 +64,7 @@ Most of our style is pretty easy to pick up on, but right now it's not entirely
64 * Optional Braces: Always include optional braces. 64 * Optional Braces: Always include optional braces.
65 * Good: if (condition) { return false; } 65 * Good: if (condition) { return false; }
66 * Bad: if (condition) return false; 66 * Bad: if (condition) return false;
67* We use C style comments: /* */ 67* We use C style comments: `/* */`
68 * Think of them as a story describing the feature 68 * Think of them as a story describing the feature
69 * Use them liberally to explain why particular decisions were made. 69 * Use them liberally to explain why particular decisions were made.
70 * Do not write obvious comments 70 * Do not write obvious comments
@@ -147,6 +147,6 @@ We also ask that you follow these guidelines:
147 147
148To maintain a clear vision of how things are laid out in QMK we try to plan out refactors in-depth and have a collaborator make the changes. If you have an idea for refactoring, or suggestions, [open an issue](https://github.com/qmk/qmk_firmware/issues), we'd love to talk about how QMK can be improved. 148To maintain a clear vision of how things are laid out in QMK we try to plan out refactors in-depth and have a collaborator make the changes. If you have an idea for refactoring, or suggestions, [open an issue](https://github.com/qmk/qmk_firmware/issues), we'd love to talk about how QMK can be improved.
149 149
150# What does the Code of Conduct mean for me? 150# What Does the Code of Conduct Mean for Me?
151 151
152Our [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. 152Our [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/custom_quantum_functions.md b/docs/custom_quantum_functions.md
index dabb3fc68..6e869b732 100644
--- a/docs/custom_quantum_functions.md
+++ b/docs/custom_quantum_functions.md
@@ -1,4 +1,4 @@
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
@@ -34,13 +34,13 @@ enum my_keycodes {
34}; 34};
35``` 35```
36 36
37## Programming The Behavior Of Any Keycode 37## Programming the Behavior of Any Keycode
38 38
39When you want to override the behavior of an existing key, or define the behavior for a new key, you should use the `process_record_kb()` and `process_record_user()` functions. These are called by QMK during key processing before the actual key event is handled. If these functions return `true` QMK will process the keycodes as usual. That can be handy for extending the functionality of a key rather than replacing it. If these functions return `false` QMK will skip the normal key handling, and it will be up you to send any key up or down events that are required. 39When you want to override the behavior of an existing key, or define the behavior for a new key, you should use the `process_record_kb()` and `process_record_user()` functions. These are called by QMK during key processing before the actual key event is handled. If these functions return `true` QMK will process the keycodes as usual. That can be handy for extending the functionality of a key rather than replacing it. If these functions return `false` QMK will skip the normal key handling, and it will be up you to send any key up or down events that are required.
40 40
41These function are called every time a key is pressed or released. 41These function are called every time a key is pressed or released.
42 42
43### Example `process_record_user()` implementation 43### Example `process_record_user()` Implementation
44 44
45This example does two things. It defines the behavior for a custom keycode called `FOO`, and it supplements our Enter key by playing a tone whenever it is pressed. 45This example does two things. It defines the behavior for a custom keycode called `FOO`, and it supplements our Enter key by playing a tone whenever it is pressed.
46 46
@@ -64,7 +64,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
64} 64}
65``` 65```
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)`
@@ -96,7 +96,7 @@ This allows you to control the 5 LED's defined as part of the USB Keyboard spec.
96* `USB_LED_COMPOSE` 96* `USB_LED_COMPOSE`
97* `USB_LED_KANA` 97* `USB_LED_KANA`
98 98
99### Example `led_set_kb()` implementation 99### Example `led_set_kb()` Implementation
100 100
101``` 101```
102void led_set_kb(uint8_t usb_led) { 102void led_set_kb(uint8_t usb_led) {
@@ -128,7 +128,7 @@ void led_set_kb(uint8_t usb_led) {
128} 128}
129``` 129```
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)`
@@ -137,7 +137,7 @@ void led_set_kb(uint8_t usb_led) {
137 137
138Before a keyboard can be used the hardware must be initialized. QMK handles initialization of the keyboard matrix itself, but if you have other hardware like LED's or i&#xb2;c controllers you will need to set up that hardware before it can be used. 138Before a keyboard can be used the hardware must be initialized. QMK handles initialization of the keyboard matrix itself, but if you have other hardware like LED's or i&#xb2;c controllers you will need to set up that hardware before it can be used.
139 139
140### Example `matrix_init_kb()` implementation 140### Example `matrix_init_kb()` Implementation
141 141
142This example, at the keyboard level, sets up B1, B2, and B3 as LED pins. 142This example, at the keyboard level, sets up B1, B2, and B3 as LED pins.
143 143
@@ -153,7 +153,7 @@ void matrix_init_kb(void) {
153} 153}
154``` 154```
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)`
@@ -162,11 +162,11 @@ void matrix_init_kb(void) {
162 162
163Whenever possible you should customize your keyboard by using `process_record_*()` and hooking into events that way, to ensure that your code does not have a negative performance impact on your keyboard. However, in rare cases it is necessary to hook into the matrix scanning. Be extremely careful with the performance of code in these functions, as it will be called at least 10 times per second. 163Whenever possible you should customize your keyboard by using `process_record_*()` and hooking into events that way, to ensure that your code does not have a negative performance impact on your keyboard. However, in rare cases it is necessary to hook into the matrix scanning. Be extremely careful with the performance of code in these functions, as it will be called at least 10 times per second.
164 164
165### Example `matrix_scan_*` implementation 165### Example `matrix_scan_*` Implementation
166 166
167This example has been deliberately omitted. You should understand enough about QMK internals to write this without an example before hooking into such a performance sensitive area. If you need help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) or [chat with us on gitter](https://gitter.im/qmk/qmk_firmware). 167This example has been deliberately omitted. You should understand enough about QMK internals to write this without an example before hooking into such a performance sensitive area. If you need help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) or [chat with us on gitter](https://gitter.im/qmk/qmk_firmware).
168 168
169### `matrix_scan_*` Function documentation 169### `matrix_scan_*` Function Documentation
170 170
171* Keyboard/Revision: `void matrix_scan_kb(void)` 171* Keyboard/Revision: `void matrix_scan_kb(void)`
172* Keymap: `void matrix_scan_user(void)` 172* Keymap: `void matrix_scan_user(void)`
diff --git a/docs/eclipse.md b/docs/eclipse.md
index a63b84607..c51df522d 100644
--- a/docs/eclipse.md
+++ b/docs/eclipse.md
@@ -1,4 +1,4 @@
1# Setting Up Eclipse for QMK Development 1# Setting up Eclipse for QMK Development
2 2
3[Eclipse](https://en.wikipedia.org/wiki/Eclipse_(software)) is an open-source [Integrated Development Environment](https://en.wikipedia.org/wiki/Integrated_development_environment) (IDE) widely used for Java development, but with an extensible plugin system that allows to customize it for other languages and usages. 3[Eclipse](https://en.wikipedia.org/wiki/Eclipse_(software)) is an open-source [Integrated Development Environment](https://en.wikipedia.org/wiki/Integrated_development_environment) (IDE) widely used for Java development, but with an extensible plugin system that allows to customize it for other languages and usages.
4 4
@@ -16,16 +16,16 @@ The purpose of the is page is to document how to set-up Eclipse for developing A
16Note that this set-up has been tested on Ubuntu 16.04 only for the moment. 16Note that this set-up has been tested on Ubuntu 16.04 only for the moment.
17 17
18# Prerequisites 18# Prerequisites
19## Build environment 19## Build Environment
20Before starting, you must have followed the [Getting Started](home.md#getting-started) section corresponding to your system. In particular, you must have been able to build the firmware with [the `make` command](../#the-make-command). 20Before starting, you must have followed the [Getting Started](home.md#getting-started) section corresponding to your system. In particular, you must have been able to build the firmware with [the `make` command](../#the-make-command).
21 21
22## Java 22## Java
23Eclipse is a Java application, so you will need to install Java 8 or more recent to be able to run it. You may choose between the JRE or the JDK, the latter being useful if you intend to do Java development. 23Eclipse is a Java application, so you will need to install Java 8 or more recent to be able to run it. You may choose between the JRE or the JDK, the latter being useful if you intend to do Java development.
24 24
25# Install Eclipse and its plugins 25# Install Eclipse and Its Plugins
26Eclipse comes in [several flavours](http://www.eclipse.org/downloads/eclipse-packages/) depending on the target usage that you will have. There is no package comprising the AVR stack, so we will need to start from Eclipse CDT (C/C++ Development Tooling) and install the necessary plugins. 26Eclipse comes in [several flavours](http://www.eclipse.org/downloads/eclipse-packages/) depending on the target usage that you will have. There is no package comprising the AVR stack, so we will need to start from Eclipse CDT (C/C++ Development Tooling) and install the necessary plugins.
27 27
28## Download and install Eclipse CDT 28## Download and Install Eclipse CDT
29If you already have Eclipse CDT on your system, you can skip this step. However it is advised to keep it up-to-date for better support. 29If you already have Eclipse CDT on your system, you can skip this step. However it is advised to keep it up-to-date for better support.
30 30
31If you have another Eclipse package installed, it is normally possible to [install the CDT plugin over it](https://eclipse.org/cdt/downloads.php). However it is probably better to reinstall it from scratch to keep it light and avoid the clutter of tools that you don't need for the projects you will be working on. 31If you have another Eclipse package installed, it is normally possible to [install the CDT plugin over it](https://eclipse.org/cdt/downloads.php). However it is probably better to reinstall it from scratch to keep it light and avoid the clutter of tools that you don't need for the projects you will be working on.
@@ -41,10 +41,10 @@ When you are prompted with the Workspace Selector, select a directory that will
41 41
42Once started, click the <kbd>Workbench</kbd> button at the top right to switch to the workbench view (there is a also checkbox at the bottom to skip the welcome screen at startup). 42Once started, click the <kbd>Workbench</kbd> button at the top right to switch to the workbench view (there is a also checkbox at the bottom to skip the welcome screen at startup).
43 43
44## Install the necessary plugins 44## Install the Necessary Plugins
45Note: you do not need to restart Eclipse after installing each plugin. Simply restart once all plugins are installed. 45Note: you do not need to restart Eclipse after installing each plugin. Simply restart once all plugins are installed.
46 46
47### [The AVR plugin](http://avr-eclipse.sourceforge.net/) 47### [The AVR Plugin](http://avr-eclipse.sourceforge.net/)
48This is the most important plugin as it will allow Eclipse to _understand_ AVR C code. Follow [the instructions for using the update site](http://avr-eclipse.sourceforge.net/wiki/index.php/Plugin_Download#Update_Site), and agree with the security warning for unsigned content. 48This is the most important plugin as it will allow Eclipse to _understand_ AVR C code. Follow [the instructions for using the update site](http://avr-eclipse.sourceforge.net/wiki/index.php/Plugin_Download#Update_Site), and agree with the security warning for unsigned content.
49 49
50### [ANSI Escape in Console](https://marketplace.eclipse.org/content/ansi-escape-console) 50### [ANSI Escape in Console](https://marketplace.eclipse.org/content/ansi-escape-console)
@@ -58,7 +58,7 @@ This plugin is necessary to properly display the colored build output generated
58Once both plugins are installed, restart Eclipse as prompted. 58Once both plugins are installed, restart Eclipse as prompted.
59 59
60# Configure Eclipse for QMK 60# Configure Eclipse for QMK
61## Importing the project 61## Importing the Project
621. Click <kbd><kbd>File</kbd> > <kbd>New</kbd> > <kbd>Makefile Project with Existing Code</kbd></kbd> 621. Click <kbd><kbd>File</kbd> > <kbd>New</kbd> > <kbd>Makefile Project with Existing Code</kbd></kbd>
632. On the next screen: 632. On the next screen:
64 * Select the directory where you cloned the repository as _Existing Code Location_; 64 * Select the directory where you cloned the repository as _Existing Code Location_;
@@ -72,7 +72,7 @@ Once both plugins are installed, restart Eclipse as prompted.
72 72
73¹ There might be issues for importing the project with a custom name. If it does not work properly, try leaving the default project name (i.e. the name of the directory, probably `qmk_firmware`). 73¹ There might be issues for importing the project with a custom name. If it does not work properly, try leaving the default project name (i.e. the name of the directory, probably `qmk_firmware`).
74 74
75## Build your keyboard 75## Build Your Keyboard
76We will now configure a make target that cleans the project and builds the keymap of your choice. 76We will now configure a make target that cleans the project and builds the keymap of your choice.
77 77
781. On the right side of the screen, select the <kbd>Make Target</kbd> tab 781. On the right side of the screen, select the <kbd>Make Target</kbd> tab
diff --git a/docs/faq_build.md b/docs/faq_build.md
index c49a82a31..0474e2746 100644
--- a/docs/faq_build.md
+++ b/docs/faq_build.md
@@ -2,7 +2,7 @@
2 2
3This page covers questions about building QMK. If you have not yet you should read the [Build Environment Setup](getting_started_build_tools.md) and [Make Instructions](getting_started_make_guide.md) guides. 3This page covers questions about building QMK. If you have not yet you should read the [Build Environment Setup](getting_started_build_tools.md) and [Make Instructions](getting_started_make_guide.md) guides.
4 4
5## Can't program on Linux 5## Can't Program on Linux
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,
@@ -17,7 +17,7 @@ or just
17 17
18But to run `make` with root privilege is not good idea. Use former method if possible. 18But to run `make` with root privilege is not good idea. Use former method if possible.
19 19
20## WINAVR is obsolete 20## WINAVR is Obsolete
21It is no longer recommended and may cause some problem. 21It is no longer recommended and may cause some problem.
22See [TMK Issue #99](https://github.com/tmk/tmk_keyboard/issues/99). 22See [TMK Issue #99](https://github.com/tmk/tmk_keyboard/issues/99).
23 23
@@ -33,7 +33,7 @@ You can buy a really unique VID:PID here. I don't think you need this for person
33- http://www.obdev.at/products/vusb/license.html 33- http://www.obdev.at/products/vusb/license.html
34- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1 34- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1
35 35
36## Linux udev rules 36## Linux `udev` Rules
37On Linux you need proper privilege to access device file of MCU, you'll have to use `sudo` when flashing firmware. You can circumvent this with placing these files in `/etc/udev/rules.d/`. 37On Linux you need proper privilege to access device file of MCU, you'll have to use `sudo` when flashing firmware. You can circumvent this with placing these files in `/etc/udev/rules.d/`.
38 38
39**/etc/udev/rules.d/50-atmel-dfu.rules:** 39**/etc/udev/rules.d/50-atmel-dfu.rules:**
@@ -53,7 +53,7 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
53``` 53```
54 54
55 55
56## Cortex: cstddef: No such file or directory 56## Cortex: `cstddef: No such file or directory`
57GCC 4.8 of Ubuntu 14.04 had this problem and had to update to 4.9 with this PPA. 57GCC 4.8 of Ubuntu 14.04 had this problem and had to update to 4.9 with this PPA.
58https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded 58https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded
59 59
@@ -62,7 +62,7 @@ https://github.com/tmk/tmk_keyboard/wiki/mbed-cortex-porting#compile-error-cstdd
62https://developer.mbed.org/forum/mbed/topic/5205/ 62https://developer.mbed.org/forum/mbed/topic/5205/
63 63
64 64
65## `clock_prescale_set` and `clock_div_1` not available 65## `clock_prescale_set` and `clock_div_1` Not Available
66Your toolchain is too old to support the MCU. For example WinAVR 20100110 doesn't support ATMega32u2. 66Your toolchain is too old to support the MCU. For example WinAVR 20100110 doesn't support ATMega32u2.
67 67
68``` 68```
diff --git a/docs/faq_debug.md b/docs/faq_debug.md
index df35fbb98..9dfec773f 100644
--- a/docs/faq_debug.md
+++ b/docs/faq_debug.md
@@ -4,7 +4,7 @@ This page details various common questions people have about troubleshooting the
4 4
5# Debug Console 5# Debug Console
6 6
7## hid_listen can't recognize device 7## `hid_listen` Can't Recognize Device
8When debug console of your device is not ready you will see like this: 8When debug console of your device is not ready you will see like this:
9 9
10``` 10```
@@ -23,7 +23,7 @@ If you can't get this 'Listening:' message try building with `CONSOLE_ENABLE=yes
23You may need privilege to access the device on OS like Linux. 23You may need privilege to access the device on OS like Linux.
24- try `sudo hid_listen` 24- try `sudo hid_listen`
25 25
26## Can't get message on console 26## Can't Get Message on Console
27Check: 27Check:
28- *hid_listen* finds your device. See above. 28- *hid_listen* finds your device. See above.
29- Enable debug with pressing **Magic**+d. See [Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands). 29- Enable debug with pressing **Magic**+d. See [Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands).
@@ -31,7 +31,7 @@ Check:
31- try using 'print' function instead of debug print. See **common/print.h**. 31- try using 'print' function instead of debug print. See **common/print.h**.
32- disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97). 32- disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97).
33 33
34## Linux or UNIX like system requires Super User privilege 34## Linux or UNIX Like System Requires Super User Privilege
35Just use 'sudo' to execute *hid_listen* with privilege. 35Just use 'sudo' to execute *hid_listen* with privilege.
36``` 36```
37$ sudo hid_listen 37$ sudo hid_listen
@@ -97,14 +97,14 @@ If your firmware built with `BOOTMAGIC_ENABLE` you need to turn its switch on by
97https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch 97https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch
98 98
99 99
100## TrackPoint needs reset circuit(PS/2 mouse support) 100## TrackPoint Needs Reset Circuit (PS/2 Mouse Support)
101Without reset circuit you will have inconsistent reuslt due to improper initialize of the hardware. See circuit schematic of TPM754. 101Without reset circuit you will have inconsistent reuslt due to improper initialize of the hardware. See circuit schematic of TPM754.
102 102
103- http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447 103- http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447
104- http://www.mikrocontroller.net/attachment/52583/tpm754.pdf 104- http://www.mikrocontroller.net/attachment/52583/tpm754.pdf
105 105
106 106
107## Can't read column of matrix beyond 16 107## Can't Read Column of Matrix Beyond 16
108Use `1UL<<16` instead of `1<<16` in `read_cols()` in [matrix.h] when your columns goes beyond 16. 108Use `1UL<<16` instead of `1<<16` in `read_cols()` in [matrix.h] when your columns goes beyond 16.
109 109
110In C `1` means one of [int] type which is [16bit] in case of AVR so you can't shift left more than 15. You will get unexpected zero when you say `1<<16`. You have to use [unsigned long] type with `1UL`. 110In C `1` means one of [int] type which is [16bit] in case of AVR so you can't shift left more than 15. You will get unexpected zero when you say `1<<16`. You have to use [unsigned long] type with `1UL`.
@@ -112,7 +112,7 @@ In C `1` means one of [int] type which is [16bit] in case of AVR so you can't sh
112http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279 112http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279
113 113
114 114
115## Bootloader jump doesn't work 115## Bootloader Jump Doesn't Work
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:
@@ -161,14 +161,14 @@ https://github.com/tmk/tmk_keyboard/issues/179
161 161
162If you are using a TeensyUSB, there is a [known bug](https://github.com/qmk/qmk_firmware/issues/164) in which the hardware reset button prevents the RESET key from working. Unplugging the keyboard and plugging it back in should resolve the problem. 162If you are using a TeensyUSB, there is a [known bug](https://github.com/qmk/qmk_firmware/issues/164) in which the hardware reset button prevents the RESET key from working. Unplugging the keyboard and plugging it back in should resolve the problem.
163 163
164## Special Extra key doesn't work(System, Audio control keys) 164## Special Extra Key Doesn't Work (System, Audio Control Keys)
165You need to define `EXTRAKEY_ENABLE` in `rules.mk` to use them in QMK. 165You need to define `EXTRAKEY_ENABLE` in `rules.mk` to use them in QMK.
166 166
167``` 167```
168EXTRAKEY_ENABLE = yes # Audio control and System control 168EXTRAKEY_ENABLE = yes # Audio control and System control
169``` 169```
170 170
171## Wakeup from sleep doesn't work 171## Wakeup from Sleep Doesn't Work
172 172
173In Windows check `Allow this device to wake the computer` setting in Power **Management property** tab of **Device Manager**. Also check BIOS setting. 173In Windows check `Allow this device to wake the computer` setting in Power **Management property** tab of **Device Manager**. Also check BIOS setting.
174 174
@@ -184,7 +184,7 @@ Pressing any key during sleep should wake host.
184Arduino leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem. 184Arduino leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem.
185 185
186 186
187## Using PF4-7 pins of USB AVR? 187## Using PF4-7 Pins of USB AVR?
188You need to set JTD bit of MCUCR yourself to use PF4-7 as GPIO. Those pins are configured to serve JTAG function by default. MCUs like ATMega*U* or AT90USB* are affeteced with this. 188You need to set JTD bit of MCUCR yourself to use PF4-7 as GPIO. Those pins are configured to serve JTAG function by default. MCUs like ATMega*U* or AT90USB* are affeteced with this.
189 189
190If you are using Teensy this isn't needed. Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function. 190If you are using Teensy this isn't needed. Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function.
@@ -200,7 +200,7 @@ https://github.com/tmk/tmk_keyboard/blob/master/keyboard/hbkb/matrix.c#L67
200And read **26.5.1 MCU Control Register – MCUCR** of ATMega32U4 datasheet. 200And read **26.5.1 MCU Control Register – MCUCR** of ATMega32U4 datasheet.
201 201
202 202
203## Adding LED indicators of Lock keys 203## Adding LED Indicators of Lock Keys
204You need your own LED indicators for CapsLock, ScrollLock and NumLock? See this post. 204You need your own LED indicators for CapsLock, ScrollLock and NumLock? See this post.
205 205
206http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p191560 206http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p191560
@@ -218,16 +218,16 @@ http://arduino.cc/en/Main/ArduinoBoardMicro
218https://geekhack.org/index.php?topic=14290.msg1563867#msg1563867 218https://geekhack.org/index.php?topic=14290.msg1563867#msg1563867
219 219
220 220
221## USB 3 compatibility 221## USB 3 Compatibility
222I heard some people have a problem with USB 3 port, try USB 2 port. 222I heard some people have a problem with USB 3 port, try USB 2 port.
223 223
224 224
225## Mac compatibility 225## Mac Compatibility
226### OS X 10.11 and Hub 226### OS X 10.11 and Hub
227https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034 227https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034
228 228
229 229
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.
@@ -237,7 +237,7 @@ https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
237 237
238 238
239 239
240## FLIP doesn't work 240## FLIP Doesn't Work
241### AtLibUsbDfu.dll not found 241### `AtLibUsbDfu.dll` Not Found
242Remove current driver and reinstall one FLIP provides from DeviceManager. 242Remove current driver and reinstall one FLIP provides from DeviceManager.
243http://imgur.com/a/bnwzy 243http://imgur.com/a/bnwzy
diff --git a/docs/faq_general.md b/docs/faq_general.md
index 7647b1c2a..e0d8c69f2 100644
--- a/docs/faq_general.md
+++ b/docs/faq_general.md
@@ -4,7 +4,7 @@
4 4
5[QMK](https://github.com/qmk), short for Quantum Mechanical Keyboard, is a group of people building tools for custom keyboards. We started with the [QMK firmware](https://github.com/qmk/qmk_firmware), a heavily modified fork of [TMK](https://github.com/tmk/tmk_keyboard). 5[QMK](https://github.com/qmk), short for Quantum Mechanical Keyboard, is a group of people building tools for custom keyboards. We started with the [QMK firmware](https://github.com/qmk/qmk_firmware), a heavily modified fork of [TMK](https://github.com/tmk/tmk_keyboard).
6 6
7### Why the name Quantum? 7### Why the Name Quantum?
8 8
9<!-- FIXME --> 9<!-- FIXME -->
10 10
@@ -17,4 +17,3 @@ From a technical standpoint QMK builds upon TMK by adding several new features.
17From a project and community management standpoint TMK maintains all the officially supported keyboards by himself, with a bit of community support. Separate community maintained forks exist or can be created for other keyboards. Only a few keymaps are provided by default, so users typically don't share keymaps with each other. QMK encourages sharing of both keyboards and keymaps through a centrally managed repository, accepting all pull requests that follow the quality standards. These are mostly community maintained, but the QMK team also helps when necessary. 17From a project and community management standpoint TMK maintains all the officially supported keyboards by himself, with a bit of community support. Separate community maintained forks exist or can be created for other keyboards. Only a few keymaps are provided by default, so users typically don't share keymaps with each other. QMK encourages sharing of both keyboards and keymaps through a centrally managed repository, accepting all pull requests that follow the quality standards. These are mostly community maintained, but the QMK team also helps when necessary.
18 18
19Both approaches have their merits and their drawbacks, and code flows freely between TMK and QMK when it makes sense. 19Both approaches have their merits and their drawbacks, and code flows freely between TMK and QMK when it makes sense.
20
diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md
index 6a364eb53..a54a76521 100644
--- a/docs/faq_keymap.md
+++ b/docs/faq_keymap.md
@@ -7,7 +7,7 @@ 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? 10## What Are the Default Keycodes?
11 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: 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 13
@@ -18,25 +18,25 @@ There are 3 standard keyboard layouts in use around the world- ANSI, ISO, and JI
18 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. 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 20
21## `KC_SYSREQ` isn't working 21## `KC_SYSREQ` Isn't Working
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'. 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'.
23 23
24See [issue #168](https://github.com/tmk/tmk_keyboard/issues/168) and 24See [issue #168](https://github.com/tmk/tmk_keyboard/issues/168) and
25- http://en.wikipedia.org/wiki/Magic_SysRq_key 25- http://en.wikipedia.org/wiki/Magic_SysRq_key
26- http://en.wikipedia.org/wiki/System_request 26- http://en.wikipedia.org/wiki/System_request
27 27
28## Power key doesn't work 28## Power Key Doesn't Work
29Use `KC_PWR` instead of `KC_POWER` or vice versa. 29Use `KC_PWR` instead of `KC_POWER` or vice versa.
30- `KC_PWR` works with Windows and Linux, not with OSX. 30- `KC_PWR` works with Windows and Linux, not with OSX.
31- `KC_POWER` works with OSX and Linux, not with Windows. 31- `KC_POWER` works with OSX and Linux, not with Windows.
32 32
33More info: http://geekhack.org/index.php?topic=14290.msg1327264#msg1327264 33More info: http://geekhack.org/index.php?topic=14290.msg1327264#msg1327264
34 34
35## Oneshot modifier 35## One Shot Modifier
36Solves my personal 'the' problem. I often got 'the' or 'THe' wrongly instead of 'The'. Oneshot Shift mitgates this for me. 36Solves my personal 'the' problem. I often got 'the' or 'THe' wrongly instead of 'The'. Oneshot Shift mitgates this for me.
37https://github.com/tmk/tmk_keyboard/issues/67 37https://github.com/tmk/tmk_keyboard/issues/67
38 38
39## Modifier/Layer stuck 39## Modifier/Layer Stuck
40Modifier keys or layers can be stuck unless layer switching is configured properly. 40Modifier keys or layers can be stuck unless layer switching is configured properly.
41For Modifier keys and layer actions you have to place `KC_TRANS` on same position of destination layer to unregister the modifier key or return to previous layer on release event. 41For Modifier keys and layer actions you have to place `KC_TRANS` on same position of destination layer to unregister the modifier key or return to previous layer on release event.
42 42
@@ -58,7 +58,7 @@ After enabling this feature use keycodes `KC_LCAP`, `KC_LNUM` and `KC_LSCR` in y
58 58
59Old vintage mechanical keyboards occasionally have lock switches but modern ones don't have. ***You don't need this feature in most case and just use keycodes `KC_CAPS`, `KC_NLCK` and `KC_SLCK`.*** 59Old vintage mechanical keyboards occasionally have lock switches but modern ones don't have. ***You don't need this feature in most case and just use keycodes `KC_CAPS`, `KC_NLCK` and `KC_SLCK`.***
60 60
61## Input special charactors other than ASCII like Cédille 'Ç' 61## Input Special Characters Other Than ASCII like Cédille 'Ç'
62NO UNIVERSAL METHOD TO INPUT THOSE WORKS OVER ALL SYSTEMS. You have to define **MACRO** in way specific to your OS or layout. 62NO UNIVERSAL METHOD TO INPUT THOSE WORKS OVER ALL SYSTEMS. You have to define **MACRO** in way specific to your OS or layout.
63 63
64See this post for example **MACRO** code. 64See this post for example **MACRO** code.
@@ -79,7 +79,7 @@ And see this for **Unicode** input.
79- http://en.wikipedia.org/wiki/Unicode_input 79- http://en.wikipedia.org/wiki/Unicode_input
80 80
81 81
82## Apple/Mac keyboard Fn 82## Apple/Mac Keyboard `Fn`
83Not supported. 83Not supported.
84 84
85Apple/Mac keyboard sends keycode for Fn unlike most of other keyboards. 85Apple/Mac keyboard sends keycode for Fn unlike most of other keyboards.
@@ -88,13 +88,13 @@ I think you can send Apple Fn key using Apple venter specific Page 0xff01 and us
88https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/AppleHIDUsageTables.h 88https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/AppleHIDUsageTables.h
89 89
90 90
91## Media control keys in Mac OSX 91## Media Control Keys in Mac OSX
92#### KC_MNXT and KC_MPRV does not work on Mac 92#### KC_MNXT and KC_MPRV Does Not Work on Mac
93Use `KC_MFFD`(`KC_MEDIA_FAST_FORWARD`) and `KC_MRWD`(`KC_MEDIA_REWIND`) instead of `KC_MNXT` and `KC_MPRV`. 93Use `KC_MFFD`(`KC_MEDIA_FAST_FORWARD`) and `KC_MRWD`(`KC_MEDIA_REWIND`) instead of `KC_MNXT` and `KC_MPRV`.
94See https://github.com/tmk/tmk_keyboard/issues/195 94See https://github.com/tmk/tmk_keyboard/issues/195
95 95
96 96
97## Keys supported in Mac OSX? 97## Keys Supported in Mac OSX?
98You can know which keycodes are supported in OSX from this source code. 98You can know which keycodes are supported in OSX from this source code.
99 99
100`usb_2_adb_keymap` array maps Keyboard/Keypad Page usages to ADB scancodes(OSX internal keycodes). 100`usb_2_adb_keymap` array maps Keyboard/Keypad Page usages to ADB scancodes(OSX internal keycodes).
@@ -106,7 +106,7 @@ And `IOHIDConsumer::dispatchConsumerEvent` handles Consumer page usages.
106https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/IOHIDConsumer.cpp 106https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/IOHIDConsumer.cpp
107 107
108 108
109## JIS keys in Mac OSX 109## JIS Keys in Mac OSX
110Japanese JIS keyboard specific keys like `無変換(Muhenkan)`, `変換(Henkan)`, `ひらがな(hiragana)` are not recognized on OSX. You can use **Seil** to enable those keys, try following options. 110Japanese JIS keyboard specific keys like `無変換(Muhenkan)`, `変換(Henkan)`, `ひらがな(hiragana)` are not recognized on OSX. You can use **Seil** to enable those keys, try following options.
111 111
112* Enable NFER Key on PC keyboard 112* Enable NFER Key on PC keyboard
@@ -116,7 +116,7 @@ Japanese JIS keyboard specific keys like `無変換(Muhenkan)`, `変換(Henkan)`
116https://pqrs.org/osx/karabiner/seil.html 116https://pqrs.org/osx/karabiner/seil.html
117 117
118 118
119## RN-42 Bluetooth doesn't work with Karabiner 119## RN-42 Bluetooth Doesn't Work with Karabiner
120Karabiner - Keymapping tool on Mac OSX - ignores inputs from RN-42 module by default. You have to enable this option to make Karabiner working with your keyboard. 120Karabiner - Keymapping tool on Mac OSX - ignores inputs from RN-42 module by default. You have to enable this option to make Karabiner working with your keyboard.
121https://github.com/tekezo/Karabiner/issues/403#issuecomment-102559237 121https://github.com/tekezo/Karabiner/issues/403#issuecomment-102559237
122 122
@@ -125,11 +125,11 @@ https://github.com/tmk/tmk_keyboard/issues/213
125https://github.com/tekezo/Karabiner/issues/403 125https://github.com/tekezo/Karabiner/issues/403
126 126
127 127
128## Esc and `~ on a single key 128## Esc and <code>&#96;</code> on a Single Key
129 129
130See the [Grave Escape](feature_grave_escape.md) feature. 130See the [Grave Escape](feature_grave_escape.md) feature.
131 131
132## Arrow on Right Modifier keys with Dual-Role 132## Arrow on Right Modifier Keys with Dual-Role
133This turns right modifer keys into arrow keys when the keys are tapped while still modifiers when the keys are hold. In TMK the dual-role function is dubbed **TAP**. 133This turns right modifer keys into arrow keys when the keys are tapped while still modifiers when the keys are hold. In TMK the dual-role function is dubbed **TAP**.
134``` 134```
135 135
@@ -181,7 +181,7 @@ It seems Windows 10 ignores the code and Linux/Xorg recognizes but has no mappin
181Not sure what keycode Eject is on genuine Apple keyboard actually. HHKB uses `F20` for Eject key(`Fn+f`) on Mac mode but this is not same as Apple Eject keycode probably. 181Not sure what keycode Eject is on genuine Apple keyboard actually. HHKB uses `F20` for Eject key(`Fn+f`) on Mac mode but this is not same as Apple Eject keycode probably.
182 182
183 183
184## What's weak_mods and real_mods in action_util.c 184## What's `weak_mods` and `real_mods` in `action_util.c`
185___TO BE IMPROVED___ 185___TO BE IMPROVED___
186 186
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
@@ -204,7 +204,7 @@ here real_mods lost state for 'physical left shift'.
204weak_mods is ORed with real_mods when keyboard report is sent. 204weak_mods is ORed with real_mods when keyboard report is sent.
205https://github.com/tmk/tmk_core/blob/master/common/action_util.c#L57 205https://github.com/tmk/tmk_core/blob/master/common/action_util.c#L57
206 206
207## Timer functionality 207## Timer Functionality
208 208
209It's possible to start timers and read values for time-specific events - here's an example: 209It's possible to start timers and read values for time-specific events - here's an example:
210 210
diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md
index 0acb26598..c9b5312e6 100644
--- a/docs/feature_advanced_keycodes.md
+++ b/docs/feature_advanced_keycodes.md
@@ -13,11 +13,11 @@ People often define custom names using `#define`. For example:
13 13
14This will allow you to use `FN_CAPS` and `ALT_TAB` in your `KEYMAP()`, keeping it more readable. 14This will allow you to use `FN_CAPS` and `ALT_TAB` in your `KEYMAP()`, keeping it more readable.
15 15
16### Limits of these aliases 16### Limits of These Aliases
17 17
18Currently, the keycodes able to used with these functions are limited to the [Basic Keycodes](keycodes_basic.md), 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.md). 18Currently, the keycodes able to used with these functions are limited to the [Basic Keycodes](keycodes_basic.md), 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.md).
19 19
20# Switching and toggling layers 20# Switching and Toggling Layers
21 21
22These functions allow you to activate layers in various ways. 22These functions allow you to activate layers in various ways.
23 23
@@ -27,7 +27,7 @@ These functions allow you to activate layers in various ways.
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). 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).
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. 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.
29 29
30# Working With Layers 30# Working with Layers
31 31
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. 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.
33 33
@@ -51,7 +51,7 @@ Layers stack on top of each other in numerical order. When determining what a ke
51 51
52Sometimes, you might want to switch between layers in a macro or as part of a tap dance routine. `layer_on` activates a layer, and `layer_off` deactivates it. More layer-related functions can be found in [action_layer.h](../tmk_core/common/action_layer.h). 52Sometimes, you might want to switch between layers in a macro or as part of a tap dance routine. `layer_on` activates a layer, and `layer_off` deactivates it. More layer-related functions can be found in [action_layer.h](../tmk_core/common/action_layer.h).
53 53
54# Modifier keys 54# Modifier Keys
55 55
56These 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. 56These 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.
57 57
diff --git a/docs/feature_audio.md b/docs/feature_audio.md
index c142ff69c..774e0ae5a 100644
--- a/docs/feature_audio.md
+++ b/docs/feature_audio.md
@@ -47,7 +47,7 @@ PLAY_LOOP(my_song);
47 47
48It's advised that you wrap all audio features in `#ifdef AUDIO_ENABLE` / `#endif` to avoid causing problems when audio isn't built into the keyboard. 48It's advised that you wrap all audio features in `#ifdef AUDIO_ENABLE` / `#endif` to avoid causing problems when audio isn't built into the keyboard.
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
@@ -82,7 +82,7 @@ The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, a
82 82
83 #define PITCH_STANDARD_A 432.0f 83 #define PITCH_STANDARD_A 432.0f
84 84
85## MIDI functionalty 85## MIDI Functionality
86 86
87This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile. 87This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile.
88 88
diff --git a/docs/feature_auto_shift.md b/docs/feature_auto_shift.md
index fdd10ada9..8d59d4573 100644
--- a/docs/feature_auto_shift.md
+++ b/docs/feature_auto_shift.md
@@ -1,4 +1,4 @@
1# Auto Shift: Why do we need a shift key? 1# Auto Shift: Why Do We Need a Shift Key?
2 2
3Tap a key and you get its character. Tap a key, but hold it *slightly* longer 3Tap a key and you get its character. Tap a key, but hold it *slightly* longer
4and you get its shifted state. Viola! No shift key needed! 4and you get its shifted state. Viola! No shift key needed!
@@ -10,7 +10,7 @@ fingers repetitively long distances. For us on the keyboard, the pinky does that
10all too often when reaching for the shift key. Auto Shift looks to alleviate that 10all too often when reaching for the shift key. Auto Shift looks to alleviate that
11problem. 11problem.
12 12
13## How does it work? 13## How Does It Work?
14 14
15When you tap a key, it stays depressed for a short period of time before it is 15When you tap a key, it stays depressed for a short period of time before it is
16then released. This depressed time is a different length for everyone. Auto Shift 16then released. This depressed time is a different length for everyone. Auto Shift
@@ -20,7 +20,7 @@ when you release the key. If the time depressed is greater than or equal to the
20`AUTO_SHIFT_TIMEOUT`, then a shifted version of the key is emitted. If the time 20`AUTO_SHIFT_TIMEOUT`, then a shifted version of the key is emitted. If the time
21is less than the `AUTO_SHIFT_TIMEOUT` time, then the normal state is emitted. 21is less than the `AUTO_SHIFT_TIMEOUT` time, then the normal state is emitted.
22 22
23## Are there limitations to Auto Shift? 23## Are There Limitations to Auto Shift?
24 24
25Yes, unfortunately. 25Yes, unfortunately.
26 26
@@ -38,7 +38,7 @@ Yes, unfortunately.
38 tapping the keys, but really we have held it for a little longer than 38 tapping the keys, but really we have held it for a little longer than
39 anticipated. 39 anticipated.
40 40
41## How do I enable Auto Shift? 41## How Do I Enable Auto Shift?
42 42
43Add to your `rules.mk` in the keymap folder: 43Add to your `rules.mk` in the keymap folder:
44 44
@@ -66,7 +66,7 @@ A sample is
66 66
67 #endif 67 #endif
68 68
69### AUTO_SHIFT_TIMEOUT (value in ms) 69### AUTO_SHIFT_TIMEOUT (Value in ms)
70 70
71This controls how long you have to hold a key before you get the shifted state. 71This controls how long you have to hold a key before you get the shifted state.
72Obviously, this is different for everyone. For the common person, a setting of 72Obviously, this is different for everyone. For the common person, a setting of
@@ -86,7 +86,7 @@ quick. See "Auto Shift Setup" for more details!
86 86
87### NO_AUTO_SHIFT_SPECIAL (simple define) 87### NO_AUTO_SHIFT_SPECIAL (simple define)
88 88
89Do not Auto Shift special keys, which include -_, =+, [{, ]}, ;:, '", ,<, .>, 89Do not Auto Shift special keys, which include -\_, =+, [{, ]}, ;:, '", ,<, .>,
90and /? 90and /?
91 91
92### NO_AUTO_SHIFT_NUMERIC (simple define) 92### NO_AUTO_SHIFT_NUMERIC (simple define)
@@ -134,7 +134,7 @@ completely normal and with no intention of shifted keys.
1349. Remove the key bindings `KC_ASDN`, `KC_ASUP` and `KC_ASRP`. 1349. Remove the key bindings `KC_ASDN`, `KC_ASUP` and `KC_ASRP`.
13510. Compile and upload your new firmware. 13510. Compile and upload your new firmware.
136 136
137#### An example run 137#### An Example Run
138 138
139 hello world. my name is john doe. i am a computer programmer playing with 139 hello world. my name is john doe. i am a computer programmer playing with
140 keyboards right now. 140 keyboards right now.
@@ -155,4 +155,4 @@ completely normal and with no intention of shifted keys.
155 155
156The keyboard typed `115` which represents your current `AUTO_SHIFT_TIMEOUT` 156The keyboard typed `115` which represents your current `AUTO_SHIFT_TIMEOUT`
157value. You are now set! Practice on the *D* key a little bit that showed up 157value. You are now set! Practice on the *D* key a little bit that showed up
158in the testing and you'll be golden. \ No newline at end of file 158in the testing and you'll be golden.
diff --git a/docs/feature_bluetooth.md b/docs/feature_bluetooth.md
index 79a54208e..0c8f24a08 100644
--- a/docs/feature_bluetooth.md
+++ b/docs/feature_bluetooth.md
@@ -1,6 +1,6 @@
1# Bluetooth 1# Bluetooth
2 2
3## Bluetooth functionality 3## Bluetooth Functionality
4 4
5This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts), but can be enabled via the Makefile. The firmware will still output characters via USB, so be aware of this when charging via a computer. It would make sense to have a switch on the Bluefruit to turn it off at will. 5This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts), but can be enabled via the Makefile. The firmware will still output characters via USB, so be aware of this when charging via a computer. It would make sense to have a switch on the Bluefruit to turn it off at will.
6 6
diff --git a/docs/feature_dynamic_macros.md b/docs/feature_dynamic_macros.md
index 4dd8a39e6..23fefea4c 100644
--- a/docs/feature_dynamic_macros.md
+++ b/docs/feature_dynamic_macros.md
@@ -1,4 +1,4 @@
1# Dynamic macros: record and replay macros in runtime 1# Dynamic Macros: Record and Replay Macros in Runtime
2 2
3QMK supports temporary macros created on the fly. We call these Dynamic Macros. They are defined by the user from the keyboard and are lost when the keyboard is unplugged or otherwise rebooted. 3QMK supports temporary macros created on the fly. We call these Dynamic Macros. They are defined by the user from the keyboard and are lost when the keyboard is unplugged or otherwise rebooted.
4 4
diff --git a/docs/feature_grave_esc.md b/docs/feature_grave_esc.md
index ea3c55c63..9a14daf2a 100644
--- a/docs/feature_grave_esc.md
+++ b/docs/feature_grave_esc.md
@@ -1,6 +1,6 @@
1# Grave Escape 1# Grave Escape
2 2
3Grave Escape is a feature that allows you to share the grave key (`\`` and `~`) on the same key as Escape. When `KC_GESC` is used it will act as `KC_ESC`, unless Shift or GUI is pressed, in which case it will act as `KC_GRAVE`. 3Grave Escape is a feature that allows you to share the grave key (<code>&#96;</code> and `~`) on the same key as Escape. When `KC_GESC` is used it will act as `KC_ESC`, unless Shift or GUI is pressed, in which case it will act as `KC_GRAVE`.
4 4
5 5
6| Key | Alias | Description | 6| Key | Alias | Description |
diff --git a/docs/feature_key_lock.md b/docs/feature_key_lock.md
index a26cc1000..225e7136f 100644
--- a/docs/feature_key_lock.md
+++ b/docs/feature_key_lock.md
@@ -1,4 +1,4 @@
1## Key Lock: Holding down keys for you 1## Key Lock: Holding Down Keys for You
2 2
3Sometimes, you need to hold down a specific key for a long period of time. Whether this is while typing in ALL CAPS, or playing a video game that hasn't implemented auto-run, Key Lock is here to help. Key Lock adds a new keycode, `KC_LOCK`, that will hold down the next key you hit for you. The key is released when you hit it again. Here's an example: let's say you need to type in all caps for a few sentences. You hit KC_LOCK, and then shift. Now, shift will be considered held until you hit it again. You can think of key lock as caps lock, but supercharged. 3Sometimes, you need to hold down a specific key for a long period of time. Whether this is while typing in ALL CAPS, or playing a video game that hasn't implemented auto-run, Key Lock is here to help. Key Lock adds a new keycode, `KC_LOCK`, that will hold down the next key you hit for you. The key is released when you hit it again. Here's an example: let's say you need to type in all caps for a few sentences. You hit KC_LOCK, and then shift. Now, shift will be considered held until you hit it again. You can think of key lock as caps lock, but supercharged.
4 4
diff --git a/docs/feature_layouts.md b/docs/feature_layouts.md
index 11f5831bb..7bc55c6af 100644
--- a/docs/feature_layouts.md
+++ b/docs/feature_layouts.md
@@ -1,4 +1,4 @@
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
@@ -33,7 +33,7 @@ Each layout folder is named (`[a-z0-9_]`) after the physical aspects of the layo
33 33
34New names should try to stick to the standards set by existing layouts, and can be discussed in the PR/Issue. 34New names should try to stick to the standards set by existing layouts, and can be discussed in the PR/Issue.
35 35
36## Supporting a layout 36## Supporting a Layout
37 37
38For a keyboard to support a layout, the variable (`[a-z0-9_]`) must be defined in it's `<keyboard>.h`, and match the number of arguments/keys (and preferrably the physical layout): 38For a keyboard to support a layout, the variable (`[a-z0-9_]`) must be defined in it's `<keyboard>.h`, and match the number of arguments/keys (and preferrably the physical layout):
39 39
@@ -49,7 +49,7 @@ The folder name must be added to the keyboard's `rules.mk`:
49 49
50but the `LAYOUT_<layout>` variable must be defined in `<folder>.h` as well. 50but the `LAYOUT_<layout>` variable must be defined in `<folder>.h` as well.
51 51
52## Tips for making layouts keyboard-agnostic 52## Tips for Making Layouts Keyboard-Agnostic
53 53
54Instead of using `#include "planck.h"`, you can use this line to include whatever `<keyboard>.h` (`<folder>.h` should not be included here) file that is being compiled: 54Instead of using `#include "planck.h"`, you can use this line to include whatever `<keyboard>.h` (`<folder>.h` should not be included here) file that is being compiled:
55 55
diff --git a/docs/feature_leader_key.md b/docs/feature_leader_key.md
index bf4d5456d..fb74bf7c8 100644
--- a/docs/feature_leader_key.md
+++ b/docs/feature_leader_key.md
@@ -1,4 +1,4 @@
1# The Leader key: A new kind of modifier 1# The Leader Key: A New Kind of Modifier
2 2
3If you've ever used Vim, you know what a Leader key is. If not, you're about to discover a wonderful concept. :) Instead of hitting Alt+Shift+W for example (holding down three keys at the same time), what if you could hit a _sequence_ of keys instead? So you'd hit our special modifier (the Leader key), followed by W and then C (just a rapid succession of keys), and something would happen. 3If you've ever used Vim, you know what a Leader key is. If not, you're about to discover a wonderful concept. :) Instead of hitting Alt+Shift+W for example (holding down three keys at the same time), what if you could hit a _sequence_ of keys instead? So you'd hit our special modifier (the Leader key), followed by W and then C (just a rapid succession of keys), and something would happen.
4 4
@@ -34,4 +34,4 @@ void matrix_scan_user(void) {
34} 34}
35``` 35```
36 36
37As you can see, you have three function. you can use - `SEQ_ONE_KEY` for single-key sequences (Leader followed by just one key), and `SEQ_TWO_KEYS` and `SEQ_THREE_KEYS` for longer sequences. Each of these accepts one or more keycodes as arguments. This is an important point: You can use keycodes from **any layer on your keyboard**. That layer would need to be active for the leader macro to fire, obviously. \ No newline at end of file 37As you can see, you have three function. you can use - `SEQ_ONE_KEY` for single-key sequences (Leader followed by just one key), and `SEQ_TWO_KEYS` and `SEQ_THREE_KEYS` for longer sequences. Each of these accepts one or more keycodes as arguments. This is an important point: You can use keycodes from **any layer on your keyboard**. That layer would need to be active for the leader macro to fire, obviously.
diff --git a/docs/feature_macros.md b/docs/feature_macros.md
index 92afe68c2..f9a4e69d1 100644
--- a/docs/feature_macros.md
+++ b/docs/feature_macros.md
@@ -6,7 +6,7 @@ Macros allow you to send multiple keystrokes when pressing just one key. QMK has
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 ahold 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 ahold of your keyboard will be able to access that information by opening a text editor.
7{% endhint %} 7{% endhint %}
8 8
9## The new way: `SEND_STRING()` & `process_record_user` 9## The New Way: `SEND_STRING()` & `process_record_user`
10 10
11Sometimes you just want a key to type out words or phrases. For the most common situations we've provided `SEND_STRING()`, which will type out your string (i.e. a sequence of characters) for you. All ASCII characters that are easily translated to a keycode are supported (e.g. `\n\t`). 11Sometimes you just want a key to type out words or phrases. For the most common situations we've provided `SEND_STRING()`, which will type out your string (i.e. a sequence of characters) for you. All ASCII characters that are easily translated to a keycode are supported (e.g. `\n\t`).
12 12
@@ -105,13 +105,13 @@ They can be used like this:
105 105
106Which would send LCTRL+a (LCTRL down, a, LCTRL up) - notice that they take strings (eg `"k"`), and not the `X_K` keycodes. 106Which would send LCTRL+a (LCTRL down, a, LCTRL up) - notice that they take strings (eg `"k"`), and not the `X_K` keycodes.
107 107
108### Alternative keymaps 108### Alternative Keymaps
109 109
110By default, it assumes a US keymap with a QWERTY layout; if you want to change that (e.g. if your OS uses software Colemak), include this somewhere in your keymap: 110By default, it assumes a US keymap with a QWERTY layout; if you want to change that (e.g. if your OS uses software Colemak), include this somewhere in your keymap:
111 111
112 #include <sendstring_colemak.h> 112 #include <sendstring_colemak.h>
113 113
114### Strings in memory 114### Strings in Memory
115 115
116If for some reason you're manipulating strings and need to print out something you just generated (instead of being a literal, constant string), you can use `send_string()`, like this: 116If for some reason you're manipulating strings and need to print out something you just generated (instead of being a literal, constant string), you can use `send_string()`, like this:
117 117
@@ -129,7 +129,7 @@ send_string(my_str);
129SEND_STRING(".."SS_TAP(X_END)); 129SEND_STRING(".."SS_TAP(X_END));
130``` 130```
131 131
132## The old way: `MACRO()` & `action_get_macro` 132## The Old Way: `MACRO()` & `action_get_macro`
133 133
134{% hint style='info' %} 134{% hint style='info' %}
135This is inherited from TMK, and hasn't been updated - it's recommend that you use `SEND_STRING` and `process_record_user` instead. 135This is inherited from TMK, and hasn't been updated - it's recommend that you use `SEND_STRING` and `process_record_user` instead.
@@ -166,7 +166,7 @@ A macro can include the following commands:
166* W() wait (milliseconds). 166* W() wait (milliseconds).
167* END end mark. 167* END end mark.
168 168
169### Mapping a Macro to a key 169### Mapping a Macro to a Key
170 170
171Use the `M()` function within your `KEYMAP()` to call a macro. For example, here is the keymap for a 2-key keyboard: 171Use the `M()` function within your `KEYMAP()` to call a macro. For example, here is the keymap for a 2-key keyboard:
172 172
@@ -192,7 +192,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
192 192
193When you press the key on the left it will type "Hi!" and when you press the key on the right it will type "Bye!". 193When you press the key on the left it will type "Hi!" and when you press the key on the right it will type "Bye!".
194 194
195### Naming your macros 195### Naming Your Macros
196 196
197If you have a bunch of macros you want to refer to from your keymap while keeping the keymap easily readable you can name them using `#define` at the top of your file. 197If you have a bunch of macros you want to refer to from your keymap while keeping the keymap easily readable you can name them using `#define` at the top of your file.
198 198
@@ -207,7 +207,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
207}; 207};
208``` 208```
209 209
210## Advanced macro functions 210## Advanced Macro Functions
211 211
212There are some functions you may find useful in macro-writing. Keep in mind that while you can write some fairly advanced code within a macro if your functionality gets too complex you may want to define a custom keycode instead. Macros are meant to be simple. 212There are some functions you may find useful in macro-writing. Keep in mind that while you can write some fairly advanced code within a macro if your functionality gets too complex you may want to define a custom keycode instead. Macros are meant to be simple.
213 213
@@ -243,7 +243,7 @@ This will clear all mods currently pressed.
243 243
244This will clear all keys besides the mods currently pressed. 244This 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
@@ -262,5 +262,3 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
262 return MACRO_NONE; 262 return MACRO_NONE;
263}; 263};
264``` 264```
265
266
diff --git a/docs/feature_mouse_keys.md b/docs/feature_mouse_keys.md
index 560bd0470..78c44b3e6 100644
--- a/docs/feature_mouse_keys.md
+++ b/docs/feature_mouse_keys.md
@@ -3,11 +3,11 @@
3 3
4Mousekeys is a feature that allows you to emulate a mouse using your keyboard. You can move the pointer around, click up to 5 buttons, and even scroll in all 4 directions. QMK uses the same algorithm as the X Window System MouseKeysAccel feature. You can read more about it [on Wikipedia](https://en.wikipedia.org/wiki/Mouse_keys). 4Mousekeys is a feature that allows you to emulate a mouse using your keyboard. You can move the pointer around, click up to 5 buttons, and even scroll in all 4 directions. QMK uses the same algorithm as the X Window System MouseKeysAccel feature. You can read more about it [on Wikipedia](https://en.wikipedia.org/wiki/Mouse_keys).
5 5
6## Adding Mousekeys To a Keymap 6## Adding Mousekeys to a Keymap
7 7
8There are two steps to adding Mousekeys support to your keyboard. You must enable support in the Makefile and you must map mouse actions to keys on your keyboard. 8There are two steps to adding Mousekeys support to your keyboard. You must enable support in the Makefile and you must map mouse actions to keys on your keyboard.
9 9
10### Adding Mousekeys support in the `Makefile` 10### Adding Mousekeys Support in the `Makefile`
11 11
12To add support for Mousekeys you simply need to add a single line to your keymap's `Makefile`: 12To add support for Mousekeys you simply need to add a single line to your keymap's `Makefile`:
13 13
@@ -17,7 +17,7 @@ MOUSEKEY_ENABLE = yes
17 17
18You can see an example here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/keymaps/mouse_keys/Makefile 18You can see an example here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/keymaps/mouse_keys/Makefile
19 19
20### Mapping Mouse Actions To Keyboard Keys 20### Mapping Mouse Actions to Keyboard Keys
21 21
22You can use these keycodes within your keymap to map button presses to mouse actions: 22You can use these keycodes within your keymap to map button presses to mouse actions:
23 23
@@ -42,7 +42,7 @@ You can use these keycodes within your keymap to map button presses to mouse act
42 42
43You can see an example in the `_ML` here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/keymaps/mouse_keys/keymap.c#L46 43You can see an example in the `_ML` here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/keymaps/mouse_keys/keymap.c#L46
44 44
45## Configuring the behavior of Mousekeys 45## Configuring the Behavior of Mousekeys
46 46
47The default speed for controlling the mouse with the keyboard is intentionaly slow. You can adjust these parameters by adding these settings to your keymap's `config.h` file. All times are specified in miliseconds (ms). 47The default speed for controlling the mouse with the keyboard is intentionaly slow. You can adjust these parameters by adding these settings to your keymap's `config.h` file. All times are specified in miliseconds (ms).
48 48
@@ -78,4 +78,4 @@ The top speed for scrolling movements.
78 78
79### `MOUSEKEY_WHEEL_TIME_TO_MAX` 79### `MOUSEKEY_WHEEL_TIME_TO_MAX`
80 80
81How long you want to hold down a scroll key for until `MOUSEKEY_WHEEL_MAX_SPEED` is reached. This controls how quickling your scrolling will accelerate. \ No newline at end of file 81How long you want to hold down a scroll key for until `MOUSEKEY_WHEEL_MAX_SPEED` is reached. This controls how quickling your scrolling will accelerate.
diff --git a/docs/feature_pointing_device.md b/docs/feature_pointing_device.md
index 1ba8f7759..70b588464 100644
--- a/docs/feature_pointing_device.md
+++ b/docs/feature_pointing_device.md
@@ -44,4 +44,4 @@ case MS_SPECIAL:
44 break; 44 break;
45``` 45```
46 46
47Recall that the mouse report is set to zero (except the buttons) whenever it is sent, so the scrolling would only occur once in each case. \ No newline at end of file 47Recall that the mouse report is set to zero (except the buttons) whenever it is sent, so the scrolling would only occur once in each case.
diff --git a/docs/feature_ps2_mouse.md b/docs/feature_ps2_mouse.md
index dac3a5b36..51ae5fa26 100644
--- a/docs/feature_ps2_mouse.md
+++ b/docs/feature_ps2_mouse.md
@@ -6,7 +6,7 @@ To hook up a Trackpoint, you need to obtain a Trackpoint module (i.e. harvest fr
6 6
7There are three available modes for hooking up PS/2 devices: USART (best), interrupts (better) or busywait (not recommended). 7There are three available modes for hooking up PS/2 devices: USART (best), interrupts (better) or busywait (not recommended).
8 8
9### Busywait version 9### Busywait Version
10 10
11Note: This is not recommended, you may encounter jerky movement or unsent inputs. Please use interrupt or USART version if possible. 11Note: This is not recommended, you may encounter jerky movement or unsent inputs. Please use interrupt or USART version if possible.
12 12
@@ -32,7 +32,7 @@ In your keyboard config.h:
32#endif 32#endif
33``` 33```
34 34
35### Interrupt version 35### Interrupt Version
36 36
37The following example uses D2 for clock and D5 for data. You can use any INT or PCINT pin for clock, and any pin for data. 37The following example uses D2 for clock and D5 for data. You can use any INT or PCINT pin for clock, and any pin for data.
38 38
@@ -70,7 +70,7 @@ In your keyboard config.h:
70#endif 70#endif
71``` 71```
72 72
73### USART version 73### USART Version
74 74
75To use USART on the ATMega32u4, you have to use PD5 for clock and PD2 for data. If one of those are unavailable, you need to use interrupt version. 75To use USART on the ATMega32u4, you have to use PD5 for clock and PD2 for data. If one of those are unavailable, you need to use interrupt version.
76 76
@@ -129,7 +129,7 @@ In your keyboard config.h:
129 129
130### Additional Settings 130### Additional Settings
131 131
132#### PS/2 mouse features 132#### PS/2 Mouse Features
133 133
134These enable settings supported by the PS/2 mouse protocol: http://www.computer-engineering.org/ps2mouse/ 134These enable settings supported by the PS/2 mouse protocol: http://www.computer-engineering.org/ps2mouse/
135 135
@@ -170,7 +170,7 @@ void ps2_mouse_set_resolution(ps2_mouse_resolution_t resolution);
170void ps2_mouse_set_sample_rate(ps2_mouse_sample_rate_t sample_rate); 170void ps2_mouse_set_sample_rate(ps2_mouse_sample_rate_t sample_rate);
171``` 171```
172 172
173#### Fine control 173#### Fine Control
174 174
175Use the following defines to change the sensitivity and speed of the mouse. 175Use the following defines to change the sensitivity and speed of the mouse.
176Note: you can also use `ps2_mouse_set_resolution` for the same effect (not supported on most touchpads). 176Note: you can also use `ps2_mouse_set_resolution` for the same effect (not supported on most touchpads).
@@ -181,7 +181,7 @@ Note: you can also use `ps2_mouse_set_resolution` for the same effect (not suppo
181#define PS2_MOUSE_V_MULTIPLIER 1 181#define PS2_MOUSE_V_MULTIPLIER 1
182``` 182```
183 183
184#### Scroll button 184#### Scroll Button
185 185
186If you're using a trackpoint, you will likely want to be able to use it for scrolling. 186If you're using a trackpoint, you will likely want to be able to use it for scrolling.
187Its possible to enable a "scroll button/s" that when pressed will cause the mouse to scroll instead of moving. 187Its possible to enable a "scroll button/s" that when pressed will cause the mouse to scroll instead of moving.
@@ -227,7 +227,7 @@ Fine control over the scrolling is supported with the following defines:
227#define PS2_MOUSE_SCROLL_DIVISOR_V 2 227#define PS2_MOUSE_SCROLL_DIVISOR_V 2
228``` 228```
229 229
230#### Invert mouse and scroll axes 230#### Invert Mouse and Scroll Axes
231 231
232To invert the X and Y axes you can put: 232To invert the X and Y axes you can put:
233 233
@@ -247,7 +247,7 @@ To reverse the scroll axes you can put:
247 247
248into config.h. 248into config.h.
249 249
250#### Debug settings 250#### Debug Settings
251 251
252To debug the mouse, add `debug_mouse = true` or enable via bootmagic. 252To debug the mouse, add `debug_mouse = true` or enable via bootmagic.
253 253
diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md
index bd9cb352c..8f4f08024 100644
--- a/docs/feature_rgblight.md
+++ b/docs/feature_rgblight.md
@@ -80,7 +80,7 @@ const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {127, 63, 31};
80const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90}; 80const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90};
81``` 81```
82 82
83### LED control 83### LED Control
84 84
85Look in `rgblights.h` for all available functions, but if you want to control all or some LEDs your goto functions are: 85Look in `rgblights.h` for all available functions, but if you want to control all or some LEDs your goto functions are:
86 86
diff --git a/docs/feature_space_cadet.md b/docs/feature_space_cadet.md
index a1ec256de..47267d417 100644
--- a/docs/feature_space_cadet.md
+++ b/docs/feature_space_cadet.md
@@ -1,4 +1,4 @@
1## Space Cadet Shift: The future, built in 1## Space Cadet Shift: The Future, Built In
2 2
3Steve 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. 3Steve 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.
4 4
diff --git a/docs/feature_tap_dance.md b/docs/feature_tap_dance.md
index 24cd2b440..57bbde6ea 100644
--- a/docs/feature_tap_dance.md
+++ b/docs/feature_tap_dance.md
@@ -1,4 +1,4 @@
1# Tap Dance: A single key can do 3, 5, or 100 different things 1# Tap Dance: A Single Key Can Do 3, 5, or 100 Different Things
2 2
3<!-- FIXME: Break this up into multiple sections --> 3<!-- FIXME: Break this up into multiple sections -->
4 4
@@ -78,7 +78,7 @@ enum {
78 X_TAP_DANCE 78 X_TAP_DANCE
79}; 79};
80``` 80```
81### Example 1: Send `:` on single tap, `;` on double tap 81### Example 1: Send `:` on Single Tap, `;` on Double Tap
82```c 82```c
83void dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) { 83void dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) {
84 if (state->count == 1) { 84 if (state->count == 1) {
@@ -103,7 +103,7 @@ qk_tap_dance_action_t tap_dance_actions[] = {
103 [CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset) 103 [CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset)
104}; 104};
105``` 105```
106### Example 2: Send "Safety Dance!" after 100 taps 106### Example 2: Send "Safety Dance!" After 100 Taps
107```c 107```c
108void dance_egg (qk_tap_dance_state_t *state, void *user_data) { 108void dance_egg (qk_tap_dance_state_t *state, void *user_data) {
109 if (state->count >= 100) { 109 if (state->count >= 100) {
@@ -117,7 +117,7 @@ qk_tap_dance_action_t tap_dance_actions[] = {
117}; 117};
118``` 118```
119 119
120### Example 3: Turn LED lights on then off, one at a time 120### Example 3: Turn LED Lights On Then Off, One at a Time
121 121
122```c 122```c
123// on each tap, light up one led, from right to left 123// on each tap, light up one led, from right to left
diff --git a/docs/feature_terminal.md b/docs/feature_terminal.md
index 2c5f2c486..88fda1cee 100644
--- a/docs/feature_terminal.md
+++ b/docs/feature_terminal.md
@@ -14,7 +14,7 @@ When enabled, a `> ` prompt will appear, where you'll be able to type, backspace
14 14
15`#define TERMINAL_HELP` enables some other output helpers that aren't really needed with this page. 15`#define TERMINAL_HELP` enables some other output helpers that aren't really needed with this page.
16 16
17## Future ideas 17## Future Ideas
18 18
19* Keyboard/user-extendable commands 19* Keyboard/user-extendable commands
20* Smaller footprint 20* Smaller footprint
@@ -30,7 +30,7 @@ When enabled, a `> ` prompt will appear, where you'll be able to type, backspace
30* EEPROM read/write 30* EEPROM read/write
31* Audio control 31* Audio control
32 32
33## Current commands 33## Current Commands
34 34
35### `about` 35### `about`
36 36
@@ -77,4 +77,4 @@ Prints out the entire keymap for a certain layer
77 77
78### `exit` 78### `exit`
79 79
80Exits the terminal - same as `TERM_OFF`. \ No newline at end of file 80Exits the terminal - same as `TERM_OFF`.
diff --git a/docs/feature_unicode.md b/docs/feature_unicode.md
index 2dfb38d96..24390631d 100644
--- a/docs/feature_unicode.md
+++ b/docs/feature_unicode.md
@@ -1,4 +1,4 @@
1# Unicode support 1# Unicode Support
2 2
3There are three Unicode keymap definition method available in QMK: 3There are three Unicode keymap definition method available in QMK:
4 4
@@ -29,7 +29,7 @@ This is the current list of Unicode input method in QMK:
29* UC_WIN: (not recommended) Windows built-in Unicode input. To enable: create registry key under `HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad` of type `REG_SZ` called `EnableHexNumpad`, set its value to 1, and reboot. This method is not recommended because of reliability and compatibility issue, use WinCompose method below instead. 29* UC_WIN: (not recommended) Windows built-in Unicode input. To enable: create registry key under `HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad` of type `REG_SZ` called `EnableHexNumpad`, set its value to 1, and reboot. This method is not recommended because of reliability and compatibility issue, use WinCompose method below instead.
30* UC_WINC: Windows Unicode input using WinCompose. Requires [WinCompose](https://github.com/samhocevar/wincompose). Works reliably under many (all?) variations of Windows. 30* UC_WINC: Windows Unicode input using WinCompose. Requires [WinCompose](https://github.com/samhocevar/wincompose). Works reliably under many (all?) variations of Windows.
31 31
32# Additional language support 32# Additional Language Support
33 33
34In `quantum/keymap_extras/`, you'll see various language files - these work the same way as the alternative layout ones do. Most are defined by their two letter country/language code followed by an underscore and a 4-letter abbreviation of its name. `FR_UGRV` which will result in a `ù` when using a software-implemented AZERTY layout. It's currently difficult to send such characters in just the firmware. 34In `quantum/keymap_extras/`, you'll see various language files - these work the same way as the alternative layout ones do. Most are defined by their two letter country/language code followed by an underscore and a 4-letter abbreviation of its name. `FR_UGRV` which will result in a `ù` when using a software-implemented AZERTY layout. It's currently difficult to send such characters in just the firmware.
35 35
@@ -52,4 +52,3 @@ In the default script of AutoHotkey you can define custom hotkeys.
52 52
53The hotkeys above are for the combination CtrlAltGui and CtrlAltGuiShift plus the letter a. 53The hotkeys above are for the combination CtrlAltGui and CtrlAltGuiShift plus the letter a.
54AutoHotkey inserts the Text right of `Send, ` when this combination is pressed. 54AutoHotkey inserts the Text right of `Send, ` when this combination is pressed.
55
diff --git a/docs/feature_userspace.md b/docs/feature_userspace.md
index bbb035109..803ab5c82 100644
--- a/docs/feature_userspace.md
+++ b/docs/feature_userspace.md
@@ -1,4 +1,4 @@
1# Userspace: sharing code between keymaps 1# Userspace: Sharing Code Between Keymaps
2 2
3If you use more than one keyboard with a similar keymap, you might see the benefit in being able to share code between them. Create your own folder in `users/` named the same as your keymap (ideally your github username, `<name>`) with the following structure: 3If you use more than one keyboard with a similar keymap, you might see the benefit in being able to share code between them. Create your own folder in `users/` named the same as your keymap (ideally your github username, `<name>`) with the following structure:
4 4
@@ -93,4 +93,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
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).
96
diff --git a/docs/flashing.md b/docs/flashing.md
index 5b3c1a444..8a2e2806e 100644
--- a/docs/flashing.md
+++ b/docs/flashing.md
@@ -1,4 +1,4 @@
1# Flashing Intrustructions / Bootloader Information 1# Flashing Instructions and Bootloader Information
2 2
3There are quite a few different types of bootloaders that keyboards use, and just about all of the use a different flashing method. Luckily, projects like the [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) aim to be compatible with all the different types without having to think about it much, but this article will describe the different types of bootloaders, and available methods for flashing them. 3There are quite a few different types of bootloaders that keyboards use, and just about all of the use a different flashing method. Luckily, projects like the [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) aim to be compatible with all the different types without having to think about it much, but this article will describe the different types of bootloaders, and available methods for flashing them.
4 4
@@ -102,4 +102,3 @@ Flashing sequence:
1022. Wait for the OS to detect the device 1022. Wait for the OS to detect the device
1034. Flash a .hex file 1034. Flash a .hex file
1045. Reset the device into application mode (may be done automatically) 1045. Reset the device into application mode (may be done automatically)
105
diff --git a/docs/getting_started_build_tools.md b/docs/getting_started_build_tools.md
index 88612ff56..2a682032a 100644
--- a/docs/getting_started_build_tools.md
+++ b/docs/getting_started_build_tools.md
@@ -82,7 +82,7 @@ You will need to clone the repository to your Windows file system using the norm
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.
@@ -91,13 +91,13 @@ The Toolchain setup is done through the Windows Subsystem for Linux, and the pro
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!
93 93
94### Some important things to keep in mind 94### Some Important Things to Keep in Mind
95* You can run `util/wsl_install.sh` again to get all the newest updates. 95* You can run `util/wsl_install.sh` again to get all the newest updates.
96* Your QMK repository need to be on a Windows file system path, since WSL can't run executables outside it. 96* Your QMK repository need to be on a Windows file system path, since WSL can't run executables outside it.
97* The WSL Git is **not** compatible with the Windows Git, so use the Windows Git Bash or a windows Git GUI for all Git operations 97* The WSL Git is **not** compatible with the Windows Git, so use the Windows Git Bash or a windows Git GUI for all Git operations
98* You can edit files either inside WSL or normally using Windows, but note that if you edit makefiles or shell scripts, make sure you are using an editor that saves the files with Unix line endings. Otherwise the compilation might not work. 98* You can edit files either inside WSL or normally using Windows, but note that if you edit makefiles or shell scripts, make sure you are using an editor that saves the files with Unix line endings. Otherwise the compilation might not work.
99 99
100## Windows (Vista and later) (Deprecated) 100## Windows (Vista and Later) (Deprecated)
101 101
102These are the old instructions for Windows Vista and later. We recommend you use [MSYS2 as outlined above](#windows-with-msys2-recommended). 102These are the old instructions for Windows Vista and later. We recommend you use [MSYS2 as outlined above](#windows-with-msys2-recommended).
103 103
diff --git a/docs/getting_started_github.md b/docs/getting_started_github.md
index 574f12bed..f01ae6d01 100644
--- a/docs/getting_started_github.md
+++ b/docs/getting_started_github.md
@@ -1,4 +1,4 @@
1# How to use Github with QMK 1# How to Use Github with QMK
2 2
3Github can be a little tricky to those that aren't familiar with it - this guide will walk through each step of forking, cloning, and submitting a pull request with QMK. 3Github can be a little tricky to those that aren't familiar with it - this guide will walk through each step of forking, cloning, and submitting a pull request with QMK.
4 4
diff --git a/docs/getting_started_introduction.md b/docs/getting_started_introduction.md
index 849e99208..6cb644a22 100644
--- a/docs/getting_started_introduction.md
+++ b/docs/getting_started_introduction.md
@@ -2,11 +2,11 @@
2 2
3This page attempts to explain the basic information you need to know to work with the QMK project. It assumes that you are familiar with navigating a Unix shell, but does not assume you are familiar with C or with compiling using make. 3This page attempts to explain the basic information you need to know to work with the QMK project. It assumes that you are familiar with navigating a Unix shell, but does not assume you are familiar with C or with compiling using make.
4 4
5## Basic QMK structure 5## Basic QMK Structure
6 6
7QMK is a fork of [Jun Wako](https://github.com/tmk)'s [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders. 7QMK is a fork of [Jun Wako](https://github.com/tmk)'s [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders.
8 8
9### Keyboard project structure 9### Keyboard Project Structure
10 10
11Within the folder `keyboards` and its subfolder `handwired` is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within it you'll find the following structure: 11Within the folder `keyboards` and its subfolder `handwired` is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within it you'll find the following structure:
12 12
@@ -14,7 +14,7 @@ Within the folder `keyboards` and its subfolder `handwired` is a directory for e
14* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `Makefile` 14* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `Makefile`
15* `config.h`: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific `config.h`. 15* `config.h`: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific `config.h`.
16 16
17### Keymap structure 17### Keymap Structure
18 18
19In every keymap folder, the following files may be found. Only `keymap.c` is required, and if the rest of the files are not found the default options will be chosen. 19In every keymap folder, the following files may be found. Only `keymap.c` is required, and if the rest of the files are not found the default options will be chosen.
20 20
@@ -23,7 +23,7 @@ In every keymap folder, the following files may be found. Only `keymap.c` is req
23* `rules.mk`: the features of QMK that are enabled 23* `rules.mk`: the features of QMK that are enabled
24* `readme.md`: a description of your keymap, how others might use it, and explanations of features. Please upload images to a service like imgur. 24* `readme.md`: a description of your keymap, how others might use it, and explanations of features. Please upload images to a service like imgur.
25 25
26# The `config.h` file 26# The `config.h` File
27 27
28There are 2 `config.h` locations: 28There are 2 `config.h` locations:
29 29
diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md
index 14fadb52c..ecf030d1d 100644
--- a/docs/getting_started_make_guide.md
+++ b/docs/getting_started_make_guide.md
@@ -1,4 +1,4 @@
1# More detailed make instruction 1# More Detailed `make` Instructions
2 2
3The full syntax of the `make` command is `<keyboard_folder>:<keymap>:<target>`, where: 3The full syntax of the `make` command is `<keyboard_folder>:<keymap>:<target>`, where:
4 4
@@ -33,7 +33,7 @@ Here are some examples commands
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
37 37
38Set these variables to `no` to disable them, and `yes` to enable them. 38Set these variables to `no` to disable them, and `yes` to enable them.
39 39
@@ -133,7 +133,7 @@ This consumes about 5390 bytes.
133 133
134This enables [key lock](feature_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
138If your keymap directory has a file called `rules.mk` any options you set in that file will take precedence over other `rules.mk` options for your particular keyboard. 138If your keymap directory has a file called `rules.mk` any options you set in that file will take precedence over other `rules.mk` options for your particular keyboard.
139 139
diff --git a/docs/getting_started_vagrant.md b/docs/getting_started_vagrant.md
index 705a6af1a..e8542d751 100644
--- a/docs/getting_started_vagrant.md
+++ b/docs/getting_started_vagrant.md
@@ -10,7 +10,7 @@ Using the `/Vagrantfile` in this repository requires you have [Vagrant](http://w
10 10
11Other than having Vagrant and Virtualbox installed and possibly a restart of your computer afterwards, you can simple run a 'vagrant up' anywhere inside the folder where you checked out this project and it will start a Linux virtual machine that contains all the tools required to build this project. There is a post Vagrant startup hint that will get you off on the right foot, otherwise you can also reference the build documentation below. 11Other than having Vagrant and Virtualbox installed and possibly a restart of your computer afterwards, you can simple run a 'vagrant up' anywhere inside the folder where you checked out this project and it will start a Linux virtual machine that contains all the tools required to build this project. There is a post Vagrant startup hint that will get you off on the right foot, otherwise you can also reference the build documentation below.
12 12
13# Flashing the firmware 13# Flashing the Firmware
14 14
15The "easy" way to flash the firmware is using a tool from your host OS: 15The "easy" way to flash the firmware is using a tool from your host OS:
16 16
diff --git a/docs/glossary.md b/docs/glossary.md
index f33e7c8e8..a49e935d8 100644
--- a/docs/glossary.md
+++ b/docs/glossary.md
@@ -1,4 +1,4 @@
1# Glossary of QMK terms 1# Glossary of QMK Terms
2 2
3## ARM 3## ARM
4A line of 32-bit MCU's produced by a number of companies, such as Atmel, Cypress, Kinetis, NXP, ST, and TI. 4A line of 32-bit MCU's produced by a number of companies, such as Atmel, Cypress, Kinetis, NXP, ST, and TI.
@@ -165,6 +165,6 @@ Universal Serial Bus, the most common wired interface for a keyboard.
165## USB Host (or simply Host) 165## USB Host (or simply Host)
166The USB Host is your computer, or whatever device your keyboard is plugged into. 166The 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 8c8ade424..b1ad5dd69 100644
--- a/docs/hand_wire.md
+++ b/docs/hand_wire.md
@@ -1,4 +1,4 @@
1# Quantum Hand-wiring Guide 1# Quantum Hand-Wiring Guide
2 2
3Parts list: 3Parts list:
4* *x* keyswitches (MX, Matias, Gateron, etc) 4* *x* keyswitches (MX, Matias, Gateron, etc)
@@ -11,7 +11,7 @@ Parts list:
11* Tweezers (optional) 11* Tweezers (optional)
12* Wire cutters/snippers 12* Wire cutters/snippers
13 13
14## How the matrix works (why we need diodes) 14## How the Matrix Works (Why We Need Diodes)
15 15
16The microcontroller (in this case, the Teensy 2.0) will be setup up via the firmware to send a logical 1 to the columns, one at a time, and read from the rows, all at once - this process is called matrix scanning. The matrix is a bunch of open switches that, by default, don't allow any current to pass through - the firmware will read this as no keys being pressed. As soon as you press one key down, the logical 1 that was coming from the column the keyswitch is attached to gets passed through the switch and to the corresponding row - check out the following 2x2 example: 16The microcontroller (in this case, the Teensy 2.0) will be setup up via the firmware to send a logical 1 to the columns, one at a time, and read from the rows, all at once - this process is called matrix scanning. The matrix is a bunch of open switches that, by default, don't allow any current to pass through - the firmware will read this as no keys being pressed. As soon as you press one key down, the logical 1 that was coming from the column the keyswitch is attached to gets passed through the switch and to the corresponding row - check out the following 2x2 example:
17 17
@@ -100,9 +100,9 @@ Things act as they should! Which will get us the following data:
100 100
101The firmware can then use this correct data to detect what it should do, and eventually, what signals it needs to send to the OS. 101The firmware can then use this correct data to detect what it should do, and eventually, what signals it needs to send to the OS.
102 102
103# The actual hand-wiring 103# The Actual Hand-Wiring
104 104
105## Getting things in place 105## Getting Things in Place
106 106
107When starting this, you should have all of your stabilisers and keyswitches already installed (and optionally keycaps). If you're using a Cherry-type stabiliser (plate-mounted only, obviously), you'll need to install that before your keyswitches. If you're using Costar ones, you can installed them afterwards. 107When starting this, you should have all of your stabilisers and keyswitches already installed (and optionally keycaps). If you're using a Cherry-type stabiliser (plate-mounted only, obviously), you'll need to install that before your keyswitches. If you're using Costar ones, you can installed them afterwards.
108 108
@@ -112,7 +112,7 @@ Get your soldering iron heated-up and collect the rest of the materials from the
112 112
113Before continuing, plan out where you're going to place your Teensy. If you're working with a board that has a large (6.25u) spacebar, it may be a good idea to place it in-between switches against the plate. Otherwise, you may want to trim some of the leads on the keyswitches where you plan on putting it - this will make it a little harder to solder the wire/diodes, but give you more room to place the Teensy. 113Before continuing, plan out where you're going to place your Teensy. If you're working with a board that has a large (6.25u) spacebar, it may be a good idea to place it in-between switches against the plate. Otherwise, you may want to trim some of the leads on the keyswitches where you plan on putting it - this will make it a little harder to solder the wire/diodes, but give you more room to place the Teensy.
114 114
115## Preparing the diodes 115## Preparing the Diodes
116 116
117It's a little easier to solder the diodes in place if you bend them at a 90º angle immediately after the black line - this will help to make sure you put them on the right way (direction matters), and in the correct position. The diodes will look like this when bent (with longer leads): 117It's a little easier to solder the diodes in place if you bend them at a 90º angle immediately after the black line - this will help to make sure you put them on the right way (direction matters), and in the correct position. The diodes will look like this when bent (with longer leads):
118 118
@@ -125,7 +125,7 @@ It's a little easier to solder the diodes in place if you bend them at a 90º an
125 125
126We'll be using the long lead at the bent end to connect it to the elbow (bent part) of the next diode, creating the row. 126We'll be using the long lead at the bent end to connect it to the elbow (bent part) of the next diode, creating the row.
127 127
128## Soldering the diodes 128## Soldering the Diodes
129 129
130Starting at the top-left switch, place the diode (with tweezers if you have them) on the switch so that the diode itself is vertically aligned, and the black line is facing toward you. The straight end of the diode should be touching the left contact on the switch, and the bent end should be facing to the right and resting on the switch there, like this: 130Starting at the top-left switch, place the diode (with tweezers if you have them) on the switch so that the diode itself is vertically aligned, and the black line is facing toward you. The straight end of the diode should be touching the left contact on the switch, and the bent end should be facing to the right and resting on the switch there, like this:
131 131
@@ -159,7 +159,7 @@ After completing a row, use the wire cutters to trim the excess wire from the to
159 159
160When all of the diodes are completely soldered, it's a good idea to quickly inspect each one to ensure that your solder joints are solid and sturdy - repairing things after this is possible, but more difficult. 160When all of the diodes are completely soldered, it's a good idea to quickly inspect each one to ensure that your solder joints are solid and sturdy - repairing things after this is possible, but more difficult.
161 161
162## Soldering the columns 162## Soldering the Columns
163 163
164You'll have some options in the next process - it's a good idea to insulate the column wires (since the diodes aren't), but if you're careful enough, you can use exposed wires for the columns - it's not recommended, though. If you're using single-cored wire, stripping the plastic off of the whole wire and feeding it back on is probably the best option, but can be difficult depending on the size and materials. You'll want to leave parts of the wire exposed where you're going to be solder it onto the keyswitch. 164You'll have some options in the next process - it's a good idea to insulate the column wires (since the diodes aren't), but if you're careful enough, you can use exposed wires for the columns - it's not recommended, though. If you're using single-cored wire, stripping the plastic off of the whole wire and feeding it back on is probably the best option, but can be difficult depending on the size and materials. You'll want to leave parts of the wire exposed where you're going to be solder it onto the keyswitch.
165 165
@@ -169,7 +169,7 @@ Before beginning to solder, it helps to have your wire pre-bent (if using single
169 169
170If you're not using any insulation, you can try to keep the column wires elevated, and solder them near the tips of the keyswitch contacts - if the wires are sturdy enough, they won't short out to the row wiring an diodes. 170If you're not using any insulation, you can try to keep the column wires elevated, and solder them near the tips of the keyswitch contacts - if the wires are sturdy enough, they won't short out to the row wiring an diodes.
171 171
172## Wiring things to the Teensy 172## Wiring Things to the Teensy
173 173
174Now that the matrix itself is complete, it's time to connect what you've done to the Teensy. You'll be needing the number of pins equal to your number of columns + your number of rows. There are some pins on the Teensy that are special, like D6 (the LED on the chip), or some of the UART, SPI, I2C, or PWM channels, but only avoid those if you're planning something in addition to a keyboard. If you're unsure about wanting to add something later, you should have enough pins in total to avoid a couple. 174Now that the matrix itself is complete, it's time to connect what you've done to the Teensy. You'll be needing the number of pins equal to your number of columns + your number of rows. There are some pins on the Teensy that are special, like D6 (the LED on the chip), or some of the UART, SPI, I2C, or PWM channels, but only avoid those if you're planning something in addition to a keyboard. If you're unsure about wanting to add something later, you should have enough pins in total to avoid a couple.
175 175
@@ -185,7 +185,7 @@ When you're done with the columns, start with the rows in the same process, from
185 185
186As you move along, be sure that the Teensy is staying in place - recutting and soldering the wires is a pain! 186As you move along, be sure that the Teensy is staying in place - recutting and soldering the wires is a pain!
187 187
188# Getting some basic firmware set-up 188# Getting Some Basic Firmware Set Up
189 189
190From here, you should have a working keyboard once you program a firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch. 190From here, you should have a working keyboard once you program a firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch.
191 191
@@ -201,13 +201,13 @@ You'll want to navigate to the `keyboards/<project_name>/` folder by typing, lik
201 201
202 cd keyboards/<project_name> 202 cd keyboards/<project_name>
203 203
204### config.h 204### `config.h`
205 205
206The first thing you're going to want to modify is the `config.h` file. Find `MATRIX_ROWS` and `MATRIX_COLS` and change their definitions to match the dimensions of your keyboard's matrix. 206The first thing you're going to want to modify is the `config.h` file. Find `MATRIX_ROWS` and `MATRIX_COLS` and change their definitions to match the dimensions of your keyboard's matrix.
207 207
208Farther down are `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`. Change their definitions to match how you wired up your matrix (looking from the top of the keyboard, the rows run top-to-bottom and the columns run left-to-right). Likewise, change the definition of `UNUSED_PINS` to match the pins you did not use (this will save power). 208Farther down are `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`. Change their definitions to match how you wired up your matrix (looking from the top of the keyboard, the rows run top-to-bottom and the columns run left-to-right). Likewise, change the definition of `UNUSED_PINS` to match the pins you did not use (this will save power).
209 209
210### \<project_name\>.h 210### `<project_name>.h`
211 211
212The next file you'll want to look at is `<project_name>.h`. You're going to want to rewrite the `KEYMAP` definition - the format and syntax here is extremely important, so pay attention to how things are setup. The first half of the definition are considered the arguments - this is the format that you'll be following in your keymap later on, so you'll want to have as many k*xy* variables here as you do keys. The second half is the part that the firmware actually looks at, and will contain gaps depending on how you wired your matrix. 212The next file you'll want to look at is `<project_name>.h`. You're going to want to rewrite the `KEYMAP` definition - the format and syntax here is extremely important, so pay attention to how things are setup. The first half of the definition are considered the arguments - this is the format that you'll be following in your keymap later on, so you'll want to have as many k*xy* variables here as you do keys. The second half is the part that the firmware actually looks at, and will contain gaps depending on how you wired your matrix.
213 213
@@ -271,7 +271,7 @@ This would require our `KEYMAP` definition to look like this:
271 271
272Notice how the `k11` and `KC_NO` switched places to represent the wiring, and the unused final column on the bottom row. Sometimes it'll make more sense to put a keyswitch on a particular column, but in the end, it won't matter, as long as all of them are accounted for. You can use this process to write out the `KEYMAP` for your entire keyboard - be sure to remember that your keyboard is actually backwards when looking at the underside of it. 272Notice how the `k11` and `KC_NO` switched places to represent the wiring, and the unused final column on the bottom row. Sometimes it'll make more sense to put a keyswitch on a particular column, but in the end, it won't matter, as long as all of them are accounted for. You can use this process to write out the `KEYMAP` for your entire keyboard - be sure to remember that your keyboard is actually backwards when looking at the underside of it.
273 273
274### keymaps/<variant>/default.c 274### `keymaps/<variant>/default.c`
275 275
276This is the actual keymap for your keyboard, and the main place you'll make changes as you perfect your layout. `default.c` is the file that gets pull by default when typing `make`, but you can make other files as well, and specify them by typing `make handwired/<keyboard>:<variant>`, which will pull `keymaps/<variant>/keymap.c`. 276This is the actual keymap for your keyboard, and the main place you'll make changes as you perfect your layout. `default.c` is the file that gets pull by default when typing `make`, but you can make other files as well, and specify them by typing `make handwired/<keyboard>:<variant>`, which will pull `keymaps/<variant>/keymap.c`.
277 277
@@ -302,7 +302,7 @@ Note that the layout of the keycodes is similar to the physical layout of our ke
302 302
303It's also important to use the `KEYMAP` function we defined earlier - this is what allows the firmware to associate our intended readable keymap with the actual wiring. 303It's also important to use the `KEYMAP` function we defined earlier - this is what allows the firmware to associate our intended readable keymap with the actual wiring.
304 304
305## Compiling your firmware 305## Compiling Your Firmware
306 306
307After you've written out your entire keymap, you're ready to get the firmware compiled and onto your Teensy. Before compiling, you'll need to get your [development environment set-up](getting_started_build_tools.md) - you can skip the dfu-programmer instructions, but you'll need to download and install the [Teensy Loader](https://www.pjrc.com/teensy/loader.html) to get the firmware on your Teensy. 307After you've written out your entire keymap, you're ready to get the firmware compiled and onto your Teensy. Before compiling, you'll need to get your [development environment set-up](getting_started_build_tools.md) - you can skip the dfu-programmer instructions, but you'll need to download and install the [Teensy Loader](https://www.pjrc.com/teensy/loader.html) to get the firmware on your Teensy.
308 308
@@ -310,7 +310,7 @@ Once everything is installed, running `make` in the terminal should get you some
310 310
311Once you have your `<project_name>.hex` file, open up the Teensy loader application, and click the file icon. From here, navigate to your `QMK/keyboards/<project_name>/` folder, and select the `<project_name>.hex` file. Plug in your keyboard and press the button on the Teensy - you should see the LED on the device turn off once you do. The Teensy Loader app will change a little, and the buttons should be clickable - click the download button (down arrow), and then the reset button (right arrow), and your keyboard should be ready to go! 311Once you have your `<project_name>.hex` file, open up the Teensy loader application, and click the file icon. From here, navigate to your `QMK/keyboards/<project_name>/` folder, and select the `<project_name>.hex` file. Plug in your keyboard and press the button on the Teensy - you should see the LED on the device turn off once you do. The Teensy Loader app will change a little, and the buttons should be clickable - click the download button (down arrow), and then the reset button (right arrow), and your keyboard should be ready to go!
312 312
313## Testing your firmware 313## Testing Your Firmware
314 314
315Carefully flip your keyboard over, open up a new text document, and try typing - you should get the characters that you put into your keymap. Test each key, and note the ones that aren't working. Here's a quick trouble-shooting guide for non-working keys: 315Carefully flip your keyboard over, open up a new text document, and try typing - you should get the characters that you put into your keymap. Test each key, and note the ones that aren't working. Here's a quick trouble-shooting guide for non-working keys:
316 316
@@ -324,7 +324,7 @@ Carefully flip your keyboard over, open up a new text document, and try typing -
324 324
325If you've done all of these things, keep in mind that sometimes you might have had multiple things affecting the keyswitch, so it doesn't hurt to test the keyswitch by shorting it out at the end. 325If you've done all of these things, keep in mind that sometimes you might have had multiple things affecting the keyswitch, so it doesn't hurt to test the keyswitch by shorting it out at the end.
326 326
327# Securing the Teensy, finishing your hardware, getting fancier firmware 327# Securing the Teensy, Finishing Your Hardware, Getting Fancier Firmware
328 328
329Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out. 329Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out.
330 330
diff --git a/docs/hardware_avr.md b/docs/hardware_avr.md
index 23589e4bf..8afa80861 100644
--- a/docs/hardware_avr.md
+++ b/docs/hardware_avr.md
@@ -1,4 +1,4 @@
1# Keyboards With AVR Processors 1# Keyboards with AVR Processors
2 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. 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 4
@@ -154,4 +154,3 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096
154### Build Options 154### Build Options
155 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. 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
index a298a8dc3..46e6a7101 100644
--- a/docs/hardware_drivers.md
+++ b/docs/hardware_drivers.md
@@ -10,11 +10,11 @@ QMK is used on a lot of different hardware. While support for the most common MC
10 10
11# Available Drivers 11# Available Drivers
12 12
13## ProMicro (AVR only) 13## ProMicro (AVR Only)
14 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. 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 16
17## SSD1306 (AVR only) 17## SSD1306 (AVR Only)
18 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. 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 20
@@ -22,6 +22,6 @@ Support for SSD1306 based OLED displays. This needs to be better documented, if
22 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. 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 24
25## WS2812 (AVR only) 25## WS2812 (AVR Only)
26 26
27Support for WS2811/WS2812{a,b,c} LED's. For more information see the [RGB Light](feature_rgblight.md) page. 27Support for WS2811/WS2812{a,b,c} LED's. For more information see the [RGB Light](feature_rgblight.md) page.
diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md
index 8b16a13c9..fcc3b75ce 100644
--- a/docs/hardware_keyboard_guidelines.md
+++ b/docs/hardware_keyboard_guidelines.md
@@ -2,7 +2,7 @@
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 keyboard/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
@@ -10,7 +10,7 @@ All names should be lowercase alphanumeric, and separated by an underscore (`_`)
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 more information. Please follow the [published template](documentation_templates.md#keyboard-readmemd-template). 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
@@ -95,7 +95,7 @@ All key positions and rotations are specified in relation to the top-left corner
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
98### How Is The Metadata Exposed? 98### How is the Metadata Exposed?
99 99
100This metadata is primarily used in two ways: 100This metadata is primarily used in two ways:
101 101
@@ -104,11 +104,11 @@ This metadata is primarily used in two ways:
104 104
105Configurator authors can see the [QMK Compiler](https://docs.compile.qmk.fm/api_docs.html) docs for more information on using the JSON API. 105Configurator authors can see the [QMK Compiler](https://docs.compile.qmk.fm/api_docs.html) docs for more information on using the JSON API.
106 106
107## Non-production/handwired projects 107## Non-Production/Handwired Projects
108 108
109We'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! 109We'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!
110 110
111## Warnings as errors 111## Warnings as Errors
112 112
113When 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). 113When 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).
114 114
@@ -132,6 +132,6 @@ The core of QMK is licensed under the [GNU General Public License](https://www.g
132 132
133If 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. 133If 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.
134 134
135## Technical details 135## Technical Details
136 136
137If you're looking for more information on making your keyboard work with QMK, [check out the hardware section](hardware.md)! 137If you're looking for more information on making your keyboard work with QMK, [check out the hardware section](hardware.md)!
diff --git a/docs/how_keyboards_work.md b/docs/how_keyboards_work.md
index edd219a32..fac2b5a48 100644
--- a/docs/how_keyboards_work.md
+++ b/docs/how_keyboards_work.md
@@ -1,10 +1,10 @@
1# How keys are registered, and interpreted by computers 1# How Keys Are Registered, and Interpreted by Computers
2 2
3In this file, you can will learn the concepts of how keyboards work over USB, 3In this file, you can will learn the concepts of how keyboards work over USB,
4and you'll be able to better understand what you can expect from changing your 4and you'll be able to better understand what you can expect from changing your
5firmware directly. 5firmware directly.
6 6
7## Schematic view 7## Schematic View
8 8
9Whenever you type on 1 particular key, here is the chain of actions taking 9Whenever you type on 1 particular key, here is the chain of actions taking
10place: 10place:
@@ -49,7 +49,7 @@ layout is set to QWERTY, a sample of the matching table is as follow:
49| 0x1D | z/Z | 49| 0x1D | z/Z |
50| ... | ... | 50| ... | ... |
51 51
52## Back to the firmware 52## Back to the Firmware
53 53
54As the layout is generally fixed (unless you create your own), the firmware can actually call a keycode by its layout name directly to ease things for you. This is exactly what is done here with `KC_A` actually representing `0x04` in QWERTY. The full list can be found in [keycodes](keycodes.md). 54As the layout is generally fixed (unless you create your own), the firmware can actually call a keycode by its layout name directly to ease things for you. This is exactly what is done here with `KC_A` actually representing `0x04` in QWERTY. The full list can be found in [keycodes](keycodes.md).
55 55
diff --git a/docs/isp_flashing_guide.md b/docs/isp_flashing_guide.md
index 0819f2748..17feb43f2 100644
--- a/docs/isp_flashing_guide.md
+++ b/docs/isp_flashing_guide.md
@@ -21,7 +21,7 @@ If you're having trouble flashing/erasing your board, and running into cryptic e
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
25 25
26* [The Arduino IDE](https://www.arduino.cc/en/Main/Software) 26* [The Arduino IDE](https://www.arduino.cc/en/Main/Software)
27* [Teensyduino](https://www.pjrc.com/teensy/td_download.html) (if you're using a Teensy) 27* [Teensyduino](https://www.pjrc.com/teensy/td_download.html) (if you're using a Teensy)
@@ -38,7 +38,7 @@ This is pretty straight-forward - we'll be connecting like-things to like-things
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.
44 44
@@ -62,13 +62,13 @@ And make the changes in the last four lines. If you're using something besides t
62 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. 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
71## Flashing your firmware 71## Flashing Your Firmware
72 72
73Make sure your keyboard is unplugged from any device, and plug in your Teensy. 73Make sure your keyboard is unplugged from any device, and plug in your Teensy.
74 74
diff --git a/docs/keycodes_basic.md b/docs/keycodes_basic.md
index 4bb2b39a4..99cda6019 100644
--- a/docs/keycodes_basic.md
+++ b/docs/keycodes_basic.md
@@ -1,4 +1,4 @@
1# Basic keycodes 1# Basic Keycodes
2 2
3Basic keycodes are based on [HID Usage Keyboard/Keypad Page(0x07)](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) with following exceptions: 3Basic keycodes are based on [HID Usage Keyboard/Keypad Page(0x07)](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) with following exceptions:
4 4
diff --git a/docs/keycodes_us_ansi_shifted.md b/docs/keycodes_us_ansi_shifted.md
index 6c7ef4caa..d3020bd2a 100644
--- a/docs/keycodes_us_ansi_shifted.md
+++ b/docs/keycodes_us_ansi_shifted.md
@@ -1,4 +1,4 @@
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
diff --git a/docs/keymap.md b/docs/keymap.md
index 092ea8678..96d4563c0 100644
--- a/docs/keymap.md
+++ b/docs/keymap.md
@@ -3,7 +3,7 @@
3QMK keymaps are defined inside a C source file. The data structure is an array of arrays. The outer array is a list of layer arrays while the inner layer array is a list of keys. Most keyboards define a `KEYMAP()` macro to help you create this array of arrays. 3QMK keymaps are defined inside a C source file. The data structure is an array of arrays. The outer array is a list of layer arrays while the inner layer array is a list of keys. Most keyboards define a `KEYMAP()` macro to help you create this array of arrays.
4 4
5 5
6## Keymap and layers 6## Keymap and Layers
7In QMK, **`const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS]`** holds multiple **layers** of keymap information in **16 bit** data holding the **action code**. You can define **32 layers** at most. 7In QMK, **`const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS]`** holds multiple **layers** of keymap information in **16 bit** data holding the **action code**. You can define **32 layers** at most.
8 8
9For trivial key definitions, the higher 8 bits of the **action code** are all 0 and the lower 8 bits holds the USB HID usage code generated by the key as **keycode**. 9For trivial key definitions, the higher 8 bits of the **action code** are all 0 and the lower 8 bits holds the USB HID usage code generated by the key as **keycode**.
@@ -27,7 +27,7 @@ Respective layers can be validated simultaneously. Layers are indexed with 0 to
27 27
28Sometimes, the action code stored in keymap may be referred as keycode in some documents due to the TMK history. 28Sometimes, the action code stored in keymap may be referred as keycode in some documents due to the TMK history.
29 29
30### Keymap layer status 30### Keymap Layer Status
31The state of the Keymap layer is determined by two 32 bit parameters: 31The state of the Keymap layer is determined by two 32 bit parameters:
32 32
33* **`default_layer_state`** indicates a base keymap layer (0-31) which is always valid and to be referred (the default layer). 33* **`default_layer_state`** indicates a base keymap layer (0-31) which is always valid and to be referred (the default layer).
@@ -75,7 +75,7 @@ Note that ***higher layer has higher priority on stack of layers***, namely firm
75You can place `KC_TRANS` on overlay layer changes just part of layout to fall back on lower or base layer. 75You can place `KC_TRANS` on overlay layer changes just part of layout to fall back on lower or base layer.
76Key with `KC_TRANS` (`KC_TRNS` and `_______` are the alias) doesn't has its own keycode and refers to lower valid layers for keycode, instead. 76Key with `KC_TRANS` (`KC_TRNS` and `_______` are the alias) doesn't has its own keycode and refers to lower valid layers for keycode, instead.
77 77
78## Anatomy Of A `keymap.c` 78## Anatomy of a `keymap.c`
79 79
80For this example we will walk through an [older version of the default Clueboard 66% keymap](https://github.com/qmk/qmk_firmware/blob/ca01d94005f67ec4fa9528353481faa622d949ae/keyboards/clueboard/keymaps/default/keymap.c). You'll find it helpful to open that file in another browser window so you can look at everything in context. 80For this example we will walk through an [older version of the default Clueboard 66% keymap](https://github.com/qmk/qmk_firmware/blob/ca01d94005f67ec4fa9528353481faa622d949ae/keyboards/clueboard/keymaps/default/keymap.c). You'll find it helpful to open that file in another browser window so you can look at everything in context.
81 81
diff --git a/docs/quantum_keycodes.md b/docs/quantum_keycodes.md
index c92dff787..a2fc16ef7 100644
--- a/docs/quantum_keycodes.md
+++ b/docs/quantum_keycodes.md
@@ -6,7 +6,7 @@ All keycodes within quantum are numbers between `0x0000` and `0xFFFF`. Within yo
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
9## QMK keycodes 9## QMK Keycodes
10 10
11|Name|Description| 11|Name|Description|
12|----|-----------| 12|----|-----------|
diff --git a/docs/unit_testing.md b/docs/unit_testing.md
index 81cfef79e..31aa79f82 100644
--- a/docs/unit_testing.md
+++ b/docs/unit_testing.md
@@ -18,7 +18,7 @@ Note that Google Test and therefore any test has to be written in C++, even if t
18 18
19One thing to remember, is that you have to append `extern "C"` around all of your C file includes. 19One thing to remember, is that you have to append `extern "C"` around all of your C file includes.
20 20
21## Adding tests for new or existing features 21## Adding Tests for New or Existing Features
22 22
23If you want to unit test some feature, then take a look at the existing serial_link tests, in the `quantum/serial_link/tests folder`, and follow the steps below to create a similar structure. 23If you want to unit test some feature, then take a look at the existing serial_link tests, in the `quantum/serial_link/tests folder`, and follow the steps below to create a similar structure.
24 24
@@ -34,21 +34,21 @@ If you want to unit test some feature, then take a look at the existing serial_l
34 34
35Note how there's several different tests, each mocking out a separate part. Also note that each of them only compiles the very minimum that's needed for the tests. It's recommend that you try to do the same. For a relevant video check out [Matt Hargett "Advanced Unit Testing in C & C++](https://www.youtube.com/watch?v=Wmy6g-aVgZI) 35Note how there's several different tests, each mocking out a separate part. Also note that each of them only compiles the very minimum that's needed for the tests. It's recommend that you try to do the same. For a relevant video check out [Matt Hargett "Advanced Unit Testing in C & C++](https://www.youtube.com/watch?v=Wmy6g-aVgZI)
36 36
37## Running the tests 37## Running the Tests
38 38
39To run all the tests in the codebase, type `make test`. You can also run test matching a substring by typing `make test:matchingsubstring` Note that the tests are always compiled with the native compiler of your platform, so they are also run like any other program on your computer. 39To run all the tests in the codebase, type `make test`. You can also run test matching a substring by typing `make test:matchingsubstring` Note that the tests are always compiled with the native compiler of your platform, so they are also run like any other program on your computer.
40 40
41## Debugging the tests 41## Debugging the Tests
42 42
43If there are problems with the tests, you can find the executable in the `./build/test` folder. You should be able to run those with GDB or a similar debugger. 43If there are problems with the tests, you can find the executable in the `./build/test` folder. You should be able to run those with GDB or a similar debugger.
44 44
45## Full Integration tests 45## Full Integration Tests
46 46
47It's not yet possible to do a full integration test, where you would compile the whole firmware and define a keymap that you are going to test. However there are plans for doing that, because writing tests that way would probably be easier, at least for people that are not used to unit testing. 47It's not yet possible to do a full integration test, where you would compile the whole firmware and define a keymap that you are going to test. However there are plans for doing that, because writing tests that way would probably be easier, at least for people that are not used to unit testing.
48 48
49In that model you would emulate the input, and expect a certain output from the emulated keyboard. 49In that model you would emulate the input, and expect a certain output from the emulated keyboard.
50 50
51# Tracing variables 51# Tracing Variables
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
@@ -65,4 +65,4 @@ This will add a traced variable named "layer" (the name is just for your informa
65 65
66In order to actually detect changes to the variables you should call `VERIFY_TRACED_VARIABLES` around the code that you think that modifies the variable. If a variable is modified it will tell you between which two `VERIFY_TRACED_VARIABLES` calls the modification happened. You can then add more calls to track it down further. I don't recommend spamming the codebase with calls. It's better to start with a few, and then keep adding them in a binary search fashion. You can also delete the ones you don't need, as each call need to store the file name and line number in the ROM, so you can run out of memory if you add too many calls. 66In order to actually detect changes to the variables you should call `VERIFY_TRACED_VARIABLES` around the code that you think that modifies the variable. If a variable is modified it will tell you between which two `VERIFY_TRACED_VARIABLES` calls the modification happened. You can then add more calls to track it down further. I don't recommend spamming the codebase with calls. It's better to start with a few, and then keep adding them in a binary search fashion. You can also delete the ones you don't need, as each call need to store the file name and line number in the ROM, so you can run out of memory if you add too many calls.
67 67
68Also remember to delete all the tracing code once you have found the bug, as you wouldn't want to create a pull request with tracing code. \ No newline at end of file 68Also remember to delete all the tracing code once you have found the bug, as you wouldn't want to create a pull request with tracing code.