aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/README.md4
-rw-r--r--docs/_summary.md55
-rw-r--r--docs/adding_features_to_qmk.md4
-rw-r--r--docs/documentation_best_practices.md20
-rw-r--r--docs/faq.md218
-rw-r--r--docs/faq_build.md21
-rw-r--r--docs/faq_debug.md242
-rw-r--r--docs/faq_general.md20
-rw-r--r--docs/faq_keymap.md8
-rw-r--r--docs/feature_audio.md204
-rw-r--r--docs/feature_backlight.md17
-rw-r--r--docs/feature_bluetooth.md17
-rw-r--r--docs/feature_bootmagic.md29
-rw-r--r--docs/feature_common_shortcuts.md163
-rw-r--r--docs/feature_layouts.md77
-rw-r--r--docs/feature_leader_key.md (renamed from docs/leader_key.md)0
-rw-r--r--docs/feature_ps2_mouse.md238
-rw-r--r--docs/feature_rgblight.md49
-rw-r--r--docs/feature_thermal_printer.md10
-rw-r--r--docs/features.md2
-rw-r--r--docs/getting_started_build_tools.md (renamed from docs/build_environment_setup.md)132
-rw-r--r--docs/getting_started_github.md (renamed from docs/how_to_github.md)0
-rw-r--r--docs/getting_started_instroduction.md47
-rw-r--r--docs/getting_started_make_guide.md (renamed from docs/make_instructions.md)6
-rw-r--r--docs/getting_started_vagrant.md (renamed from docs/vagrant_guide.md)0
-rw-r--r--docs/gitbook/images/favicon.icobin117248 -> 1150 bytes
-rw-r--r--docs/gitbook/images/favicon.pngbin242 -> 793 bytes
-rw-r--r--docs/glossary.md10
-rw-r--r--docs/hand_wire.md6
-rw-r--r--docs/how_keyboards_work.md (renamed from docs/basic_how_keyboards_work.md)2
-rw-r--r--docs/key_functions.md128
-rw-r--r--docs/keycodes.md324
-rw-r--r--docs/keycodes_basic.md (renamed from docs/basic_keycodes.md)6
-rw-r--r--docs/keycodes_us_ansi_shifted.md31
-rw-r--r--docs/keymap.md7
-rw-r--r--docs/macros.md2
-rw-r--r--docs/modding_your_keyboard.md403
-rw-r--r--docs/porting_your_keyboard_to_qmk.md4
-rw-r--r--docs/qmk_overview.md75
-rw-r--r--docs/quantum_keycodes.md346
-rw-r--r--docs/redirects.json12
-rw-r--r--docs/stenography.md22
-rw-r--r--docs/understanding_qmk.md2
43 files changed, 1652 insertions, 1311 deletions
diff --git a/docs/README.md b/docs/README.md
index 06597a2b6..515ddb778 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -12,7 +12,7 @@ Otherwise, you can either download it directly ([zip](https://github.com/qmk/qmk
## How to compile {#how-to-compile}
-Before you are able to compile, you'll need to [install an environment](build_environment_setup.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:
+Before 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:
make planck-rev4-default
@@ -22,4 +22,4 @@ This would build the `rev4` revision of the `planck` with the `default` keymap.
## How to customize {#how-to-customize}
-QMK has lots of [features](features/README.md) to explore, and a good deal of [reference documentation](reference/README.md) to dig through. Most features are taken advantage of by modifying your [keymap](keymap.md), and changing the [keycodes](keycodes.md).
+QMK 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 0f65de0dd..77d208fc3 100644
--- a/docs/_summary.md
+++ b/docs/_summary.md
@@ -1,30 +1,52 @@
* [Getting started](README.md)
- * [QMK Overview](qmk_overview.md)
- * [Build Environment Setup](build_environment_setup.md)
- * [Vagrant Guide](vagrant_guide.md)
- * [Make instructions](make_instructions.md)
- * [FAQ: Creating a Keymap](faq_keymap.md)
- * [FAQ: Compiling QMK](faq_build.md)
- * [How to Github](how_to_github.md)
+ * [QMK Introduction](getting_started_introduction.md)
+ * [Install Build Tools](getting_started_build_tools.md)
+ * Alternative: [Vagrant Guide](getting_started_vagrant_guide.md)
+ * [Build/Compile instructions](getting_started_make_guide.md)
+ * [How to Use Github](getting_started_github.md)
+
+* [FAQ](faq.md)
+ * [General FAQ](faq_general.md)
+ * [Build/Compile QMK](faq_build.md)
+ * [Debugging/Troubleshooting QMK](faq_debug.md)
+ * [Keymap](faq_keymap.md)
* [Features](features.md)
- * [Layer switching](key_functions.md)
- * [Leader Key](leader_key.md)
- * [Macros](macros.md)
+ * [Layouts](feature_layouts.md)
+ * [Common Shortcuts](feature_common_shortcuts.md)
+ * [Backlight](feature_backlight.md)
+ * [Bootmagic](feature_bootmagic.md)
* [Dynamic Macros](dynamic_macros.md)
+ * [Key Lock](key_lock.md)
+ * [Leader Key](feature_leader_key.md)
+ * [Macros](macros.md)
+ * [Mouse keys](mouse_keys.md)
+ * [PS2 Mouse](feature_ps2_mouse.md)
* [Space Cadet](space_cadet_shift.md)
* [Tap Dance](tap_dance.md)
- * [Mouse keys](mouse_keys.md)
- * [Unicode](unicode.md)
+ * [Audio](feature_audio.md)
+ * [Thermal Printer](feature_thermal_printer.md)
* [Stenography](stenography.md)
- * [Key Lock](key_lock.md)
+ * [Unicode](unicode.md)
* Reference
* [Glossary](glossary.md)
* [Keymap overview](keymap.md)
* [Keycodes](keycodes.md)
- * [Basic Keycodes](basic_keycodes.md)
- * [Quantum Keycodes](quantum_keycodes.md)
+ * [Basic](keycodes_basic.md)
+ * [Quantum](quantum_keycodes.md)
+ * [Backlight](feature_backlight.md#backlight-keycodes)
+ * [Bluetooth](feature_bluetooth.md#bluetooth-keycodes)
+ * [Bootmagic](feature_bootmagic.md#bootmagic-keycodes)
+ * [Layer Switching](feature_common_shortcuts.md#switching-and-toggling-layers)
+ * [Mod+Key](feature_common_shortcuts.md#modifier-keys)
+ * [Mod Tap](feature_common_shortcuts.md#mod-tap)
+ * [One Shot Keys](feature_common_shortcuts.md#one-shot-keys)
+ * [Shifted Keys](feature_common_shortcuts.md#shifted-keycodes)
+ * [Stenography](stenography.md#keycode-reference)
+ * [RGB Light](feature_rgblight.md#rgblight-keycodes)
+ * [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes)
+ * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
* [The `config.h` File](config_options.md)
* [Customizing Functionality](custom_quantum_functions.md)
* [Documentation Best Practices](documentation_best_practices.md)
@@ -39,9 +61,8 @@
* [Porting your keyboard to QMK](porting_your_keyboard_to_qmk.md)
* For a Deeper Understanding
- * [How Keyboards Work](basic_how_keyboards_work.md)
+ * [How Keyboards Work](how_keyboards_work.md)
* [Understanding QMK](understanding_qmk.md)
* Other Topics
- * [General FAQ](faq.md)
* [Using Eclipse with QMK](eclipse.md)
diff --git a/docs/adding_features_to_qmk.md b/docs/adding_features_to_qmk.md
index fb036496c..e031ddbb7 100644
--- a/docs/adding_features_to_qmk.md
+++ b/docs/adding_features_to_qmk.md
@@ -11,6 +11,6 @@ Once you have implemented your new feature you will generally submit a [pull req
* **Disabled by default** - memory is a pretty limited on most chips QMK supports, and it's important that current keymaps aren't broken, so please allow your feature to be turned **on**, rather than being turned off. If you think it should be on by default, or reduces the size of the code, please talk with us about it.
* **Compile locally before submitting** - hopefully this one is obvious, but things need to compile! Our Travis system will catch any issues, but it's generally faster for you to compile a few keyboards locally instead of waiting for the results to come back.
-* **Consider subprojects and different chip-bases** - there are several keyboards that have subprojects that have allow for slightly different configurations, and even different chip-bases. Try to make a feature supported in ARM and AVR, or automatically disabled in one that doesn't work.
+* **Consider subprojects and different chip-bases** - there are several keyboards that have subprojects that allow for slightly different configurations, and even different chip-bases. Try to make a feature supported in ARM and AVR, or automatically disabled on platforms it doesn't work on.
* **Explain your feature** - Document it in `docs/`, either as a new file or as part of an existing file. If you don't document it other people won't be able to benefit from your hard work.
-* **Don't refactor code** - to 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).
+* **Don't refactor code** - to 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.
diff --git a/docs/documentation_best_practices.md b/docs/documentation_best_practices.md
index f30793181..059b25bcd 100644
--- a/docs/documentation_best_practices.md
+++ b/docs/documentation_best_practices.md
@@ -75,3 +75,23 @@ You can add some colors. What about a warning message?
What about an error message?
**[error [ERROR] This is not the error you are looking for]
```
+
+# Documenting Features
+
+If you create a new feature for QMK, create a documentation page for it. It doesn't have to be very long, a few sentances describing your feature and a table listing any relevant keycodes is enough. Here is a basic template:
+
+```markdown
+# My Cool Feature
+
+This page describes my cool feature. You can use my cool feature to make coffee and order cream and sugar to be delivered via drone.
+
+## My Cool Feature Keycodes
+
+|Long Name|Short Name|Description|
+|---------|----------|-----------|
+|KC_COFFEE||Make Coffee|
+|KC_CREAM||Order Cream|
+|KC_SUGAR||Order Sugar|
+```
+
+Place your documentation into `docs/feature_<my_cool_feature>.md`, and add that file to the appropriate place in `docs/_summary.md`. If you have added any keycodes be sure to add them to `docs/keycodes.md` with a link back to your feature page.
diff --git a/docs/faq.md b/docs/faq.md
index 3287578ac..506f57a72 100644
--- a/docs/faq.md
+++ b/docs/faq.md
@@ -1,216 +1,6 @@
# Frequently Asked Questions
-## General
-
-### What is QMK?
-
-[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).
-
-### Why the name Quantum?
-
-<!-- FIXME -->
-
-### What Differences Are There Between QMK and TMK?
-
-TMK was originally designed and implemented by [Jun Wako](https://github.com/tmk). QMK started as [Jack Humbert's](https://github.com/jackhumbert) fork of TMK for the Planck. After a while Jack's fork had diverged quite a bit from TMK, and in 2015 Jack decided to rename his fork to QMK.
-
-From a technical standpoint QMK builds upon TMK by adding several new features. Most notably QMK has expanded the number of available keycodes and uses these to implement advanced features like `S()`, `LCTL()`, and `MO()`. You can see a complete list of these keycodes in [Quantum Keycodes](quantum_keycodes.html).
-
-From 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 follows the quality standards. These are mostly community maintained, but the QMK team also helps when necessary.
-
-Both approaches have their merits and their drawbacks, and code flows freely between TMK and QMK when it makes sense.
-
-# Building
-
-## Windows
-
-### I'm on Windows Vista, 7, or 8, how do I setup my build environment?
-
-Follow the build instructions to [install MHV AVR Tools](https://docs.qmk.fm/build_environment_setup.html#windows-vista-and-later).
-
-### I'm on Windows 10 without the Creators Update. Do I have to install it?
-
-No, but if you don't install the creators update you will not be able to build and flash with a single command. You will be able to build but to flash you will have to use a separate program, such as [QMK Flasher](https://github.com/qmk/qmk_flasher).
-
-# Troubleshooting
-
-## Debug Console
-### hid_listen can't recognize device
-When debug console of your device is not ready you will see like this:
-
-```
-Waiting for device:.........
-```
-
-once the device is pluged in then *hid_listen* finds it you will get this message:
-
-```
-Waiting for new device:.........................
-Listening:
-```
-
-If you can't get this 'Listening:' message try building with `CONSOLE_ENABLE=yes` in [Makefile]
-
-You may need privilege to access the device on OS like Linux.
-- try `sudo hid_listen`
-
-### Can't get message on console
-Check:
-- *hid_listen* finds your device. See above.
-- Enable debug with pressing **Magic**+d. See [Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands).
-- set `debug_enable=true` usually in `matrix_init()` in **matrix.c**.
-- try using 'print' function instead of debug print. See **common/print.h**.
-- disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97).
-
-### Linux or UNIX like system requires Super User privilege
-Just use 'sudo' to execute *hid_listen* with privilege.
-```
-$ sudo hid_listen
-```
-
-Or add an *udev rule* for TMK devices with placing a file in rules directory. The directory may vary on each system.
-
-File: /etc/udev/rules.d/52-tmk-keyboard.rules(in case of Ubuntu)
-```
-# tmk keyboard products https://github.com/tmk/tmk_keyboard
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
-```
-
-## Software Issues
-
-### NKRO Doesn't work
-First you have to compile frimware with this build option `NKRO_ENABLE` in **Makefile**.
-
-Try `Magic` **N** command(`LShift+RShift+N` by default) when **NKRO** still doesn't work. You can use this command to toggle between **NKRO** and **6KRO** mode temporarily. In some situations **NKRO** doesn't work you need to switch to **6KRO** mode, in particular when you are in BIOS.
-
-If your firmeare built with `BOOTMAGIC_ENABLE` you need to turn its switch on by `BootMagic` **N** command(`Space+N` by default). This setting is stored in EEPROM and keeped over power cycles.
-
-https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch
-
-### Can't read column of matrix beyond 16
-Use `1UL<<16` instead of `1<<16` in `read_cols()` in [matrix.h] when your columns goes beyond 16.
-
-In 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`.
-
-http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279
-
-
-### Bootloader jump doesn't work
-Properly configure bootloader size in **Makefile**. With wrong section size bootloader won't probably start with **Magic command** and **Boot Magic**.
-```
-# Size of Bootloaders in bytes:
-# Atmel DFU loader(ATmega32U4) 4096
-# Atmel DFU loader(AT90USB128) 8192
-# LUFA bootloader(ATmega32U4) 4096
-# Arduino Caterina(ATmega32U4) 4096
-# USBaspLoader(ATmega***) 2048
-# Teensy halfKay(ATmega32U4) 512
-# Teensy++ halfKay(AT90USB128) 2048
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
-```
-AVR Boot section size are defined by setting **BOOTSZ** fuse in fact. Consult with your MCU datasheet.
-Note that **Word**(2 bytes) size and address are used in datasheet while TMK uses **Byte**.
-
-AVR Boot section is located at end of Flash memory like the followings.
-```
-byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286)
-0x0000 +---------------+ 0x00000 +---------------+
- | | | |
- | | | |
- | Application | | Application |
- | | | |
- = = = =
- | | 32KB-4KB | | 128KB-8KB
-0x6000 +---------------+ 0x1E000 +---------------+
- | Bootloader | 4KB | Bootloader | 8KB
-0x7FFF +---------------+ 0x1FFFF +---------------+
-
-
-byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286)
-0x0000 +---------------+ 0x00000 +---------------+
- | | | |
- | | | |
- | Application | | Application |
- | | | |
- = = = =
- | | 32KB-512B | | 128KB-2KB
-0x7E00 +---------------+ 0x1FC00 +---------------+
- | Bootloader | 512B | Bootloader | 2KB
-0x7FFF +---------------+ 0x1FFFF +---------------+
-```
-
-And see this discussion for further reference.
-https://github.com/tmk/tmk_keyboard/issues/179
-
-
-### Special Extra key doesn't work(System, Audio control keys)
-You need to define `EXTRAKEY_ENABLE` in `rules.mk` to use them in QMK.
-
-```
-EXTRAKEY_ENABLE = yes # Audio control and System control
-```
-
-### Wakeup from sleep doesn't work
-
-In Windows check `Allow this device to wake the computer` setting in Power **Management property** tab of **Device Manager**. Also check BIOS setting.
-
-Pressing any key during sleep should wake host.
-
-## Hardware Issues
-
-### TrackPoint needs reset circuit(PS/2 mouse support)
-Without reset circuit you will have inconsistent reuslt due to improper initialize of the hardware. See circuit schematic of TPM754.
-
-- http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447
-- http://www.mikrocontroller.net/attachment/52583/tpm754.pdf
-
-### Using Arduino?
-
-**Note that Arduino pin naming is different from actual chip.** For example, Arduino pin `D0` is not `PD0`. Check circuit with its schematics yourself.
-
-- http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf
-- http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf
-
-Arduino leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem.
-
-### Using PF4-7 pins of USB AVR?
-You 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.
-
-If you are using Teensy this isn't needed. Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function.
-
-See this code.
-```
- // JTAG disable for PORT F. write JTD bit twice within four cycles.
- MCUCR |= (1<<JTD);
- MCUCR |= (1<<JTD);
-```
-https://github.com/tmk/tmk_keyboard/blob/master/keyboard/hbkb/matrix.c#L67
-
-And read **26.5.1 MCU Control Register – MCUCR** of ATMega32U4 datasheet.
-
-
-### Program Arduino Micro/Leonardo
-Push reset button and then run command like this within 8 seconds.
-
-```
-avrdude -patmega32u4 -cavr109 -b57600 -Uflash:w:adb_usb.hex -P/dev/ttyACM0
-```
-
-Device name will vary depending on your system.
-
-http://arduino.cc/en/Main/ArduinoBoardMicro
-https://geekhack.org/index.php?topic=14290.msg1563867#msg1563867
-
-### Problem on BIOS(UEFI)/Resume(Sleep&Wake)/Power cycles
-Some people reported their keyboard stops working on BIOS and/or after resume(power cycles).
-
-As 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.
-
-https://github.com/tmk/tmk_keyboard/issues/266
-https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
-
-## Flashing Problems
-
-### Can't use dfu-programmer or QMK Flasher to flash on Windows
-
-Windows requires a driver to support the keyboard in DFU mode. You can use [QMK Driver Installer](https://github.com/qmk/qmk_driver_installer/releases) to install the necessary drivers.
+* [General](faq_general.md)
+* [Building or Compiling QMK](faq_build.md)
+* [Debugging and Troubleshooting QMK](faq_debug.md)
+* [Keymap](faq_keymap.md)
diff --git a/docs/faq_build.md b/docs/faq_build.md
index ebe8caccd..fe3aeeef6 100644
--- a/docs/faq_build.md
+++ b/docs/faq_build.md
@@ -1,17 +1,9 @@
# Frequently Asked Build Questions
-This page covers questions about building QMK. If you have not yet you should read the [Build Guide](https://github.com/qmk/qmk_firmware/blob/master/docs/build_guide.md).
-
-In short,
-
- $ make [-f Makefile.<variant>] [KEYMAP=...] clean
- $ make [-f Makefile.<variant>] [KEYMAP=...]
- $ make [-f Makefile.<variant>] [KEYMAP=...] dfu
-
+This 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](make_instructions.md) guides.
## Can't program on Linux
-You 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.
+You 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.
In short when your controller is ATMega32u4,
@@ -21,16 +13,16 @@ In short when your controller is ATMega32u4,
or just
- $ sudo make dfu
+ $ sudo make <keyboard>-<keymap>-dfu
-But to run `make` with root privilege is not good idea. Use former method as possible.
+But to run `make` with root privilege is not good idea. Use former method if possible.
## WINAVR is obsolete
It is no longer recommended and may cause some problem.
-See [Issue #99](https://github.com/tmk/tmk_keyboard/issues/99).
+See [TMK Issue #99](https://github.com/tmk/tmk_keyboard/issues/99).
## USB VID and PID
-You can use any ID you want with editing `config.h`. Using any presumably unused ID will be no problem in fact except for very least chance of collision with other product.
+You can use any ID you want with editing `config.h`. Using any presumably unused ID will be no problem in fact except for very low chance of collision with other product.
Most boards in QMK use `0xFEED` as the vendor ID. You should look through other keyboards to make sure you pick a unique Product ID.
@@ -41,7 +33,6 @@ You can buy a really unique VID:PID here. I don't think you need this for person
- http://www.obdev.at/products/vusb/license.html
- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1
-
## Linux udev rules
On 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/`.
diff --git a/docs/faq_debug.md b/docs/faq_debug.md
new file mode 100644
index 000000000..3f7cfe747
--- /dev/null
+++ b/docs/faq_debug.md
@@ -0,0 +1,242 @@
+# Debugging FAQ
+
+This page details various common questions people have about troubleshooting their keyboards.
+
+# Debug Console
+
+## hid_listen can't recognize device
+When debug console of your device is not ready you will see like this:
+
+```
+Waiting for device:.........
+```
+
+once the device is pluged in then *hid_listen* finds it you will get this message:
+
+```
+Waiting for new device:.........................
+Listening:
+```
+
+If you can't get this 'Listening:' message try building with `CONSOLE_ENABLE=yes` in [Makefile]
+
+You may need privilege to access the device on OS like Linux.
+- try `sudo hid_listen`
+
+## Can't get message on console
+Check:
+- *hid_listen* finds your device. See above.
+- Enable debug with pressing **Magic**+d. See [Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands).
+- set `debug_enable=true` usually in `matrix_init()` in **matrix.c**.
+- try using 'print' function instead of debug print. See **common/print.h**.
+- disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97).
+
+## Linux or UNIX like system requires Super User privilege
+Just use 'sudo' to execute *hid_listen* with privilege.
+```
+$ sudo hid_listen
+```
+
+Or add an *udev rule* for TMK devices with placing a file in rules directory. The directory may vary on each system.
+
+File: /etc/udev/rules.d/52-tmk-keyboard.rules(in case of Ubuntu)
+```
+# tmk keyboard products https://github.com/tmk/tmk_keyboard
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
+```
+
+***
+
+# Miscellaneous
+## Safety Considerations
+
+You probably don't want to "brick" your keyboard, making it impossible
+to rewrite firmware onto it. Here are some of the parameters to show
+what things are (and likely aren't) too risky.
+
+- If your keyboard map does not include RESET, then, to get into DFU
+ mode, you will need to press the reset button on the PCB, which
+ requires unscrewing the bottom.
+- Messing with tmk_core / common files might make the keyboard
+ inoperable
+- Too large a .hex file is trouble; `make dfu` will erase the block,
+ test the size (oops, wrong order!), which errors out, failing to
+ flash the keyboard, leaving it in DFU mode.
+ - To this end, note that the maximum .hex file size on Planck is
+ 7000h (28672 decimal)
+
+```
+Linking: .build/planck_rev4_cbbrowne.elf [OK]
+Creating load file for Flash: .build/planck_rev4_cbbrowne.hex [OK]
+
+Size after:
+ text data bss dec hex filename
+ 0 22396 0 22396 577c planck_rev4_cbbrowne.hex
+```
+
+ - The above file is of size 22396/577ch, which is less than
+ 28672/7000h
+ - As long as you have a suitable alternative .hex file around, you
+ can retry, loading that one
+ - Some of the options you might specify in your keyboard's Makefile
+ consume extra memory; watch out for BOOTMAGIC_ENABLE,
+ MOUSEKEY_ENABLE, EXTRAKEY_ENABLE, CONSOLE_ENABLE, API_SYSEX_ENABLE
+- DFU tools do /not/ allow you to write into the bootloader (unless
+ you throw in extra fruitsalad of options), so there is little risk
+ there.
+- EEPROM has around a 100000 write cycle. You shouldn't rewrite the
+ firmware repeatedly and continually; that'll burn the EEPROM
+ eventually.
+## NKRO Doesn't work
+First you have to compile frimware with this build option `NKRO_ENABLE` in **Makefile**.
+
+Try `Magic` **N** command(`LShift+RShift+N` by default) when **NKRO** still doesn't work. You can use this command to toggle between **NKRO** and **6KRO** mode temporarily. In some situations **NKRO** doesn't work you need to switch to **6KRO** mode, in particular when you are in BIOS.
+
+If your firmeare built with `BOOTMAGIC_ENABLE` you need to turn its switch on by `BootMagic` **N** command(`Space+N` by default). This setting is stored in EEPROM and keeped over power cycles.
+
+https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch
+
+
+## TrackPoint needs reset circuit(PS/2 mouse support)
+Without reset circuit you will have inconsistent reuslt due to improper initialize of the hardware. See circuit schematic of TPM754.
+
+- http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447
+- http://www.mikrocontroller.net/attachment/52583/tpm754.pdf
+
+
+## Can't read column of matrix beyond 16
+Use `1UL<<16` instead of `1<<16` in `read_cols()` in [matrix.h] when your columns goes beyond 16.
+
+In 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`.
+
+http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279
+
+
+## Bootloader jump doesn't work
+Properly configure bootloader size in **Makefile**. With wrong section size bootloader won't probably start with **Magic command** and **Boot Magic**.
+```
+# Size of Bootloaders in bytes:
+# Atmel DFU loader(ATmega32U4) 4096
+# Atmel DFU loader(AT90USB128) 8192
+# LUFA bootloader(ATmega32U4) 4096
+# Arduino Caterina(ATmega32U4) 4096
+# USBaspLoader(ATmega***) 2048
+# Teensy halfKay(ATmega32U4) 512
+# Teensy++ halfKay(AT90USB128) 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+```
+AVR Boot section size are defined by setting **BOOTSZ** fuse in fact. Consult with your MCU datasheet.
+Note that **Word**(2 bytes) size and address are used in datasheet while TMK uses **Byte**.
+
+AVR Boot section is located at end of Flash memory like the followings.
+```
+byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286)
+0x0000 +---------------+ 0x00000 +---------------+
+ | | | |
+ | | | |
+ | Application | | Application |
+ | | | |
+ = = = =
+ | | 32KB-4KB | | 128KB-8KB
+0x6000 +---------------+ 0x1E000 +---------------+
+ | Bootloader | 4KB | Bootloader | 8KB
+0x7FFF +---------------+ 0x1FFFF +---------------+
+
+
+byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286)
+0x0000 +---------------+ 0x00000 +---------------+
+ | | | |
+ | | | |
+ | Application | | Application |
+ | | | |
+ = = = =
+ | | 32KB-512B | | 128KB-2KB
+0x7E00 +---------------+ 0x1FC00 +---------------+
+ | Bootloader | 512B | Bootloader | 2KB
+0x7FFF +---------------+ 0x1FFFF +---------------+
+```
+
+And see this discussion for further reference.
+https://github.com/tmk/tmk_keyboard/issues/179
+
+
+## Special Extra key doesn't work(System, Audio control keys)
+You need to define `EXTRAKEY_ENABLE` in `rules.mk` to use them in QMK.
+
+```
+EXTRAKEY_ENABLE = yes # Audio control and System control
+```
+
+## Wakeup from sleep doesn't work
+
+In Windows check `Allow this device to wake the computer` setting in Power **Management property** tab of **Device Manager**. Also check BIOS setting.
+
+Pressing any key during sleep should wake host.
+
+## Using Arduino?
+
+**Note that Arduino pin naming is different from actual chip.** For example, Arduino pin `D0` is not `PD0`. Check circuit with its schematics yourself.
+
+- http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf
+- http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf
+
+Arduino leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem.
+
+
+## Using PF4-7 pins of USB AVR?
+You 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.
+
+If you are using Teensy this isn't needed. Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function.
+
+See this code.
+```
+ // JTAG disable for PORT F. write JTD bit twice within four cycles.
+ MCUCR |= (1<<JTD);
+ MCUCR |= (1<<JTD);
+```
+https://github.com/tmk/tmk_keyboard/blob/master/keyboard/hbkb/matrix.c#L67
+
+And read **26.5.1 MCU Control Register – MCUCR** of ATMega32U4 datasheet.
+
+
+## Adding LED indicators of Lock keys
+You need your own LED indicators for CapsLock, ScrollLock and NumLock? See this post.
+
+http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p191560
+
+## Program Arduino Micro/Leonardo
+Push reset button and then run command like this within 8 seconds.
+
+```
+avrdude -patmega32u4 -cavr109 -b57600 -Uflash:w:adb_usb.hex -P/dev/ttyACM0
+```
+
+Device name will vary depending on your system.
+
+http://arduino.cc/en/Main/ArduinoBoardMicro
+https://geekhack.org/index.php?topic=14290.msg1563867#msg1563867
+
+
+## USB 3 compatibility
+I heard some people have a problem with USB 3 port, try USB 2 port.
+
+
+## Mac compatibility
+### OS X 10.11 and Hub
+https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034
+
+
+## Problem on BIOS(UEFI)/Resume(Sleep&Wake)/Power cycles
+Some people reported their keyboard stops working on BIOS and/or after resume(power cycles).
+
+As 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.
+
+https://github.com/tmk/tmk_keyboard/issues/266
+https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
+
+
+
+## FLIP doesn't work
+### AtLibUsbDfu.dll not found
+Remove current driver and reinstall one FLIP provides from DeviceManager.
+http://imgur.com/a/bnwzy
diff --git a/docs/faq_general.md b/docs/faq_general.md
new file mode 100644
index 000000000..fcc40e0a1
--- /dev/null
+++ b/docs/faq_general.md
@@ -0,0 +1,20 @@
+# Frequently Asked Questions
+
+## What is QMK?
+
+[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).
+
+### Why the name Quantum?
+
+<!-- FIXME -->
+
+## What Differences Are There Between QMK and TMK?
+
+TMK was originally designed and implemented by [Jun Wako](https://github.com/tmk). QMK started as [Jack Humbert's](https://github.com/jackhumbert) fork of TMK for the Planck. After a while Jack's fork had diverged quite a bit from TMK, and in 2015 Jack decided to rename his fork to QMK.
+
+From a technical standpoint QMK builds upon TMK by adding several new features. Most notably QMK has expanded the number of available keycodes and uses these to implement advanced features like `S()`, `LCTL()`, and `MO()`. You can see a complete list of these keycodes in [Keycodes](keycodes.md).
+
+From 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.
+
+Both approaches have their merits and their drawbacks, and code flows freely between TMK and QMK when it makes sense.
+
diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md
index 3c2795816..eb49a3699 100644
--- a/docs/faq_keymap.md
+++ b/docs/faq_keymap.md
@@ -1,9 +1,9 @@
-# Frequently Asked Keymap Questions
+# Keymap FAQ
-This page covers questions people often have about keymaps. If you haven't you should read [Keymap Overview](keymap.html) first.
+This page covers questions people often have about keymaps. If you haven't you should read [Keymap Overview](keymap.md) first.
## What Keycodes Can I Use?
-See [Basic Keycodes](keycodes.html) and [Quantum Keycodes](quantum_keycodes.html) for most of the keys you can define.
+See [Keycodes](keycodes.md) for an index of keycodes available to you. These link to more extensive documentation when available.
Keycodes are actually defined in [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h).
@@ -116,7 +116,7 @@ https://github.com/tekezo/Karabiner/issues/403
## Esc and `~ on a key
-Use `GRAVE_ESC` or `KC_GESC` in your keymap. `GUI`+`GRAVE_ESC` results in `\`` and `SHIFT`+`GRAVE_ESC` results in `~`.
+Use `GRAVE_ESC` or `KC_GESC` in your keymap. `GUI`+`GRAVE_ESC` results in `` ` `` and `SHIFT`+`GRAVE_ESC` results in `~`.
Note that this will break the CTRL+SHIFT+ESC shortcut to the Windows task manager. Use `#define GRAVE_ESC_CTRL_OVERRIDE` in your `config.h` to get the shortcut back. With this option, `ESC_GRAVE` results in `ESC` if `CTRL` is held, even if `SHIFT` or `GUI` are also held.
diff --git a/docs/feature_audio.md b/docs/feature_audio.md
new file mode 100644
index 000000000..c142ff69c
--- /dev/null
+++ b/docs/feature_audio.md
@@ -0,0 +1,204 @@
+# Audio
+
+Your keyboard can make sounds! If you've got a Planck, Preonic, or basically any AVR keyboard that allows access to the C6 or B5 port (`#define C6_AUDIO` and/or `#define B5_AUDIO`), you can hook up a simple speaker and make it beep. You can use those beeps to indicate layer transitions, modifiers, special keys, or just to play some funky 8bit tunes.
+
+If you add `AUDIO_ENABLE = yes` to your `rules.mk`, there's a couple different sounds that will automatically be enabled without any other configuration:
+
+```
+STARTUP_SONG // plays when the keyboard starts up (audio.c)
+GOODBYE_SONG // plays when you press the RESET key (quantum.c)
+AG_NORM_SONG // plays when you press AG_NORM (quantum.c)
+AG_SWAP_SONG // plays when you press AG_SWAP (quantum.c)
+MUSIC_ON_SONG // plays when music mode is activated (process_music.c)
+MUSIC_OFF_SONG // plays when music mode is deactivated (process_music.c)
+CHROMATIC_SONG // plays when the chromatic music mode is selected (process_music.c)
+GUITAR_SONG // plays when the guitar music mode is selected (process_music.c)
+VIOLIN_SONG // plays when the violin music mode is selected (process_music.c)
+MAJOR_SONG // plays when the major music mode is selected (process_music.c)
+```
+
+You can override the default songs by doing something like this in your `config.h`:
+
+```c
+#ifdef AUDIO_ENABLE
+ #define STARTUP_SONG SONG(STARTUP_SOUND)
+#endif
+```
+
+A full list of sounds can be found in [quantum/audio/song_list.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/song_list.h) - feel free to add your own to this list! All available notes can be seen in [quantum/audio/musical_notes.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/musical_notes.h).
+
+To play a custom sound at a particular time, you can define a song like this (near the top of the file):
+
+```c
+float my_song[][2] = SONG(QWERTY_SOUND);
+```
+
+And then play your song like this:
+
+```c
+PLAY_SONG(my_song);
+```
+
+Alternatively, you can play it in a loop like this:
+
+```c
+PLAY_LOOP(my_song);
+```
+
+It'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.
+
+## Music mode
+
+The 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.
+
+Recording is experimental due to some memory issues - if you experience some weird behavior, unplugging/replugging your keyboard will fix things.
+
+Keycodes available:
+
+* `MU_ON` - Turn music mode on
+* `MU_OFF` - Turn music mode off
+* `MU_TOG` - Toggle music mode
+* `MU_MOD` - Cycle through the music modes:
+ * `CHROMATIC_MODE` - Chromatic scale, row changes the octave
+ * `GUITAR_MODE` - Chromatic scale, but the row changes the string (+5 st)
+ * `VIOLIN_MODE` - Chromatic scale, but the row changes the string (+7 st)
+ * `MAJOR_MODE` - Major scale
+
+In music mode, the following keycodes work differently, and don't pass through:
+
+* `LCTL` - start a recording
+* `LALT` - stop recording/stop playing
+* `LGUI` - play recording
+* `KC_UP` - speed-up playback
+* `KC_DOWN` - slow-down playback
+
+By default, `MUSIC_MASK` is set to `keycode < 0xFF` which means keycodes less than `0xFF` are turned into notes, and don't output anything. You can change this by defining this in your `config.h` like this:
+
+ #define MUSIC_MASK keycode != KC_NO
+
+Which will capture all keycodes - be careful, this will get you stuck in music mode until you restart your keyboard!
+
+The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, add something like this to your `config.h`:
+
+ #define PITCH_STANDARD_A 432.0f
+
+## MIDI functionalty
+
+This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile.
+
+<!-- FIXME: this formatting needs work
+
+## Audio
+
+```c
+#ifdef AUDIO_ENABLE
+ AU_ON,
+ AU_OFF,
+ AU_TOG,
+
+ #ifdef FAUXCLICKY_ENABLE
+ FC_ON,
+ FC_OFF,
+ FC_TOG,
+ #endif
+
+ // Music mode on/off/toggle
+ MU_ON,
+ MU_OFF,
+ MU_TOG,
+
+ // Music voice iterate
+ MUV_IN,
+ MUV_DE,
+#endif
+```
+
+### Midi
+
+#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
+ MI_ON, // send midi notes when music mode is enabled
+ MI_OFF, // don't send midi notes when music mode is enabled
+#endif
+
+MIDI_TONE_MIN,
+MIDI_TONE_MAX
+
+MI_C = MIDI_TONE_MIN,
+MI_Cs,
+MI_Db = MI_Cs,
+MI_D,
+MI_Ds,
+MI_Eb = MI_Ds,
+MI_E,
+MI_F,
+MI_Fs,
+MI_Gb = MI_Fs,
+MI_G,
+MI_Gs,
+MI_Ab = MI_Gs,
+MI_A,
+MI_As,
+MI_Bb = MI_As,
+MI_B,
+
+MIDI_TONE_KEYCODE_OCTAVES > 1
+
+where x = 1-5:
+MI_C_x,
+MI_Cs_x,
+MI_Db_x = MI_Cs_x,
+MI_D_x,
+MI_Ds_x,
+MI_Eb_x = MI_Ds_x,
+MI_E_x,
+MI_F_x,
+MI_Fs_x,
+MI_Gb_x = MI_Fs_x,
+MI_G_x,
+MI_Gs_x,
+MI_Ab_x = MI_Gs_x,
+MI_A_x,
+MI_As_x,
+MI_Bb_x = MI_As_x,
+MI_B_x,
+
+MI_OCT_Nx 1-2
+MI_OCT_x 0-7
+MIDI_OCTAVE_MIN = MI_OCT_N2,
+MIDI_OCTAVE_MAX = MI_OCT_7,
+MI_OCTD, // octave down
+MI_OCTU, // octave up
+
+MI_TRNS_Nx 1-6
+MI_TRNS_x 0-6
+MIDI_TRANSPOSE_MIN = MI_TRNS_N6,
+MIDI_TRANSPOSE_MAX = MI_TRNS_6,
+MI_TRNSD, // transpose down
+MI_TRNSU, // transpose up
+
+MI_VEL_x 1-10
+MIDI_VELOCITY_MIN = MI_VEL_1,
+MIDI_VELOCITY_MAX = MI_VEL_9,
+MI_VELD, // velocity down
+MI_VELU, // velocity up
+
+MI_CHx 1-16
+MIDI_CHANNEL_MIN = MI_CH1
+MIDI_CHANNEL_MAX = MI_CH16,
+MI_CHD, // previous channel
+MI_CHU, // next channel
+
+MI_ALLOFF, // all notes off
+
+MI_SUS, // sustain
+MI_PORT, // portamento
+MI_SOST, // sostenuto
+MI_SOFT, // soft pedal
+MI_LEG, // legato
+
+MI_MOD, // modulation
+MI_MODSD, // decrease modulation speed
+MI_MODSU, // increase modulation speed
+#endif // MIDI_ADVANCED
+
+-->
diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md
new file mode 100644
index 000000000..c419b7ccc
--- /dev/null
+++ b/docs/feature_backlight.md
@@ -0,0 +1,17 @@
+# Backlighting
+
+<!-- FIXME: Describe how backlighting works in QMK -->
+
+## Backlight Keycodes
+
+These keycodes control the backlight. Most keyboards use this for single color in-switch lighting.
+
+|Name|Description|
+|----|-----------|
+|`BL_x`|Set a specific backlight level between 0-9|
+|`BL_ON`|An alias for `BL_9`|
+|`BL_OFF`|An alias for `BL_0`|
+|`BL_DEC`|Turn the backlight level down by 1|
+|`BL_INC`|Turn the backlight level up by 1|
+|`BL_TOGG`|Toggle the backlight on or off|
+|`BL_STEP`|Step through backlight levels, wrapping around to 0 when you reach the top.|
diff --git a/docs/feature_bluetooth.md b/docs/feature_bluetooth.md
new file mode 100644
index 000000000..79a54208e
--- /dev/null
+++ b/docs/feature_bluetooth.md
@@ -0,0 +1,17 @@
+# Bluetooth
+
+## Bluetooth functionality
+
+This 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.
+
+<!-- FIXME: Document bluetooth support more completely. -->
+
+## Bluetooth Keycodes
+
+This is used when multiple keyboard outputs can be selected. Currently this only allows for switching between USB and Bluetooth on keyboards that support both.
+
+|Name|Description|
+|----|-----------|
+|`OUT_AUTO`|auto mode|
+|`OUT_USB`|usb only|
+|`OUT_BT`|bluetooth|
diff --git a/docs/feature_bootmagic.md b/docs/feature_bootmagic.md
new file mode 100644
index 000000000..3cf7d8d2a
--- /dev/null
+++ b/docs/feature_bootmagic.md
@@ -0,0 +1,29 @@
+# Bootmagic
+
+<!-- FIXME: Describe the bootmagic feature here. -->
+
+## Bootmagic Keycodes
+
+Shortcuts for bootmagic options. You can use these even when bootmagic is off.
+
+|Name|Description|
+|----|-----------|
+|`MAGIC_SWAP_CONTROL_CAPSLOCK`|Swap Capslock and Left Control|
+|`MAGIC_CAPSLOCK_TO_CONTROL`|Treat Capslock like a Control Key|
+|`MAGIC_SWAP_LALT_LGUI`|Swap the left Alt and GUI keys|
+|`MAGIC_SWAP_RALT_RGUI`|Swap the right Alt and GUI keys|
+|`MAGIC_NO_GUI`|Disable the GUI key|
+|`MAGIC_SWAP_GRAVE_ESC`|Swap the Grave and Esc key.|
+|`MAGIC_SWAP_BACKSLASH_BACKSPACE`|Swap backslack and backspace|
+|`MAGIC_HOST_NKRO`|Force NKRO on|
+|`MAGIC_SWAP_ALT_GUI`/`AG_SWAP`|Swap Alt and Gui on both sides|
+|`MAGIC_UNSWAP_CONTROL_CAPSLOCK`|Disable the Control/Capslock swap|
+|`MAGIC_UNCAPSLOCK_TO_CONTROL`|Disable treating Capslock like Control |
+|`MAGIC_UNSWAP_LALT_LGUI`|Disable Left Alt and GUI switching|
+|`MAGIC_UNSWAP_RALT_RGUI`|Disable Right Alt and GUI switching|
+|`MAGIC_UNNO_GUI`|Enable the GUI key |
+|`MAGIC_UNSWAP_GRAVE_ESC`|Disable the Grave/Esc swap |
+|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`|Disable the backslash/backspace swap|
+|`MAGIC_UNHOST_NKRO`|Force NKRO off|
+|`MAGIC_UNSWAP_ALT_GUI`/`AG_NORM`|Disable the Alt/GUI switching|
+|`MAGIC_TOGGLE_NKRO`|Turn NKRO on or off|
diff --git a/docs/feature_common_shortcuts.md b/docs/feature_common_shortcuts.md
new file mode 100644
index 000000000..a3dde8b67
--- /dev/null
+++ b/docs/feature_common_shortcuts.md
@@ -0,0 +1,163 @@
+# Common Keymap Shortcuts
+
+Your keymap can include shortcuts to common operations, for example shifted keys. This page documents the functions that are available to you.
+
+People often define custom names using `#define`. For example:
+
+```c
+#define FN_CAPS LT(_FL, KC_CAPSLOCK)
+#define ALT_TAB LALT(KC_TAB)
+```
+
+This will allow you to use `FN_CAPS` and `ALT_TAB` in your `KEYMAP()`, keeping it more readable.
+
+### Limits of these aliases
+
+Currently, the keycodes able to used with these functions are limited to the [Basic Keycodes](keycodes_basic.html), meaning you can't use keycodes like `KC_TILD`, or anything greater than 0xFF. For a full list of the keycodes able to be used see [Basic Keycodes](keycodes_basic.html).
+
+## Switching and toggling layers
+
+These functions allow you to activate layers in various ways.
+
+* `MO(layer)` - momentary switch to *layer*. As soon as you let go of the key, the layer is deactivated and you pop back out to the previous layer.
+* `LT(layer, kc)` - momentary switch to *layer* when held, and *kc* when tapped.
+* `TG(layer)` - toggles a layer on or off.
+* `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).
+* `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.
+
+## Working With Layers
+
+Care 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.
+
+### Beginners
+
+If you are just getting started with QMK you will want to keep everything simple. Follow these guidelines when setting up your layers:
+
+* Setup layer 0 as your "base" layer. This is your normal typing layer, and could be whatever layout you want (qwerty, dvorak, colemak, etc.)
+* Arrange your layers in a "tree" layout, with layer 0 as the root. Do not try to enter the same layer from more than one other layer.
+* Never try to stack a higher numbered layer on top of a lower numbered layer. Doing so is tricky and error prone.
+
+### Intermediate Users
+
+Sometimes you need more than one base layer. For example, if you want to switch between QWERTY and Dvorak, switch between layouts for different countries, or switch your layout for different videogames. Your base layers should always be the lowest numbered layers. When you have multiple base layers you should always treat them as multually exclusive. When one base layer is on the others are off.
+
+### Advanced Users
+
+Once you have a good feel for how layers work and what you can do, you can get more creative. The rules listed in the beginner section will help you be successful by avoiding some of the tricker details but they can be constraining, especially for ultra-compact keyboard users. Understanding how layers work will allow you to use them in more advanced ways.
+
+Layers stack on top of each other in numerical order. When determining what a keypress does, QMK scans the layers from the top down, stopping when it reaches the first active layer that is not set to `KC_TRNS`. As a result if you activate a layer that is numerically lower than your current layer, and your current layer (or another layer that is active and higher than your target layer) has something other than `KC_TRNS`, that is the key that will be sent, not the key on the layer you just activated. This is the cause of most people's "why doesn't my layer get switched" problem.
+
+## Modifier keys
+
+These 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.
+
+* `LSFT(kc)` or `S(kc)` - applies left Shift to *kc* (keycode)
+* `RSFT(kc)` - applies right Shift to *kc*
+* `LCTL(kc)` - applies left Control to *kc*
+* `RCTL(kc)` - applies right Control to *kc*
+* `LALT(kc)` - applies left Alt to *kc*
+* `RALT(kc)` - applies right Alt to *kc*
+* `LGUI(kc)` - applies left GUI (command/win) to *kc*
+* `RGUI(kc)` - applies right GUI (command/win) to *kc*
+* `HYPR(kc)` - applies Hyper (all modifiers) to *kc*
+* `MEH(kc)` - applies Meh (all modifiers except Win/Cmd) to *kc*
+* `LCAG(kc)` - applies CtrlAltGui to *kc*
+
+You can also chain these, like this:
+
+ LALT(LCTL(KC_DEL)) -- this makes a key that sends Alt, Control, and Delete in a single keypress.
+
+## Shifted Keycodes
+
+The following shortcuts automatically add `LSFT()` to keycodes to get commonly used symbols.
+
+|Name|Description|
+|----|-----------|
+| KC_TILD | ~ |
+| KC_EXLM | ! |
+| KC_QUES | ? |
+| KC_AT | @ |
+| KC_HASH | # |
+| KC_DLR | $ |
+| KC_PERC | % |
+| KC_CIRC | ^ |
+| KC_AMPR | & |
+| KC_ASTR | * |
+| KC_LPRN | ( |
+| KC_RPRN | ) |
+| KC_UNDS | _ |
+| KC_PLUS | + |
+| KC_DQUO | " |
+| KC_LCBR | { |
+| KC_RCBR | } |
+| KC_LABK | < |
+| KC_RABK | > |
+| KC_PIPE | | |
+| KC_COLN | : |
+
+## Mod Tap
+
+`MT(mod, kc)` - is *mod* (modifier key - MOD_LCTL, MOD_LSFT) when held, and *kc* when tapped. In other words, you can have a key that sends Esc (or the letter O or whatever) when you tap it, but works as a Control key or a Shift key when you hold it down.
+
+These are the values you can use for the `mod` in `MT()` and `OSM()`:
+
+ * MOD_LCTL
+ * MOD_LSFT
+ * MOD_LALT
+ * MOD_LGUI
+ * MOD_RCTL
+ * MOD_RSFT
+ * MOD_RALT
+ * MOD_RGUI
+ * MOD_HYPR
+ * MOD_MEH
+
+These can also be combined like `MOD_LCTL | MOD_LSFT` e.g. `MT(MOD_LCTL | MOD_LSFT, KC_ESC)` which would activate Control and Shift when held, and send Escape when tapped. Note however, that you cannot mix right and left side modifiers.
+
+We've added shortcuts to make common modifier/tap (mod-tap) mappings more compact:
+
+ * `CTL_T(kc)` - is LCTL when held and *kc* when tapped
+ * `SFT_T(kc)` - is LSFT when held and *kc* when tapped
+ * `ALT_T(kc)` - is LALT when held and *kc* when tapped
+ * `ALGR_T(kc)` - is AltGr when held and *kc* when tapped
+ * `GUI_T(kc)` - is LGUI when held and *kc* when tapped
+ * `ALL_T(kc)` - is Hyper (all mods) when held and *kc* when tapped. To read more about what you can do with a Hyper key, see [this blog post by Brett Terpstra](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)
+ * `LCAG_T(kc)` - is CtrlAltGui when held and *kc* when tapped
+ * `MEH_T(kc)` - is like Hyper, but not as cool -- does not include the Cmd/Win key, so just sends Alt+Ctrl+Shift.
+
+## One Shot Keys
+
+One shot keys are keys that remain active until the next key is pressed, and then are releasd. This allows you to type keyboard combinations without pressing more than one key at a time.
+
+For example, if you define a key as `OSM(MOD_LSFT)`, you can type a capital A character by first pressing and releasing shift, and then pressing and releasing A. Your computer will see the shift key being held the moment shift is pressed, and it will see the shift key being released immediately after A is released.
+
+One shot keys also work as normal modifiers. If you hold down a one shot key and type other keys, your one shot will be released immediately after you let go of the key.
+
+You can control the behavior of one shot keys by defining these in `config.h`:
+
+```c
+#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped this number of times again. */
+#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */
+```
+
+* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](#mod-tap), not the `KC_*` codes.
+* `OSL(layer)` - momentary switch to *layer*.
+
+## Permissive Hold
+
+As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option:
+
+```
+#define PERMISSIVE_HOLD
+```
+
+This makes it easier for fast typists to use dual-function keys. Without this, if you let go of a held key inside the tapping term, it won't register.
+
+Example: (Tapping Term = 200ms)
+
+- SHFT_T(KC_A) Down
+- KC_X Down
+- KC_X Up
+- SHFT_T(KC_A) Up
+
+With defaults, if above is typed within tapping term, this will emit `ax`. With permissive hold, if above is typed within tapping term, this will emit `X` (so, Shift+X).
diff --git a/docs/feature_layouts.md b/docs/feature_layouts.md
new file mode 100644
index 000000000..4d75270dc
--- /dev/null
+++ b/docs/feature_layouts.md
@@ -0,0 +1,77 @@
+# Layouts: Using a keymap with multiple keyboards
+
+The `layouts/` folder contains different physical key layouts that can apply to different keyboards.
+
+```
+layouts/
++ default/
+| + 60_ansi/
+| | + readme.md
+| | + layout.json
+| | + a_good_keymap/
+| | | + keymap.c
+| | | + readme.md
+| | | + config.h
+| | | + rules.mk
+| | + <keymap folder>/
+| | + ...
+| + <layout folder>/
++ community/
+| + <layout folder>/
+| + ...
+```
+
+The `layouts/default/` and `layouts/community/` are two examples of layout "repositories" - currently `default` will contain all of the information concerning the layout, and one default keymap named `default_<layout>`, for users to use as a reference. `community` contains all of the community keymaps, with the eventual goal of being split-off into a separate repo for users to clone into `layouts/`. QMK searches through all folders in `layouts/`, so it's possible to have multiple reposistories here.
+
+Each layout folder is named (`[a-z0-9_]`) after the physical aspects of the layout, in the most generic way possible, and contains a `readme.md` with the layout to be defined by the keyboard:
+
+```md
+# 60_ansi
+
+ LAYOUT_60_ansi
+```
+
+New names should try to stick to the standards set by existing layouts, and can be discussed in the PR/Issue.
+
+## Supporting a layout
+
+For 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):
+
+ #define LAYOUT_60_ansi KEYMAP_ANSI
+
+The folder name must be added to the keyboard's `rules.mk`:
+
+ LAYOUTS = 60_ansi
+
+`LAYOUTS` can be appended in the subproject's `rules.mk`:
+
+ LAYOUTS += 60_iso
+
+but the `LAYOUT_<layout>` variable must be defined in `<subproject>.h` as well.
+
+## Tips for making layouts keyboard-agnostic
+
+Instead of using `#include "planck.h"`, you can use this line to include whatever `<keyboard>.h` (`<subproject>.h` should not be included here) file that is being compiled:
+
+ #include QMK_KEYBOARD_H
+
+In your config.h, you can also use this variable to include the keyboard's `config.h`:
+
+ #include QMK_KEYBOARD_CONFIG_H
+
+If you want to keep some keyboard-specific code, you can use these variables to escape it with an `#ifdef` statement:
+
+* `KEYBOARD_<keyboard>`
+* `SUBPROJECT_<subproject>`
+
+For example:
+
+```c
+#ifdef KEYBOARD_planck
+ #ifdef SUBPROJECT_rev4
+ planck_rev4_function();
+ #endif
+#endif
+```
+
+Note that the names are lowercase and match the folder/file names for the keyboard/subproject exactly. \ No newline at end of file
diff --git a/docs/leader_key.md b/docs/feature_leader_key.md
index bf4d5456d..bf4d5456d 100644
--- a/docs/leader_key.md
+++ b/docs/feature_leader_key.md
diff --git a/docs/feature_ps2_mouse.md b/docs/feature_ps2_mouse.md
new file mode 100644
index 000000000..8629b28cf
--- /dev/null
+++ b/docs/feature_ps2_mouse.md
@@ -0,0 +1,238 @@
+## PS/2 Mouse Support
+
+Its possible to hook up a PS/2 mouse (for example touchpads or trackpoints) to your keyboard as a composite device.
+
+To hook up a Trackpoint, you need to obtain a Trackpoint module (i.e. harvest from a Thinkpad keyboard), identify the function of each pin of the module, and make the necessary circuitry between controller and Trackpoint module. For more information, please refer to [Trackpoint Hardware](https://deskthority.net/wiki/TrackPoint_Hardware) page on Deskthority Wiki.
+
+There are three available modes for hooking up PS/2 devices: USART (best), interrupts (better) or busywait (not recommended).
+
+### Busywait version
+
+Note: This is not recommended, you may encounter jerky movement or unsent inputs. Please use interrupt or USART version if possible.
+
+In rules.mk:
+
+```
+PS2_MOUSE_ENABLE = yes
+PS2_USE_BUSYWAIT = yes
+```
+
+In your keyboard config.h:
+
+```
+#ifdef PS2_USE_BUSYWAIT
+# define PS2_CLOCK_PORT PORTD
+# define PS2_CLOCK_PIN PIND
+# define PS2_CLOCK_DDR DDRD
+# define PS2_CLOCK_BIT 1
+# define PS2_DATA_PORT PORTD
+# define PS2_DATA_PIN PIND
+# define PS2_DATA_DDR DDRD
+# define PS2_DATA_BIT 2
+#endif
+```
+
+### Interrupt version
+
+The 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.
+
+In rules.mk:
+
+```
+PS2_MOUSE_ENABLE = yes
+PS2_USE_INT = yes
+```
+
+In your keyboard config.h:
+
+```
+#ifdef PS2_USE_INT
+#define PS2_CLOCK_PORT PORTD
+#define PS2_CLOCK_PIN PIND
+#define PS2_CLOCK_DDR DDRD
+#define PS2_CLOCK_BIT 2
+#define PS2_DATA_PORT PORTD
+#define PS2_DATA_PIN PIND
+#define PS2_DATA_DDR DDRD
+#define PS2_DATA_BIT 5
+
+#define PS2_INT_INIT() do { \
+ EICRA |= ((1<<ISC21) | \
+ (0<<ISC20)); \
+} while (0)
+#define PS2_INT_ON() do { \
+ EIMSK |= (1<<INT2); \
+} while (0)
+#define PS2_INT_OFF() do { \
+ EIMSK &= ~(1<<INT2); \
+} while (0)
+#define PS2_INT_VECT INT2_vect
+#endif
+```
+
+### USART version
+
+To 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.
+
+In rules.mk:
+
+```
+PS2_MOUSE_ENABLE = yes
+PS2_USE_USART = yes
+```
+
+In your keyboard config.h:
+
+```
+#ifdef PS2_USE_USART
+#define PS2_CLOCK_PORT PORTD
+#define PS2_CLOCK_PIN PIND
+#define PS2_CLOCK_DDR DDRD
+#define PS2_CLOCK_BIT 5
+#define PS2_DATA_PORT PORTD
+#define PS2_DATA_PIN PIND
+#define PS2_DATA_DDR DDRD
+#define PS2_DATA_BIT 2
+
+/* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
+/* set DDR of CLOCK as input to be slave */
+#define PS2_USART_INIT() do { \
+ PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT); \
+ PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT); \
+ UCSR1C = ((1 << UMSEL10) | \
+ (3 << UPM10) | \
+ (0 << USBS1) | \
+ (3 << UCSZ10) | \
+ (0 << UCPOL1)); \
+ UCSR1A = 0; \
+ UBRR1H = 0; \
+ UBRR1L = 0; \
+} while (0)
+#define PS2_USART_RX_INT_ON() do { \
+ UCSR1B = ((1 << RXCIE1) | \
+ (1 << RXEN1)); \
+} while (0)
+#define PS2_USART_RX_POLL_ON() do { \
+ UCSR1B = (1 << RXEN1); \
+} while (0)
+#define PS2_USART_OFF() do { \
+ UCSR1C = 0; \
+ UCSR1B &= ~((1 << RXEN1) | \
+ (1 << TXEN1)); \
+} while (0)
+#define PS2_USART_RX_READY (UCSR1A & (1<<RXC1))
+#define PS2_USART_RX_DATA UDR1
+#define PS2_USART_ERROR (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1)))
+#define PS2_USART_RX_VECT USART1_RX_vect
+#endif
+```
+
+### Additional Settings
+
+#### PS/2 mouse features
+
+These enable settings supported by the PS/2 mouse protocol: http://www.computer-engineering.org/ps2mouse/
+
+```
+/* Use remote mode instead of the default stream mode (see link) */
+#define PS2_MOUSE_USE_REMOTE_MODE
+
+/* Enable the scrollwheel or scroll gesture on your mouse or touchpad */
+#define PS2_MOUSE_ENABLE_SCROLLING
+
+/* Some mice will need a scroll mask to be configured. The default is 0xFF. */
+#define PS2_MOUSE_SCROLL_MASK 0x0F
+
+/* Applies a transformation to the movement before sending to the host (see link) */
+#define PS2_MOUSE_USE_2_1_SCALING
+
+/* The time to wait after initializing the ps2 host */
+#define PS2_MOUSE_INIT_DELAY 1000 /* Default */
+```
+
+You can also call the following functions from ps2_mouse.h
+
+```
+void ps2_mouse_disable_data_reporting(void);
+
+void ps2_mouse_enable_data_reporting(void);
+
+void ps2_mouse_set_remote_mode(void);
+
+void ps2_mouse_set_stream_mode(void);
+
+void ps2_mouse_set_scaling_2_1(void);
+
+void ps2_mouse_set_scaling_1_1(void);
+
+void ps2_mouse_set_resolution(ps2_mouse_resolution_t resolution);
+
+void ps2_mouse_set_sample_rate(ps2_mouse_sample_rate_t sample_rate);
+```
+
+#### Fine control
+
+Use the following defines to change the sensitivity and speed of the mouse.
+Note: you can also use `ps2_mouse_set_resolution` for the same effect (not supported on most touchpads).
+
+```
+#define PS2_MOUSE_X_MULTIPLIER 3
+#define PS2_MOUSE_Y_MULTIPLIER 3
+#define PS2_MOUSE_V_MULTIPLIER 1
+```
+
+#### Scroll button
+
+If you're using a trackpoint, you will likely want to be able to use it for scrolling.
+Its possible to enable a "scroll button/s" that when pressed will cause the mouse to scroll instead of moving.
+To enable the feature, you must set a scroll button mask as follows:
+
+```
+#define PS2_MOUSE_SCROLL_BTN_MASK (1<<PS2_MOUSE_BUTTON_MIDDLE) /* Default */
+```
+
+To disable the scroll button feature:
+
+```
+#define PS2_MOUSE_SCROLL_BTN_MASK 0
+```
+
+The available buttons are:
+
+```
+#define PS2_MOUSE_BTN_LEFT 0
+#define PS2_MOUSE_BTN_RIGHT 1
+#define PS2_MOUSE_BTN_MIDDLE 2
+```
+
+You can also combine buttons in the mask by `|`ing them together.
+
+Once you've configured your scroll button mask, you must configure the scroll button send interval.
+This is the interval before which if the scroll buttons were released they would be sent to the host.
+After this interval, they will cause the mouse to scroll and will not be sent.
+
+```
+#define PS2_MOUSE_SCROLL_BTN_SEND 300 /* Default */
+```
+
+To disable sending the scroll buttons:
+```
+#define PS2_MOUSE_SCROLL_BTN_SEND 0
+```
+
+Fine control over the scrolling is supported with the following defines:
+
+```
+#define PS2_MOUSE_SCROLL_DIVISOR_H 2
+#define PS2_MOUSE_SCROLL_DIVISOR_V 2
+```
+
+#### Debug settings
+
+To debug the mouse, add `debug_mouse = true` or enable via bootmagic.
+
+```
+/* To debug the mouse reports */
+#define PS2_MOUSE_DEBUG_HID
+#define PS2_MOUSE_DEBUG_RAW
+```
diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md
new file mode 100644
index 000000000..7f12155cb
--- /dev/null
+++ b/docs/feature_rgblight.md
@@ -0,0 +1,49 @@
+# RGB Lighting
+
+<!-- FIXME: Describe how to use RGB Lighting here. -->
+
+## RGB Under Glow Mod
+
+![Planck with RGB Underglow](https://raw.githubusercontent.com/qmk/qmk_firmware/master/keyboards/planck/keymaps/yang/planck-with-rgb-underglow.jpg)
+
+Here is a quick demo on Youtube (with NPKC KC60) (https://www.youtube.com/watch?v=VKrpPAHlisY).
+
+For this mod, you need an unused pin wiring to DI of WS2812 strip. After wiring the VCC, GND, and DI, you can enable the underglow in your Makefile.
+
+ RGBLIGHT_ENABLE = yes
+
+In order to use the underglow animation functions, you need to have `#define RGBLIGHT_ANIMATIONS` in your `config.h`.
+
+Please add the following options into your config.h, and set them up according your hardware configuration. These settings are for the `F4` pin by default:
+
+ #define RGB_DI_PIN F4 // The pin your RGB strip is wired to
+ #define RGBLIGHT_ANIMATIONS // Require for fancier stuff (not compatible with audio)
+ #define RGBLED_NUM 14 // Number of LEDs
+ #define RGBLIGHT_HUE_STEP 10
+ #define RGBLIGHT_SAT_STEP 17
+ #define RGBLIGHT_VAL_STEP 17
+
+You'll need to edit `RGB_DI_PIN` to the pin you have your `DI` on your RGB strip wired to.
+
+The firmware supports 5 different light effects, and the color (hue, saturation, brightness) can be customized in most effects. To control the underglow, you need to modify your keymap file to assign those functions to some keys/key combinations. For details, please check this keymap. `keyboards/planck/keymaps/yang/keymap.c`
+
+### WS2812 Wiring
+
+![WS2812 Wiring](https://raw.githubusercontent.com/qmk/qmk_firmware/master/keyboards/planck/keymaps/yang/WS2812-wiring.jpg)
+
+Please note the USB port can only supply a limited amount of power to the keyboard (500mA by standard, however, modern computer and most usb hubs can provide 700+mA.). According to the data of NeoPixel from Adafruit, 30 WS2812 LEDs require a 5V 1A power supply, LEDs used in this mod should not more than 20.
+
+## RGB Lighting Keycodes
+
+This controls the RGB Lighting functionality. Most keyboards use WS2812 (and compatible) LEDs for underlight or case lighting.
+
+|Name|Description|
+|----|-----------|
+|`RGB_TOG`|toggle on/off|
+|`RGB_MOD`|cycle through modes|
+|`RGB_HUI`|hue increase|
+|`RGB_HUD`|hue decrease|
+|`RGB_SAI`|saturation increase|
+|`RGB_SAD`|saturation decrease|
+|`RGB_VAI`|value increase|
+|`RGB_VAD`|value decrease|
diff --git a/docs/feature_thermal_printer.md b/docs/feature_thermal_printer.md
new file mode 100644
index 000000000..0c5d15116
--- /dev/null
+++ b/docs/feature_thermal_printer.md
@@ -0,0 +1,10 @@
+# Thermal Printer
+
+<!-- FIXME: Describe thermal printers support here. -->
+
+## Thermal Printer Keycodes
+
+|Name|Description|
+|----|-----------|
+|`PRINT_ON`|Start printing everything the user types|
+|`PRINT_OFF`|Stop printing everything the user types|
diff --git a/docs/features.md b/docs/features.md
index 0de662293..c5965f4c0 100644
--- a/docs/features.md
+++ b/docs/features.md
@@ -7,7 +7,7 @@ Steve Losh [described](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/)
## The Leader key: A new kind of modifier
-Most modifiers have to be held or toggled. But what if you had a key that indicated the start of a sequence? You could press that key and then rapidly press 1-3 more keys to trigger a macro, or enter a special layer, or anything else you might want to do. To learn more about it check out the [Leader Key](leader_key.md) page.
+Most modifiers have to be held or toggled. But what if you had a key that indicated the start of a sequence? You could press that key and then rapidly press 1-3 more keys to trigger a macro, or enter a special layer, or anything else you might want to do. To learn more about it check out the [Leader Key](feature_leader_key.md) page.
## Tap Dance: A single key can do 3, 5, or 100 different things
diff --git a/docs/build_environment_setup.md b/docs/getting_started_build_tools.md
index d2d63defb..e46b7f2e5 100644
--- a/docs/build_environment_setup.md
+++ b/docs/getting_started_build_tools.md
@@ -1,25 +1,77 @@
-# Build Environment Setup
+# Installing Build Tools
This page describes setting up the build environment for QMK. These instructions cover AVR processors (such as the atmega32u4.)
<!-- FIXME: We should have ARM instructions somewhere. -->
-# Windows 10
+## Linux
-## Creators Update
+To ensure you are always up to date, you can just run `sudo util/install_dependencies.sh`. That should always install all the dependencies needed. **This will run `apt-get upgrade`.**
+
+You can also install things manually, but this documentation might not be always up to date with all requirements.
+
+The current requirements are the following, but not all might be needed depending on what you do. Also note that some systems might not have all the dependencies available as packages, or they might be named differently.
+
+```
+build-essential
+gcc
+unzip
+wget
+zip
+gcc-avr
+binutils-avr
+avr-libc
+dfu-programmer
+dfu-util
+gcc-arm-none-eabi
+binutils-arm-none-eabi
+libnewlib-arm-none-eabi
+git
+```
+
+Install the dependencies with your favorite package manager.
+
+Debian/Ubuntu example:
+
+ sudo apt-get update
+ sudo apt-get install gcc unzip wget zip gcc-avr binutils-avr avr-libc dfu-programmer dfu-util gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi
+
+# Mac
+If you're using [homebrew,](http://brew.sh/) you can use the following commands:
+
+ brew tap osx-cross/avr
+ brew install avr-libc
+ brew install dfu-programmer
+
+This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of avr-libc can take over 20 minutes and exhibit high CPU usage.
+
+## Windows with msys2 (recommended)
+
+The best environment to use, for Windows Vista through any later version (tested on 7 and 10,) is [msys2](http://www.msys2.org).
+
+* Install msys2 by downloading and following the instructions here: http://www.msys2.org
+* Open the "MSYS2 MingGW 64-bit" shortcut
+* Navigate to your qmk checkout. For example, if it's in the root of your c drive:
+ * `$ cd /c/qmk_firmware`
+* Run `util/msys2_install.sh` and follow the prompts
+
+## Windows 10 (deprecated)
+These are the old instructions for Windows 10. We recommend you use [MSYS2 as outlined above](#windows-with-msys2-recommended).
+
+### Creators Update
If you have Windows 10 with Creators Update or later, you can build and flash the firmware directly. Before the Creators Update, only building was possible. If you don't have it yet or if are unsure, follow [these instructions](https://support.microsoft.com/en-us/instantanswers/d4efb316-79f0-1aa1-9ef3-dcada78f3fa0/get-the-windows-10-creators-update).
-## Windows Subsystem for Linux
+### Windows Subsystem for Linux
In addition to the Creators Update, you need Windows 10 Subystem for Linux, so install it following [these instructions](http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/). If you already have the Windows 10 Subsystem for Linux from the Anniversary update it's recommended that you [upgrade](https://betanews.com/2017/04/14/upgrade-windows-subsystem-for-linux/) it to 16.04LTS, because some keyboards don't compile with the toolchains included in 14.04LTS. Note that you need to know what your are doing if you chose the `sudo do-release-upgrade` method.
-## Git
+### Git
If you already have cloned the repository on your Windows file system you can ignore this section.
You will need to clone the repository to your Windows file system using the normal Git for Windows and **not** the WSL Git. So if you haven't installed Git before, [download](https://git-scm.com/download/win) and install it. Then [set it up](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup), it's important that you setup the e-mail and user name, especially if you are planning to contribute.
Once 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.
-## Toolchain setup
+### Toolchain setup
The 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.
1. Open "Bash On Ubuntu On Windows" from the start menu.
@@ -28,13 +80,16 @@ The Toolchain setup is done through the Windows Subsystem for Linux, and the pro
4. Close the Bash command window, and re-open it.
5. You are ready to compile and flash the firmware!
-## Some important things to keep in mind
+### Some important things to keep in mind
* You can run `util/wsl_install.sh` again to get all the newest updates.
* Your QMK repository need to be on a Windows file system path, since WSL can't run executables outside it.
* 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
* 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.
-# Windows (Vista and later)
+## Windows (Vista and later) (Deprecated)
+
+These are the old instructions for Windows Vista and later. We recommend you use [MSYS2 as outlined above](#windows-with-msys2-recommended).
+
1. If you have ever installed WinAVR, uninstall it.
2. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**.
3. If you are going to flash Infinity based keyboards you will need to install dfu-util, refer to the instructions by [Input Club](https://github.com/kiibohd/controller/wiki/Loading-DFU-Firmware).
@@ -46,58 +101,7 @@ The Toolchain setup is done through the Windows Subsystem for Linux, and the pro
If you have trouble and want to ask for help, it is useful to generate a *Win_Check_Output.txt* file by running `Win_Check.bat` in the `\util` folder.
-# Mac
-If you're using [homebrew,](http://brew.sh/) you can use the following commands:
-
- brew tap osx-cross/avr
- brew install avr-gcc
- brew install dfu-programmer
-
-This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of avr-gcc can take over 20 minutes and exhibit high CPU usage.
-
-You can also try these instructions:
-
-1. Install Xcode from the App Store.
-2. Install the Command Line Tools from `Xcode->Preferences->Downloads`.
-3. Install [DFU-Programmer](https://dfu-programmer.github.io/).
-
-If you are going to flash Infinity based keyboards you will also need dfu-util
-
- brew install dfu-util
-
-# Linux
-
-To ensure you are always up to date, you can just run `sudo util/install_dependencies.sh`. That should always install all the dependencies needed. **This will run `apt-get upgrade`.**
-
-You can also install things manually, but this documentation might not be always up to date with all requirements.
-
-The current requirements are the following, but not all might be needed depending on what you do. Also note that some systems might not have all the dependencies available as packages, or they might be named differently.
-
-```
-build-essential
-gcc
-unzip
-wget
-zip
-gcc-avr
-binutils-avr
-avr-libc
-dfu-programmer
-dfu-util
-gcc-arm-none-eabi
-binutils-arm-none-eabi
-libnewlib-arm-none-eabi
-git
-```
-
-Install the dependencies with your favorite package manager.
-
-Debian/Ubuntu example:
-
- sudo apt-get update
- sudo apt-get install gcc unzip wget zip gcc-avr binutils-avr avr-libc dfu-programmer dfu-util gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi
-
-# Docker
+## Docker
If this is a bit complex for you, Docker might be the turn-key solution you need. After installing [Docker](https://www.docker.com/products/docker), run the following command at the root of the QMK folder to build a keyboard/keymap:
@@ -115,11 +119,5 @@ docker run -e keymap=default -e subproject=ez -e keyboard=ergobox --rm -v D:/Use
This will compile the targeted keyboard/keymap and leave it in your QMK directory for you to flash.
-# Vagrant
+## Vagrant
If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [vagrant guide](vagrant_guide.md).
-
-# Verify Your Installation
-1. If you haven't already, obtain this repository ([https://github.com/qmk/qmk_firmware](https://github.com/qmk/qmk_firmware)). You can either download it as a zip file and extract it, or clone it using the command line tool git or the Github Desktop application.
-2. Open up a terminal or command prompt and navigate to the `qmk_firmware` folder using the `cd` command. The command prompt will typically open to your home directory. If, for example, you cloned the repository to your Documents folder, then you would type `cd Documents/qmk_firmware`. If you extracted the file from a zip, then it may be named `qmk_firmware-master` instead.
-3. To confirm that you're in the correct location, you can display the contents of your current folder using the `dir` command on Windows, or the `ls` command on Linux or Mac. You should see several files, including `readme.md` and a `quantum` folder. From here, you need to navigate to the appropriate folder under `keyboards/`. For example, if you're building for a Planck, run `cd keyboards/planck`.
-4. Once you're in the correct keyboard-specific folder, run the `make` command. This should output a lot of information about the build process. More information about the `make` command can be found below.
diff --git a/docs/how_to_github.md b/docs/getting_started_github.md
index 387ddd91e..387ddd91e 100644
--- a/docs/how_to_github.md
+++ b/docs/getting_started_github.md
diff --git a/docs/getting_started_instroduction.md b/docs/getting_started_instroduction.md
new file mode 100644
index 000000000..3cd27504d
--- /dev/null
+++ b/docs/getting_started_instroduction.md
@@ -0,0 +1,47 @@
+# Introduction
+
+This 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.
+
+## Basic QMK structure
+
+QMK is a fork of @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.
+
+### Keyboard project structure
+
+Within the `handwired` and `keyboard` folders is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within you'll find the following structure:
+
+* `keymaps/`: Different keymaps that can be built
+* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `Makefile`.
+* `config.h`: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific `config.h`.
+
+### Keymap structure
+
+In every keymap folder, the following files may be found. Only `keymap.c` is required, if the rest of the files are not found the default options will be chosen.
+
+* `config.h`: the options to configure your keymap
+* `keymap.c`: all of your keymap code, required
+* `rules.mk`: the features of QMK that are enabled
+* `readme.md`: a description of your keymap, how others might use it, and explanations of features. Please upload images to a service like imgur.
+
+# The `config.h` file
+
+There are 2 `config.h` locations:
+
+* keyboard (`/keyboards/<keyboard>/config.h`)
+* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/config.h`)
+
+If the keymap `config.h` exists that file is included by the build system and the keyboard `config.h` is not included. If you wish to override settings in your keymap's `config.h` you will need to include some glue code:
+
+```
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+```
+
+If you want to override a setting from the parent `config.h` file, you need to `#undef` and then `#define` the setting again, like this:
+
+```c
+#undef MY_SETTING
+#define MY_SETTING 4
+```
diff --git a/docs/make_instructions.md b/docs/getting_started_make_guide.md
index 299c5785b..fac801082 100644
--- a/docs/make_instructions.md
+++ b/docs/getting_started_make_guide.md
@@ -21,7 +21,7 @@ As mentioned above, there are some shortcuts, when you are in a:
* `keyboard` folder, the command will automatically fill the `<keyboard>` part. So you only need to type `<subproject>-<keymap>-<target>`
* `subproject` folder, it will fill in both `<keyboard>` and `<subproject>`
* `keymap` folder, then `<keyboard>` and `<keymap>` will be filled in. If you need to specify the `<subproject>` use the following syntax `<subproject>-<target>`
- * Note in order to support this shortcut, the keymap needs its own Makefile (see the example [here](https://github.com/qmk/qmk_firmware/blob/master/doc/keymap_makefile_example.mk))
+ * Note in order to support this shortcut, the keymap needs its own Makefile
* `keymap` folder of a `subproject`, then everything except the `<target>` will be filled in
The `<target>` means the following
@@ -142,7 +142,7 @@ This allows you to interface with a Bluefruit EZ-key to send keycodes wirelessly
`AUDIO_ENABLE`
-This allows you output audio on the C6 pin (needs abstracting). See the [audio section](#audio-output-from-a-speaker) for more information.
+This allows you output audio on the C6 pin (needs abstracting). See the [audio page](feature_audio.md) for more information.
`FAUXCLICKY_ENABLE`
@@ -150,7 +150,7 @@ Uses buzzer to emulate clicky switches. A cheap imitation of the Cherry blue swi
`VARIABLE_TRACE`
-Use this to debug changes to variable values, see the [tracing variables](#tracing-variables) section for more information.
+Use this to debug changes to variable values, see the [tracing variables](unit_testing.md#tracing-variables) section of the Unit Testing page for more information.
`API_SYSEX_ENABLE`
diff --git a/docs/vagrant_guide.md b/docs/getting_started_vagrant.md
index e6551cb25..e6551cb25 100644
--- a/docs/vagrant_guide.md
+++ b/docs/getting_started_vagrant.md
diff --git a/docs/gitbook/images/favicon.ico b/docs/gitbook/images/favicon.ico
index bd9e65bce..2b4e04aba 100644
--- a/docs/gitbook/images/favicon.ico
+++ b/docs/gitbook/images/favicon.ico
Binary files differ
diff --git a/docs/gitbook/images/favicon.png b/docs/gitbook/images/favicon.png
index 0f3343db0..509cebd87 100644
--- a/docs/gitbook/images/favicon.png
+++ b/docs/gitbook/images/favicon.png
Binary files differ
diff --git a/docs/glossary.md b/docs/glossary.md
index 2fd53ca97..e1103ec94 100644
--- a/docs/glossary.md
+++ b/docs/glossary.md
@@ -62,7 +62,7 @@ In-system programming, a method of programming an AVR chip using external hardwa
An interface for receiving debugging messages from your keyboard. You can view these messages using [QMK Flasher](https://github.com/qmk/qmk_flasher) or [PJRC's hid_listen](https://www.pjrc.com/teensy/hid_listen.html)
## Keycode
-A 2-byte number that represents a particular key. `0x00`-`0xFF` are used for [Basic Keycodes](keycodes.html) while `0x100`-`0xFFFF` are used for [Quantum Keycodes](quantum_keycodes.html).
+A 2-byte number that represents a particular key. `0x00`-`0xFF` are used for [Basic Keycodes](keycodes_basic.html) while `0x100`-`0xFFFF` are used for [Quantum Keycodes](quantum_keycodes.html).
## Key Down
An event that happens when a key is pressed down, but is completed before a key is released.
@@ -79,7 +79,7 @@ An abstraction used to allow a key to serve multiple purposes. The highest activ
## Leader Key
A feature that allows you to tap the leader key followed by a sequence of 1, 2, or 3 keys to activate key presses or other quantum features.
-* [Leader Key Documentation](leader_key.html)
+* [Leader Key Documentation](feature_leader_key.html)
## LED
Light Emitting Diode, the most common device used for indicators on a keyboard.
@@ -141,7 +141,7 @@ Pressing and releasing a key. In some situations you will need to distinguish be
## Tap Dance
A feature that lets you assign muiltple keycodes to the same key based on how many times you press it.
-* [Tap Dance Documentation](tap_dance.html)
+* [Tap Dance Documentation](tap_dance.md)
## Teensy
A low-cost AVR development board that is commonly used for hand-wired builds. A teensy is often chosen despite costing a few dollors more due to its halfkay bootloader, which makes flashing very simple.
@@ -152,12 +152,12 @@ A generic term for LEDs that light the underside of the board. These LED's typic
## Unicode
In the larger computer world Unicode is a set of encoding schemes for representing characters in any language. As it relates to QMK it means using various OS schemes to send unicode codepoints instead of scancodes.
-* [Unicode Documentation](unicode.html)
+* [Unicode Documentation](unicode.md)
## Unit Testing
A framework for running automated tests against QMK. Unit testing helps us be confident that our changes do not break anything.
-* [Unit Testing Documentation](unit_testing.html)
+* [Unit Testing Documentation](unit_testing.md)
## USB
Universal Serial Bus, the most common wired interface for a keyboard.
diff --git a/docs/hand_wire.md b/docs/hand_wire.md
index 9f6309542..263cd5994 100644
--- a/docs/hand_wire.md
+++ b/docs/hand_wire.md
@@ -298,13 +298,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
```
-Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [tmk_code/doc/keycode.txt](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keycode.txt) - there are also a lot of aliases to condense your keymap file.
+Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [Keycodes](keycodes.md) - there are also a lot of aliases to condense your keymap file.
It'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.
## Compiling your firmware
-After 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](build_guide.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.
+After 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.
Once everything is installed, running `make` in the terminal should get you some output, and eventually a `<project_name>.hex` file in that folder. If you're having trouble with this step, see the end of the guide for the trouble-shooting section.
@@ -328,4 +328,4 @@ If you've done all of these things, keep in mind that sometimes you might have h
Now 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.
-There are a lot of possibilities inside the firmware - check out the [readme](https://github.com/qmk/qmk_firmware/blob/master/readme.md) for a full feature list, and dive into the different project (Planck, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb)
+There are a lot of possibilities inside the firmware - explore [docs.qmk.fm](http://docs.qmk.fm) for a full feature list, and dive into the different project (Planck, Clueboard, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb)
diff --git a/docs/basic_how_keyboards_work.md b/docs/how_keyboards_work.md
index 3969c5680..edd219a32 100644
--- a/docs/basic_how_keyboards_work.md
+++ b/docs/how_keyboards_work.md
@@ -51,7 +51,7 @@ layout is set to QWERTY, a sample of the matching table is as follow:
## Back to the firmware
-As 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 `keycode.txt`.
+As 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).
## List of Characters You Can Send
diff --git a/docs/key_functions.md b/docs/key_functions.md
deleted file mode 100644
index 8a579f305..000000000
--- a/docs/key_functions.md
+++ /dev/null
@@ -1,128 +0,0 @@
-# Quick Aliases To Common Actions
-
-Your keymap can include shortcuts to common operations (called "function actions" in tmk).
-
-These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the qmk `ACTION_*` functions, please see the [Keymap documentation](keymap.md#2-action).
-
-Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them.
-
-## Limits of these aliases
-
-Currently, the keycodes able to used with these functions are limited to the [Basic Keycodes](keycodes.html), meaning you can't use keycodes like `KC_TILD`, or anything greater than 0xFF. For a full list of the keycodes able to be used, [see this list](keycodes.html).
-
-# Switching and toggling layers
-
-`MO(layer)` - momentary switch to *layer*. As soon as you let go of the key, the layer is deactivated and you pop back out to the previous layer. When you apply this to a key, that same key must be set as `KC_TRNS` on the destination layer. Otherwise, you won't make it back to the original layer when you release the key (and you'll get a keycode sent). You can only switch to layers *above* your current layer. If you're on layer 0 and you use `MO(1)`, that will switch to layer 1 just fine. But if you include `MO(3)` on layer 5, that won't do anything for you -- because layer 3 is lower than layer 5 on the stack.
-
-`LT(layer, kc)` - momentary switch to *layer* when held, and *kc* when tapped. Like `MO()`, this only works upwards in the layer stack (`layer` must be higher than the current layer).
-
-`TG(layer)` - toggles a layer on or off. As with `MO()`, you should set this key as `KC_TRNS` in the destination layer so that tapping it again actually toggles back to the original layer. Only works upwards in the layer stack.
-
-`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).
-
-`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 1` for just one tap.
-
-
-# Modifier keys
-
-* `LSFT(kc)` - applies left Shift to *kc* (keycode) - `S(kc)` is an alias
-* `RSFT(kc)` - applies right Shift to *kc*
-* `LCTL(kc)` - applies left Control to *kc*
-* `RCTL(kc)` - applies right Control to *kc*
-* `LALT(kc)` - applies left Alt to *kc*
-* `RALT(kc)` - applies right Alt to *kc*
-* `LGUI(kc)` - applies left GUI (command/win) to *kc*
-* `RGUI(kc)` - applies right GUI (command/win) to *kc*
-* `HYPR(kc)` - applies Hyper (all modifiers) to *kc*
-* `MEH(kc)` - applies Meh (all modifiers except Win/Cmd) to *kc*
-* `LCAG(kc)` - applies CtrlAltGui to *kc*
-
-You can also chain these, like this:
-
- LALT(LCTL(KC_DEL)) -- this makes a key that sends Alt, Control, and Delete in a single keypress.
-
-# Shifted Keycodes
-
-The following shortcuts automatically add `LSFT()` to keycodes to get commonly used symbols. Their long names are also available and documented in `quantum/quantum_keycodes.h`.
-
- KC_TILD ~
- KC_EXLM !
- KC_QUES ?
- KC_AT @
- KC_HASH #
- KC_DLR $
- KC_PERC %
- KC_CIRC ^
- KC_AMPR &
- KC_ASTR *
- KC_LPRN (
- KC_RPRN )
- KC_UNDS _
- KC_PLUS +
- KC_DQUO "
- KC_LCBR {
- KC_RCBR }
- KC_LABK <
- KC_RABK >
- KC_PIPE |
- KC_COLN :
-
-# One Shot
-
-`OSM(mod)` - this is a "one shot" modifier. So let's say you have your left Shift key defined as `OSM(MOD_LSFT)`. Tap it, let go, and Shift is "on" -- but only for the next character you'll type. So to write "The", you don't need to hold down Shift -- you tap it, tap t, and move on with life. And if you hold down the left Shift key, it just works as a left Shift key, as you would expect (so you could type THE). There's also a magical, secret way to "lock" a modifier by tapping it multiple times. If you want to learn more about that, open an issue. :)
-
-`OSL(layer)` - momentary switch to *layer*, as a one-shot operation. So if you have a key that's defined as `OSL(1)`, and you tap that key, then only the very next keystroke would come from layer 1. You would drop back to layer zero immediately after that one keystroke. That's handy if you have a layer full of custom shortcuts -- for example, a dedicated key for closing a window. So you tap your one-shot layer mod, then tap that magic 'close window' key, and keep typing like a boss. Layer 1 would remain active as long as you hold that key down, too (so you can use it like a momentary toggle-layer key with extra powers).
-
-
-# Mod Tap
-
-`MT(mod, kc)` - is *mod* (modifier key - MOD_LCTL, MOD_LSFT) when held, and *kc* when tapped. In other words, you can have a key that sends Esc (or the letter O or whatever) when you tap it, but works as a Control key or a Shift key when you hold it down.
-
-These are the values you can use for the `mod` in `MT()` and `OSM()`:
-
- * MOD_LCTL
- * MOD_LSFT
- * MOD_LALT
- * MOD_LGUI
- * MOD_RCTL
- * MOD_RSFT
- * MOD_RALT
- * MOD_RGUI
- * MOD_HYPR
- * MOD_MEH
-
-These can also be combined like `MOD_LCTL | MOD_LSFT` e.g. `MT(MOD_LCTL | MOD_LSFT, KC_ESC)` which would activate Control and Shift when held, and send Escape when tapped. Note however, that you cannot mix right and left side modifiers.
-
-We've added shortcuts to make common modifier/tap (mod-tap) mappings more compact:
-
- * `CTL_T(kc)` - is LCTL when held and *kc* when tapped
- * `SFT_T(kc)` - is LSFT when held and *kc* when tapped
- * `ALT_T(kc)` - is LALT when held and *kc* when tapped
- * `ALGR_T(kc)` - is AltGr when held and *kc* when tapped
- * `GUI_T(kc)` - is LGUI when held and *kc* when tapped
- * `ALL_T(kc)` - is Hyper (all mods) when held and *kc* when tapped. To read more about what you can do with a Hyper key, see [this blog post by Brett Terpstra](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)
- * `LCAG_T(kc)` - is CtrlAltGui when held and *kc* when tapped
- * `MEH_T(kc)` - is like Hyper, but not as cool -- does not include the Cmd/Win key, so just sends Alt+Ctrl+Shift.
-
-# Permissive Hold
-
-As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option:
-
-```
-#define PERMISSIVE_HOLD
-```
-
-This makes it easier for fast typists to use dual-function keys. As described in the PR:
-
-Without this, if you let go of a held key inside the tapping term, it won't register.
-
-Example: (Tapping Term = 200)
-
-- SHFT_T(KC_A) Down
-- KC_X Down
-- KC_X Up
-- SHFT_T(KC_A) Up
-
-With permissive hold, if above is typed within tapping term, this will emit `X` (so, Shift+X).
-
-With defaults, if above is typed within tapping term, this will emit `ax`, which I doubt is what anyone really wants
diff --git a/docs/keycodes.md b/docs/keycodes.md
index 7c5cae8b3..c601ad4ce 100644
--- a/docs/keycodes.md
+++ b/docs/keycodes.md
@@ -1,17 +1,315 @@
# Overview
-When defining a [keymap](keymap.md) each key needs a valid key definition.
+When defining a [keymap](keymap.md) each key needs a valid key definition. This page documents the symbols that correspond to keycodes that are available to you in QMK. This is a reference only. Where possible keys link to the page documenting their functionality.
-This page documents the symbols that correspond to keycodes that are available to you in QMK.
+## Keycode Index
-## Basic keycodes (`0x00` - `0xFF`)
-
-[Basic keycodes](basic_keycodes.md) in QMK are based on [HID Usage Keyboard/Keypad Page(0x07)](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) with following exceptions:
-
-* `KC_NO` = 0 for no action
-* `KC_TRNS` = 1 for layer transparency
-* internal special keycodes in the `0xA5-DF` range (tmk heritage).
-
-## Quantum keycodes (`0x0100` - `0xFFFF`)
-
-[Quantum keycodes](quantum_keycodes.md) allow for easier customisation of your keymap than the basic ones provide, without having to define custom actions.
+|Long Name|Short Name|Description|
+|---------|----------|-----------|
+|`KC_1`||||
+|`KC_2`||||
+|`KC_3`||||
+|`KC_4`||||
+|`KC_5`||||
+|`KC_6`||||
+|`KC_7`||||
+|`KC_8`||||
+|`KC_9`||||
+|`KC_0`||||
+|`KC_F1`||||
+|`KC_F2`||||
+|`KC_F3`||||
+|`KC_F4`||||
+|`KC_F5`||||
+|`KC_F6`||||
+|`KC_F7`||||
+|`KC_F8`||||
+|`KC_F9`||||
+|`KC_F10`||||
+|`KC_F11`||||
+|`KC_F12`||||
+|`KC_F13`||||
+|`KC_F14`||||
+|`KC_F15`||||
+|`KC_F16`||||
+|`KC_F17`||||
+|`KC_F18`||||
+|`KC_F19`||||
+|`KC_F20`||||
+|`KC_F21`||||
+|`KC_F22`||||
+|`KC_F23`||||
+|`KC_F24`||||
+|`KC_A`||||
+|`KC_B`||||
+|`KC_C`||||
+|`KC_D`||||
+|`KC_E`||||
+|`KC_F`||||
+|`KC_G`||||
+|`KC_H`||||
+|`KC_I`||||
+|`KC_J`||||
+|`KC_K`||||
+|`KC_L`||||
+|`KC_M`||||
+|`KC_N`||||
+|`KC_O`||||
+|`KC_P`||||
+|`KC_Q`||||
+|`KC_R`||||
+|`KC_S`||||
+|`KC_T`||||
+|`KC_U`||||
+|`KC_V`||||
+|`KC_W`||||
+|`KC_X`||||
+|`KC_Y`||||
+|`KC_Z`||||
+|`KC_ENTER`|`KC_ENT`|`Return (ENTER)`|
+|`KC_ESCAPE`|`KC_ESC`|`ESCAPE`|
+|`KC_BSPACE`|`KC_BSPC`|`DELETE (Backspace)`|
+|`KC_TAB`||`Tab`|
+|`KC_SPACE`|`KC_SPC`|Spacebar|
+|`KC_MINUS`|`KC_MINS`|`-` and `_`|
+|`KC_EQUAL`|`KC_EQL`|`=` and `+`|
+|`KC_LBRACKET`|`KC_LBRC`|`[` and `{`|
+|`KC_RBRACKET`|`KC_RBRC`|`]` and `}`|
+|`KC_BSLASH`|`KC_BSLS`|`\` and <code>&#124;</code> |
+|`KC_NONUS_HASH`|`KC_NUHS`|Non-US `#` and `~`|
+|`KC_NONUS_BSLASH`|`KC_NUBS`|Non-US `\` and <code>&#124;</code> |
+|`KC_INT1`|`KC_RO`|JIS `\` and <code>&#124;</code> |
+|`KC_INT2`|`KC_KANA`|International216|
+|`KC_INT3`|`KC_JYEN`|Yen Symbol (`¥`)|
+|`KC_SCOLON`|`KC_SCLN`|`;` and `:`|
+|`KC_QUOTE`|`KC_QUOT`|`‘` and `“`|
+|`KC_GRAVE`|`KC_GRV`|Grave Accent and Tilde|
+|`KC_COMMA`|`KC_COMM`|`,` and `<`|
+|`KC_DOT`||`.` and `>`|
+|`KC_SLASH`|`KC_SLSH`|`/` and `?`|
+|`KC_CAPSLOCK`|`KC_CAPS`|Caps Lock|
+|`KC_LCTRL`|`KC_LCTL`|LeftControl|
+|`KC_LSHIFT`|`KC_LSFT`|LeftShift|
+|`KC_LALT`||LeftAlt|
+|`KC_LGUI`||Left GUI(Windows/Apple/Meta key)|
+|`KC_RCTRL`|`KC_RCTL`|RightControl|
+|`KC_RSHIFT`|`KC_RSFT`|RightShift|
+|`KC_RALT`||RightAlt|
+|`KC_RGUI`||Right GUI(Windows/Apple/Meta key)|
+|`KC_LOCKING_CAPS`|`KC_LCAP`|Locking Caps Lock|
+|`KC_LOCKING_NUM`|`KC_LNUM`|Locking Num Lock|
+|`KC_LOCKING_SCROLL`|`KC_LSCR`|Locking Scroll Lock|
+|`KC_INT4`|`KC_HENK`|JIS Henken|
+|`KC_INT5`|`KC_MHEN`|JIS Muhenken|
+|`KC_PSCREEN`|`KC_PSCR`|PrintScreen|
+|`KC_SCROLLLOCK`|`KC_SLCK`|Scroll Lock|
+|`KC_PAUSE`|`KC_PAUS`|Pause|
+|`KC_INSERT`|`KC_INS`|Insert|
+|`KC_HOME`||Home|
+|`KC_PGUP`||PageUp|
+|`KC_DELETE`|`KC_DEL`|Delete Forward|
+|`KC_END`||End|
+|`KC_PGDOWN`|`KC_PGDN`|PageDown|
+|`KC_RIGHT`|`KC_RGHT`|RightArrow|
+|`KC_LEFT`||LeftArrow|
+|`KC_DOWN`||DownArrow|
+|`KC_UP`||UpArrow|
+|`KC_APPLICATION`|`KC_APP`|Application|
+|`KC_POWER`||Power|
+|`KC_EXECUTE`||Execute|
+|`KC_HELP`||Help|
+|`KC_MENU`||Menu|
+|`KC_SELECT`||Select|
+|`KC_AGAIN`||Again|
+|`KC_UNDO`||Undo|
+|`KC_CUT`||Cut|
+|`KC_COPY`||Copy|
+|`KC_PASTE`||Paste|
+|`KC_FIND`||Find|
+|`KC_ALT_ERASE`||Alternate Erase|
+|`KC_SYSREQ`||SysReq/Attention|
+|`KC_CANCEL`||Cancel|
+|`KC_CLEAR`||Clear|
+|`KC_PRIOR`||Prior|
+|`KC_RETURN`||Return|
+|`KC_SEPARATOR`||Separator|
+|`KC_OUT`||Out|
+|`KC_OPER`||Oper|
+|`KC_CLEAR_AGAIN`||Clear/Again|
+|`KC_CRSEL`||CrSel/Props|
+|`KC_EXSEL`||ExSel|
+|`KC_SYSTEM_POWER`|`KC_PWR`|System Power Down|
+|`KC_SYSTEM_SLEEP`|`KC_SLEP`|System Sleep|
+|`KC_SYSTEM_WAKE`|`KC_WAKE`|System Wake|
+|`KC_MAIL`|`KC_MAIL`||
+|`KC_CALCULATOR`|`KC_CALC`||
+|`KC_MY_COMPUTER`|`KC_MYCM`||
+|`KC_WWW_SEARCH`|`KC_WSCH`||
+|`KC_WWW_HOME`|`KC_WHOM`||
+|`KC_WWW_BACK`|`KC_WBAK`||
+|`KC_WWW_FORWARD`|`KC_WFWD`||
+|`KC_WWW_STOP`|`KC_WSTP`||
+|`KC_WWW_REFRESH`|`KC_WREF`||
+|`KC_WWW_FAVORITES`|`KC_WFAV`||
+|`KC_STOP`||Stop|
+|`KC__MUTE`||Mute|
+|`KC__VOLUP`||Volume Up|
+|`KC__VOLDOWN`||Volume Down|
+|`KC_AUDIO_MUTE`|`KC_MUTE`||
+|`KC_AUDIO_VOL_UP`|`KC_VOLU`||
+|`KC_AUDIO_VOL_DOWN`|`KC_VOLD`||
+|`KC_MEDIA_NEXT_TRACK`|`KC_MNXT`|Next Track (Windows)|
+|`KC_MEDIA_PREV_TRACK`|`KC_MPRV`|Previous Track (Windows)|
+|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD`|Next Track (macOS)|
+|`KC_MEDIA_REWIND`|`KC_MRWD`|Previous Track (macOS)|
+|`KC_MEDIA_STOP`|`KC_MSTP`||
+|`KC_MEDIA_PLAY_PAUSE`|`KC_MPLY`||
+|`KC_MEDIA_SELECT`|`KC_MSEL`||
+|`KC_NUMLOCK`|`KC_NLCK`|Keypad Num Lock and Clear|
+|`KC_KP_SLASH`|`KC_PSLS`|Keypad /|
+|`KC_KP_ASTERISK`|`KC_PAST`|Keypad *|
+|`KC_KP_MINUS`|`KC_PMNS`|Keypad -|
+|`KC_KP_PLUS`|`KC_PPLS`|Keypad +|
+|`KC_KP_ENTER`|`KC_PENT`|Keypad ENTER`|
+|`KC_KP_1`|`KC_P1`|Keypad 1 and End|
+|`KC_KP_2`|`KC_P2`|Keypad 2 and Down Arrow|
+|`KC_KP_3`|`KC_P3`|Keypad 3 and PageDn|
+|`KC_KP_4`|`KC_P4`|Keypad 4 and Left Arrow|
+|`KC_KP_5`|`KC_P5`|Keypad 5|
+|`KC_KP_6`|`KC_P6`|Keypad 6 and Right Arrow|
+|`KC_KP_7`|`KC_P7`|Keypad 7 and Home|
+|`KC_KP_8`|`KC_P8`|Keypad 8 and Up Arrow|
+|`KC_KP_9`|`KC_P9`|Keypad 9 and PageUp|
+|`KC_KP_0`|`KC_P0`|Keypad 0 and Insert|
+|`KC_KP_DOT`|`KC_PDOT`|Keypad . and Delete|
+|`KC_KP_EQUAL`|`KC_PEQL`|Keypad =|
+|`KC_KP_COMMA`|`KC_PCMM`|Keypad Comma|
+|`KC_KP_EQUAL_AS400`||Keypad Equal Sign|
+|`KC_NO`||Ignore this key. (NOOP) |
+|`KC_TRNS`||Make this key transparent to find the key on a lower layer.|
+|[`KC_MS_UP`](mouse_keys.md)|`KC_MS_U`|Mouse Cursor Up|
+|[`KC_MS_DOWN`](mouse_keys.md)|`KC_MS_D`|Mouse Cursor Down|
+|[`KC_MS_LEFT`](mouse_keys.md)|`KC_MS_L`|Mouse Cursor Left|
+|[`KC_MS_RIGHT`](mouse_keys.md)|`KC_MS_R`|Mouse Cursor Right|
+|[`KC_MS_BTN1`](mouse_keys.md)|`KC_BTN1`|Mouse Button 1|
+|[`KC_MS_BTN2`](mouse_keys.md)|`KC_BTN2`|Mouse Button 2|
+|[`KC_MS_BTN3`](mouse_keys.md)|`KC_BTN3`|Mouse Button 3|
+|[`KC_MS_BTN4`](mouse_keys.md)|`KC_BTN4`|Mouse Button 4|
+|[`KC_MS_BTN5`](mouse_keys.md)|`KC_BTN5`|Mouse Button 5|
+|[`KC_MS_WH_UP`](mouse_keys.md)|`KC_WH_U`|Mouse Wheel Up|
+|[`KC_MS_WH_DOWN`](mouse_keys.md)|`KC_WH_D`|Mouse Wheel Down|
+|[`KC_MS_WH_LEFT`](mouse_keys.md)|`KC_WH_L`|Mouse Wheel Left|
+|[`KC_MS_WH_RIGHT`](mouse_keys.md)|`KC_WH_R`|Mouse Wheel Right|
+|[`KC_MS_ACCEL0`](mouse_keys.md)|`KC_ACL0`|Mouse Acceleration 0|
+|[`KC_MS_ACCEL1`](mouse_keys.md)|`KC_ACL1`|Mouse Acceleration 1|
+|[`KC_MS_ACCEL2`](mouse_keys.md)|`KC_ACL2`|Mouse Acceleration 2|
+|[`RESET`](quantum_keycodes.md#qmk-keycodes)||Put the keyboard into DFU mode for flashing|
+|[`DEBUG`](quantum_keycodes.md#qmk-keycodes)||Toggles debug mode|
+|[`KC_GESC`](quantum_keycodes.md#qmk-keycodes)|`GRAVE_ESC`|Acts as escape when pressed normally but when pressed with Shift or GUI will send a `~`|
+|[`KC_LSPO`](quantum_keycodes.md#qmk-keycodes)||Left shift when held, open paranthesis when tapped|
+|[`KC_RSPC`](quantum_keycodes.md#qmk-keycodes)||Right shift when held, close paranthesis when tapped|
+|[`KC_LEAD`](feature_leader_key.md)||The leader key|
+|[`FUNC(n)`](quantum_keycodes.md#qmk-keycodes)|`F(n)`|Call `fn_action(n)`|
+|[`M(n)`](quantum_keycodes.md#qmk-keycodes)||to call macro n|
+|[`MACROTAP(n)`](quantum_keycodes.md#qmk-keycodes)||to macro-tap n idk FIXME`|
+|[`MAGIC_SWAP_CONTROL_CAPSLOCK`](feature_bootmagic.md)||Swap Capslock and Left Control|
+|[`MAGIC_CAPSLOCK_TO_CONTROL`](feature_bootmagic.md)||Treat Capslock like a Control Key|
+|[`MAGIC_SWAP_LALT_LGUI`](feature_bootmagic.md)||Swap the left Alt and GUI keys|
+|[`MAGIC_SWAP_RALT_RGUI`](feature_bootmagic.md)||Swap the right Alt and GUI keys|
+|[`MAGIC_NO_GUI`](feature_bootmagic.md)||Disable the GUI key|
+|[`MAGIC_SWAP_GRAVE_ESC`](feature_bootmagic.md)||Swap the Grave and Esc key.|
+|[`MAGIC_SWAP_BACKSLASH_BACKSPACE`](feature_bootmagic.md)||Swap backslack and backspace|
+|[`MAGIC_HOST_NKRO`](feature_bootmagic.md)||Force NKRO on|
+|[`MAGIC_SWAP_ALT_GUI`/`AG_SWAP`](feature_bootmagic.md)||Swap Alt and Gui on both sides|
+|[`MAGIC_UNSWAP_CONTROL_CAPSLOCK`](feature_bootmagic.md)||Disable the Control/Capslock swap|
+|[`MAGIC_UNCAPSLOCK_TO_CONTROL`](feature_bootmagic.md)||Disable treating Capslock like Control |
+|[`MAGIC_UNSWAP_LALT_LGUI`](feature_bootmagic.md)||Disable Left Alt and GUI switching|
+|[`MAGIC_UNSWAP_RALT_RGUI`](feature_bootmagic.md)||Disable Right Alt and GUI switching|
+|[`MAGIC_UNNO_GUI`](feature_bootmagic.md)||Enable the GUI key |
+|[`MAGIC_UNSWAP_GRAVE_ESC`](feature_bootmagic.md)||Disable the Grave/Esc swap |
+|[`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`](feature_bootmagic.md)||Disable the backslash/backspace swap|
+|[`MAGIC_UNHOST_NKRO`](feature_bootmagic.md)||Force NKRO off|
+|[`MAGIC_UNSWAP_ALT_GUI`/`AG_NORM`](feature_bootmagic.md)||Disable the Alt/GUI switching|
+|[`MAGIC_TOGGLE_NKRO`](feature_bootmagic.md)||Turn NKRO on or off|
+|[`BL_x`](feature_backlight.md)||Set a specific backlight level between 0-9|
+|[`BL_ON`](feature_backlight.md)||An alias for `BL_9`|
+|[`BL_OFF`](feature_backlight.md)||An alias for `BL_0`|
+|[`BL_DEC`](feature_backlight.md)||Turn the backlight level down by 1|
+|[`BL_INC`](feature_backlight.md)||Turn the backlight level up by 1|
+|[`BL_TOGG`](feature_backlight.md)||Toggle the backlight on or off|
+|[`BL_STEP`](feature_backlight.md)||Step through backlight levels, wrapping around to 0 when you reach the top.|
+|[`RGB_TOG`](feature_rgblight.md)||toggle on/off|
+|[`RGB_MOD`](feature_rgblight.md)||cycle through modes|
+|[`RGB_HUI`](feature_rgblight.md)||hue increase|
+|[`RGB_HUD`](feature_rgblight.md)||hue decrease|
+|[`RGB_SAI`](feature_rgblight.md)||saturation increase|
+|[`RGB_SAD`](feature_rgblight.md)||saturation decrease|
+|[`RGB_VAI`](feature_rgblight.md)||value increase|
+|[`RGB_VAD`](feature_rgblight.md)||value decrease|
+|[`PRINT_ON`](feature_thermal_printer.md)||Start printing everything the user types|
+|[`PRINT_OFF`](feature_thermal_printer.md)||Stop printing everything the user types|
+|[`OUT_AUTO`](feature_bluetooth.md)||auto mode|
+|[`OUT_USB`](feature_bluetooth.md)||usb only|
+|[`OUT_BT`](feature_bluetooth.md)||bluetooth (when `BLUETOOTH_ENABLE`)|
+|[`KC_HYPR`](quantum_keycodes.md#modifiers)||Hold down LCTL + LSFT + LALT + LGUI`|
+|[`KC_MEH`](quantum_keycodes.md#modifiers)||Hold down LCTL + LSFT + LALT`|
+|[`LCTL(kc)`](quantum_keycodes.md#modifiers)||`LCTL` + `kc`|
+|[`LSFT(kc)`](quantum_keycodes.md#modifiers)|[`S(kc)`](quantum_keycodes.md#modifiers)|`LSFT` + `kc`|
+|[`LALT(kc)`](quantum_keycodes.md#modifiers)||`LALT` + `kc`|
+|[`LGUI(kc)`](quantum_keycodes.md#modifiers)||`LGUI` + `kc`|
+|[`RCTL(kc)`](quantum_keycodes.md#modifiers)||`RCTL` + `kc`|
+|[`RSFT(kc)`](quantum_keycodes.md#modifiers)||`RSFT` + `kc`|
+|[`RALT(kc)`](quantum_keycodes.md#modifiers)||`RALT` + `kc`|
+|[`RGUI(kc)`](quantum_keycodes.md#modifiers)||`RGUI` + `kc`|
+|[`HYPR(kc)`](quantum_keycodes.md#modifiers)||`LCTL` + `LSFT` + `LALT` + `LGUI` + `kc`|
+|[`MEH(kc)`](quantum_keycodes.md#modifiers)||`LCTL` + `LSFT` + `LALT` + `kc`|
+|[`LCAG(kc)`](quantum_keycodes.md#modifiers)||`LCTL` + `LALT` + `LGUI` + `kc`|
+|[`ALTG(kc)`](quantum_keycodes.md#modifiers)||`RCTL` + `RALT` + `kc`|
+|[`SCMD(kc)`](quantum_keycodes.md#modifiers)|[`SWIN(kc)`](quantum_keycodes.md#modifiers)|`LGUI` + `LSFT` + `kc`|
+|[`LCA(kc)`](quantum_keycodes.md#modifiers)||`LCTL` + `LALT` + `kc`|
+|[`CTL_T(kc)`](quantum_keycodes.md#mod-tap-keys)|[`LCTL_T(kc)`](quantum_keycodes.md#mod-tap-keys)|`LCTL` when held, `kc` when tapped|
+|[`RCTL_T(kc)`](quantum_keycodes.md#mod-tap-keys)||[`RCTL` when held, `kc` when tapped|
+|[`SFT_T(kc)`](quantum_keycodes.md#mod-tap-keys)|[`LSFT_T(kc)`](quantum_keycodes.md#mod-tap-keys)|`LSFT` when held, `kc` when tapped|
+|[`RSFT_T(kc)`](quantum_keycodes.md#mod-tap-keys)||[`RSFT` when held, `kc` when tapped|
+|[`ALT_T(kc)`](quantum_keycodes.md#mod-tap-keys)|[`LALT_T(kc)`](quantum_keycodes.md#mod-tap-keys)|`LALT` when held, `kc` when tapped|
+|[`RALT_T(kc)`](quantum_keycodes.md#mod-tap-keys)|[`ALGR_T(kc)`](quantum_keycodes.md#mod-tap-keys)|`RALT` when held, `kc` when tapped|
+|[`GUI_T(kc)`](quantum_keycodes.md#mod-tap-keys)|[`LGUI_T(kc)`](quantum_keycodes.md#mod-tap-keys)|`LGUI` when held, `kc` when tapped|
+|[`RGUI_T(kc)`](quantum_keycodes.md#mod-tap-keys)||`RGUI` when held, `kc` when tapped|
+|[`C_S_T(kc)`](quantum_keycodes.md#mod-tap-keys)||`LCTL` + `LSFT` when held, `kc` when tapped|
+|[`MEH_T(kc)`](quantum_keycodes.md#mod-tap-keys)||`LCTL` + `LSFT` + `LALT` when held, `kc` when tapped|
+|[`LCAG_T(kc)`](quantum_keycodes.md#mod-tap-keys)||`LCTL` + `LALT` + `LGUI` when held, `kc` when tapped|
+|[`RCAG_T(kc)`](quantum_keycodes.md#mod-tap-keys)||`RCTL` + `RALT` + `RGUI` when held, `kc` when tapped|
+|[`ALL_T(kc)`](quantum_keycodes.md#mod-tap-keys)||`LCTL` + `LSFT` + `LALT` + `LGUI` when held, `kc` when tapped [more info](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)|
+|[`SCMD_T(kc)`](quantum_keycodes.md#mod-tap-keys)|[`SWIN_T(kc)`](quantum_keycodes.md#mod-tap-keys)|`LGUI` + `LSFT` when held, `kc` when tapped|
+|[`LCA_T(kc)`](quantum_keycodes.md#mod-tap-keys)||`LCTL` + `LALT` when held, `kc` when tapped|
+|[`KC_TILD`](keycodes_us_ansi_shifted.md)|`KC_TILDE`|tilde `~`|
+|[`KC_EXLM`](keycodes_us_ansi_shifted.md)|`KC_EXCLAIM`|exclamation mark `!`|
+|[`KC_AT`](keycodes_us_ansi_shifted.md)||at sign `@`|
+|[`KC_HASH`](keycodes_us_ansi_shifted.md)||hash sign `#`|
+|[`KC_DLR`](keycodes_us_ansi_shifted.md)|`KC_DOLLAR`|dollar sign `$`|
+|[`KC_PERC`](keycodes_us_ansi_shifted.md)|`KC_PERCENT`|percent sign `%`|
+|[`KC_CIRC`](keycodes_us_ansi_shifted.md)|`KC_CIRCUMFLEX`|circumflex `^`|
+|[`KC_AMPR`](keycodes_us_ansi_shifted.md)|`KC_AMPERSAND`|ampersand `&`|
+|[`KC_ASTR`](keycodes_us_ansi_shifted.md)|`KC_ASTERISK`|asterisk `*`|
+|[`KC_LPRN`](keycodes_us_ansi_shifted.md)|`KC_LEFT_PAREN`|left parenthesis `(`|
+|[`KC_RPRN`](keycodes_us_ansi_shifted.md)|`KC_RIGHT_PAREN`|right parenthesis `)`|
+|[`KC_UNDS`](keycodes_us_ansi_shifted.md)|`KC_UNDERSCORE`|underscore `_`|
+|[`KC_PLUS`](keycodes_us_ansi_shifted.md)||plus sign `+`|
+|[`KC_LCBR`](keycodes_us_ansi_shifted.md)|`KC_LEFT_CURLY_BRACE`|left curly brace `{`|
+|[`KC_RCBR`](keycodes_us_ansi_shifted.md)|`KC_RIGHT_CURLY_BRACE`|right curly brace `}`|
+|[`KC_LT`/`KC_LABK`](keycodes_us_ansi_shifted.md)|`KC_LEFT_ANGLE_BRACKET`|left angle bracket `<`|
+|[`KC_GT`/`KC_RABK`](keycodes_us_ansi_shifted.md)|`KC_RIGHT_ANGLE_BRACKET`|right angle bracket `>`|
+|[`KC_COLN`](keycodes_us_ansi_shifted.md)|`KC_COLON`|colon `:`|
+|[`KC_PIPE`](keycodes_us_ansi_shifted.md)||pipe `\|`|
+|[`KC_QUES`](keycodes_us_ansi_shifted.md)|`KC_QUESTION`|question mark `?`|
+|[`KC_DQT`/`KC_DQUO`](keycodes_us_ansi_shifted.md)|`KC_DOUBLE_QUOTE`|double quote `"`|
+|[`LT(layer, kc)`](feature_common_shortcuts.md#switching-and-toggling-layers)||turn on layer (0-15) when held, kc ([basic keycodes](keycodes_basic.md)) when tapped|
+|[`TO(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||turn on layer when depressed|
+|[`MO(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||momentarily turn on layer when depressed (requires `KC_TRNS` on destination layer)|
+|[`DF(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||sets the base (default) layer|
+|[`TG(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||toggle layer on/off|
+|[`TT(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||tap toggle? idk FIXME`|
+|[`OSM(mod)`](quantum_keycodes.md#one-shot-keys)||hold mod for one keypress|
+|[`OSL(layer)`](quantum_keycodes.md#one-shot-keys)||switch to layer for one keypress|
+|[`UNICODE(n)`](unicode.md)|[`UC(n)`](unicode.md)|if `UNICODE_ENABLE`, this will send characters up to `0x7FFF`|
+|[`X(n)`](unicode.md)||if `UNICODEMAP_ENABLE`, also sends unicode via a different method|
diff --git a/docs/basic_keycodes.md b/docs/keycodes_basic.md
index 4f84647a2..b1f69ab16 100644
--- a/docs/basic_keycodes.md
+++ b/docs/keycodes_basic.md
@@ -1,5 +1,11 @@
# Basic keycodes
+Basic keycodes are based on [HID Usage Keyboard/Keypad Page(0x07)](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) with following exceptions:
+
+* `KC_NO` = 0 for no action
+* `KC_TRNS` = 1 for layer transparency
+* internal special keycodes in the `0xA5-DF` range (tmk heritage).
+
## Letters and Numbers
|KC_1|KC_2|KC_3|KC_4|KC_5|KC_6|KC_7|KC_8|
diff --git a/docs/keycodes_us_ansi_shifted.md b/docs/keycodes_us_ansi_shifted.md
new file mode 100644
index 000000000..6c7ef4caa
--- /dev/null
+++ b/docs/keycodes_us_ansi_shifted.md
@@ -0,0 +1,31 @@
+# US ANSI Shifted symbols
+
+These 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.
+
+It's important to remember that all of these keycodes send a left shift - this may cause unintended actions if unaccounted for. The short code is preferred in most situations.
+
+## US ANSI Shifted Keycodes
+
+|Short Name|Long Name|Description|
+|----------|---------|-----------|
+|`KC_TILD`|`KC_TILDE`|tilde `~`|
+|`KC_EXLM`|`KC_EXCLAIM`|exclamation mark `!`|
+|`KC_AT`||at sign `@`|
+|`KC_HASH`||hash sign `#`|
+|`KC_DLR`|`KC_DOLLAR`|dollar sign `$`|
+|`KC_PERC`|`KC_PERCENT`|percent sign `%`|
+|`KC_CIRC`|`KC_CIRCUMFLEX`|circumflex `^`|
+|`KC_AMPR`|`KC_AMPERSAND`|ampersand `&`|
+|`KC_ASTR`|`KC_ASTERISK`|asterisk `*`|
+|`KC_LPRN`|`KC_LEFT_PAREN`|left parenthesis `(`|
+|`KC_RPRN`|`KC_RIGHT_PAREN`|right parenthesis `)`|
+|`KC_UNDS`|`KC_UNDERSCORE`|underscore `_`|
+|`KC_PLUS`||plus sign `+`|
+|`KC_LCBR`|`KC_LEFT_CURLY_BRACE`|left curly brace `{`|
+|`KC_RCBR`|`KC_RIGHT_CURLY_BRACE`|right curly brace `}`|
+|`KC_LT`/`KC_LABK`|`KC_LEFT_ANGLE_BRACKET`|left angle bracket `<`|
+|`KC_GT`/`KC_RABK`|`KC_RIGHT_ANGLE_BRACKET`|right angle bracket `>`|
+|`KC_COLN`|`KC_COLON`|colon `:`|
+|`KC_PIPE`||pipe `\|`|
+|`KC_QUES`|`KC_QUESTION`|question mark `?`|
+|`KC_DQT`/`KC_DQUO`|`KC_DOUBLE_QUOTE`|double quote `"`|
diff --git a/docs/keymap.md b/docs/keymap.md
index 53b17f401..170fdaed7 100644
--- a/docs/keymap.md
+++ b/docs/keymap.md
@@ -215,8 +215,7 @@ To actually handle the keypress event we define an `action_function()`. This fun
This should have given you a basic overview for creating your own keymap. For more details see the following resources:
-* https://github.com/qmk/qmk_firmware/wiki/Keycodes
-* https://github.com/qmk/qmk_firmware/wiki/FAQ-Keymap
-* https://github.com/qmk/qmk_firmware/wiki/Keymap-examples
+* [Keycodes](keycodes.md)
+* [Keymap FAQ](faq_keymap.md)
-We are actively working to improve these docs. If you have suggestions for how they could be made better please [file an issue](https://github.com/qmk/qmk_firmware/issues/new)! \ No newline at end of file
+We are actively working to improve these docs. If you have suggestions for how they could be made better please [file an issue](https://github.com/qmk/qmk_firmware/issues/new)!
diff --git a/docs/macros.md b/docs/macros.md
index 6b128541b..c7a9b2e7a 100644
--- a/docs/macros.md
+++ b/docs/macros.md
@@ -24,7 +24,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
};
```
-This defines two macros which will be run when the key they are assigned to is pressed. If you'd like them to run when the release is released instead you can change the if statement:
+This defines two macros which will be run when the key they are assigned to is pressed. If instead you'd like them to run when the key is released you can change the if statement:
```c
if (!record->event.pressed) {
diff --git a/docs/modding_your_keyboard.md b/docs/modding_your_keyboard.md
deleted file mode 100644
index a58fbd52b..000000000
--- a/docs/modding_your_keyboard.md
+++ /dev/null
@@ -1,403 +0,0 @@
-
-## Audio output from a speaker
-
-Your keyboard can make sounds! If you've got a Planck, Preonic, or basically any AVR keyboard that allows access to the C6 or B5 port (`#define C6_AUDIO` and/or `#define B5_AUDIO`), you can hook up a simple speaker and make it beep. You can use those beeps to indicate layer transitions, modifiers, special keys, or just to play some funky 8bit tunes.
-
-If you add `AUDIO_ENABLE = yes` to your `rules.mk`, there's a couple different sounds that will automatically be enabled without any other configuration:
-
-```
-STARTUP_SONG // plays when the keyboard starts up (audio.c)
-GOODBYE_SONG // plays when you press the RESET key (quantum.c)
-AG_NORM_SONG // plays when you press AG_NORM (quantum.c)
-AG_SWAP_SONG // plays when you press AG_SWAP (quantum.c)
-MUSIC_ON_SONG // plays when music mode is activated (process_music.c)
-MUSIC_OFF_SONG // plays when music mode is deactivated (process_music.c)
-CHROMATIC_SONG // plays when the chromatic music mode is selected (process_music.c)
-GUITAR_SONG // plays when the guitar music mode is selected (process_music.c)
-VIOLIN_SONG // plays when the violin music mode is selected (process_music.c)
-MAJOR_SONG // plays when the major music mode is selected (process_music.c)
-```
-
-You can override the default songs by doing something like this in your `config.h`:
-
-```c
-#ifdef AUDIO_ENABLE
- #define STARTUP_SONG SONG(STARTUP_SOUND)
-#endif
-```
-
-A full list of sounds can be found in [quantum/audio/song_list.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/song_list.h) - feel free to add your own to this list! All available notes can be seen in [quantum/audio/musical_notes.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/musical_notes.h).
-
-To play a custom sound at a particular time, you can define a song like this (near the top of the file):
-
-```c
-float my_song[][2] = SONG(QWERTY_SOUND);
-```
-
-And then play your song like this:
-
-```c
-PLAY_SONG(my_song);
-```
-
-Alternatively, you can play it in a loop like this:
-
-```c
-PLAY_LOOP(my_song);
-```
-
-It'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.
-
-## Music mode
-
-The 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.
-
-Recording is experimental due to some memory issues - if you experience some weird behavior, unplugging/replugging your keyboard will fix things.
-
-Keycodes available:
-
-* `MU_ON` - Turn music mode on
-* `MU_OFF` - Turn music mode off
-* `MU_TOG` - Toggle music mode
-* `MU_MOD` - Cycle through the music modes:
- * `CHROMATIC_MODE` - Chromatic scale, row changes the octave
- * `GUITAR_MODE` - Chromatic scale, but the row changes the string (+5 st)
- * `VIOLIN_MODE` - Chromatic scale, but the row changes the string (+7 st)
- * `MAJOR_MODE` - Major scale
-
-In music mode, the following keycodes work differently, and don't pass through:
-
-* `LCTL` - start a recording
-* `LALT` - stop recording/stop playing
-* `LGUI` - play recording
-* `KC_UP` - speed-up playback
-* `KC_DOWN` - slow-down playback
-
-By default, `MUSIC_MASK` is set to `keycode < 0xFF` which means keycodes less than `0xFF` are turned into notes, and don't output anything. You can change this by defining this in your `config.h` like this:
-
- #define MUSIC_MASK keycode != KC_NO
-
-Which will capture all keycodes - be careful, this will get you stuck in music mode until you restart your keyboard!
-
-The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, add something like this to your `config.h`:
-
- #define PITCH_STANDARD_A 432.0f
-
-## MIDI functionalty
-
-This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile.
-
-## Bluetooth functionality
-
-This 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.
-
-## RGB Under Glow Mod
-
-![Planck with RGB Underglow](https://raw.githubusercontent.com/qmk/qmk_firmware/master/keyboards/planck/keymaps/yang/planck-with-rgb-underglow.jpg)
-
-Here is a quick demo on Youtube (with NPKC KC60) (https://www.youtube.com/watch?v=VKrpPAHlisY).
-
-For this mod, you need an unused pin wiring to DI of WS2812 strip. After wiring the VCC, GND, and DI, you can enable the underglow in your Makefile.
-
- RGBLIGHT_ENABLE = yes
-
-In order to use the underglow animation functions, you need to have `#define RGBLIGHT_ANIMATIONS` in your `config.h`.
-
-Please add the following options into your config.h, and set them up according your hardware configuration. These settings are for the `F4` pin by default:
-
- #define RGB_DI_PIN F4 // The pin your RGB strip is wired to
- #define RGBLIGHT_ANIMATIONS // Require for fancier stuff (not compatible with audio)
- #define RGBLED_NUM 14 // Number of LEDs
- #define RGBLIGHT_HUE_STEP 10
- #define RGBLIGHT_SAT_STEP 17
- #define RGBLIGHT_VAL_STEP 17
-
-You'll need to edit `RGB_DI_PIN` to the pin you have your `DI` on your RGB strip wired to.
-
-The firmware supports 5 different light effects, and the color (hue, saturation, brightness) can be customized in most effects. To control the underglow, you need to modify your keymap file to assign those functions to some keys/key combinations. For details, please check this keymap. `keyboards/planck/keymaps/yang/keymap.c`
-
-### WS2812 Wiring
-
-![WS2812 Wiring](https://raw.githubusercontent.com/qmk/qmk_firmware/master/keyboards/planck/keymaps/yang/WS2812-wiring.jpg)
-
-Please note the USB port can only supply a limited amount of power to the keyboard (500mA by standard, however, modern computer and most usb hubs can provide 700+mA.). According to the data of NeoPixel from Adafruit, 30 WS2812 LEDs require a 5V 1A power supply, LEDs used in this mod should not more than 20.
-
-## PS/2 Mouse Support
-
-Its possible to hook up a PS/2 mouse (for example touchpads or trackpoints) to your keyboard as a composite device.
-
-To hook up a Trackpoint, you need to obtain a Trackpoint module (i.e. harvest from a Thinkpad keyboard), identify the function of each pin of the module, and make the necessary circuitry between controller and Trackpoint module. For more information, please refer to [Trackpoint Hardware](https://deskthority.net/wiki/TrackPoint_Hardware) page on Deskthority Wiki.
-
-There are three available modes for hooking up PS/2 devices: USART (best), interrupts (better) or busywait (not recommended).
-
-### Busywait version
-
-Note: This is not recommended, you may encounter jerky movement or unsent inputs. Please use interrupt or USART version if possible.
-
-In rules.mk:
-
-```
-PS2_MOUSE_ENABLE = yes
-PS2_USE_BUSYWAIT = yes
-```
-
-In your keyboard config.h:
-
-```
-#ifdef PS2_USE_BUSYWAIT
-# define PS2_CLOCK_PORT PORTD
-# define PS2_CLOCK_PIN PIND
-# define PS2_CLOCK_DDR DDRD
-# define PS2_CLOCK_BIT 1
-# define PS2_DATA_PORT PORTD
-# define PS2_DATA_PIN PIND
-# define PS2_DATA_DDR DDRD
-# define PS2_DATA_BIT 2
-#endif
-```
-
-### Interrupt version
-
-The 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.
-
-In rules.mk:
-
-```
-PS2_MOUSE_ENABLE = yes
-PS2_USE_INT = yes
-```
-
-In your keyboard config.h:
-
-```
-#ifdef PS2_USE_INT
-#define PS2_CLOCK_PORT PORTD
-#define PS2_CLOCK_PIN PIND
-#define PS2_CLOCK_DDR DDRD
-#define PS2_CLOCK_BIT 2
-#define PS2_DATA_PORT PORTD
-#define PS2_DATA_PIN PIND
-#define PS2_DATA_DDR DDRD
-#define PS2_DATA_BIT 5
-
-#define PS2_INT_INIT() do { \
- EICRA |= ((1<<ISC21) | \
- (0<<ISC20)); \
-} while (0)
-#define PS2_INT_ON() do { \
- EIMSK |= (1<<INT2); \
-} while (0)
-#define PS2_INT_OFF() do { \
- EIMSK &= ~(1<<INT2); \
-} while (0)
-#define PS2_INT_VECT INT2_vect
-#endif
-```
-
-### USART version
-
-To 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.
-
-In rules.mk:
-
-```
-PS2_MOUSE_ENABLE = yes
-PS2_USE_USART = yes
-```
-
-In your keyboard config.h:
-
-```
-#ifdef PS2_USE_USART
-#define PS2_CLOCK_PORT PORTD
-#define PS2_CLOCK_PIN PIND
-#define PS2_CLOCK_DDR DDRD
-#define PS2_CLOCK_BIT 5
-#define PS2_DATA_PORT PORTD
-#define PS2_DATA_PIN PIND
-#define PS2_DATA_DDR DDRD
-#define PS2_DATA_BIT 2
-
-/* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
-/* set DDR of CLOCK as input to be slave */
-#define PS2_USART_INIT() do { \
- PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT); \
- PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT); \
- UCSR1C = ((1 << UMSEL10) | \
- (3 << UPM10) | \
- (0 << USBS1) | \
- (3 << UCSZ10) | \
- (0 << UCPOL1)); \
- UCSR1A = 0; \
- UBRR1H = 0; \
- UBRR1L = 0; \
-} while (0)
-#define PS2_USART_RX_INT_ON() do { \
- UCSR1B = ((1 << RXCIE1) | \
- (1 << RXEN1)); \
-} while (0)
-#define PS2_USART_RX_POLL_ON() do { \
- UCSR1B = (1 << RXEN1); \
-} while (0)
-#define PS2_USART_OFF() do { \
- UCSR1C = 0; \
- UCSR1B &= ~((1 << RXEN1) | \
- (1 << TXEN1)); \
-} while (0)
-#define PS2_USART_RX_READY (UCSR1A & (1<<RXC1))
-#define PS2_USART_RX_DATA UDR1
-#define PS2_USART_ERROR (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1)))
-#define PS2_USART_RX_VECT USART1_RX_vect
-#endif
-```
-
-### Additional Settings
-
-#### PS/2 mouse features
-
-These enable settings supported by the PS/2 mouse protocol: http://www.computer-engineering.org/ps2mouse/
-
-```
-/* Use remote mode instead of the default stream mode (see link) */
-#define PS2_MOUSE_USE_REMOTE_MODE
-
-/* Enable the scrollwheel or scroll gesture on your mouse or touchpad */
-#define PS2_MOUSE_ENABLE_SCROLLING
-
-/* Some mice will need a scroll mask to be configured. The default is 0xFF. */
-#define PS2_MOUSE_SCROLL_MASK 0x0F
-
-/* Applies a transformation to the movement before sending to the host (see link) */
-#define PS2_MOUSE_USE_2_1_SCALING
-
-/* The time to wait after initializing the ps2 host */
-#define PS2_MOUSE_INIT_DELAY 1000 /* Default */
-```
-
-You can also call the following functions from ps2_mouse.h
-
-```
-void ps2_mouse_disable_data_reporting(void);
-
-void ps2_mouse_enable_data_reporting(void);
-
-void ps2_mouse_set_remote_mode(void);
-
-void ps2_mouse_set_stream_mode(void);
-
-void ps2_mouse_set_scaling_2_1(void);
-
-void ps2_mouse_set_scaling_1_1(void);
-
-void ps2_mouse_set_resolution(ps2_mouse_resolution_t resolution);
-
-void ps2_mouse_set_sample_rate(ps2_mouse_sample_rate_t sample_rate);
-```
-
-#### Fine control
-
-Use the following defines to change the sensitivity and speed of the mouse.
-Note: you can also use `ps2_mouse_set_resolution` for the same effect (not supported on most touchpads).
-
-```
-#define PS2_MOUSE_X_MULTIPLIER 3
-#define PS2_MOUSE_Y_MULTIPLIER 3
-#define PS2_MOUSE_V_MULTIPLIER 1
-```
-
-#### Scroll button
-
-If you're using a trackpoint, you will likely want to be able to use it for scrolling.
-Its possible to enable a "scroll button/s" that when pressed will cause the mouse to scroll instead of moving.
-To enable the feature, you must set a scroll button mask as follows:
-
-```
-#define PS2_MOUSE_SCROLL_BTN_MASK (1<<PS2_MOUSE_BUTTON_MIDDLE) /* Default */
-```
-
-To disable the scroll button feature:
-
-```
-#define PS2_MOUSE_SCROLL_BTN_MASK 0
-```
-
-The available buttons are:
-
-```
-#define PS2_MOUSE_BTN_LEFT 0
-#define PS2_MOUSE_BTN_RIGHT 1
-#define PS2_MOUSE_BTN_MIDDLE 2
-```
-
-You can also combine buttons in the mask by `|`ing them together.
-
-Once you've configured your scroll button mask, you must configure the scroll button send interval.
-This is the interval before which if the scroll buttons were released they would be sent to the host.
-After this interval, they will cause the mouse to scroll and will not be sent.
-
-```
-#define PS2_MOUSE_SCROLL_BTN_SEND 300 /* Default */
-```
-
-To disable sending the scroll buttons:
-```
-#define PS2_MOUSE_SCROLL_BTN_SEND 0
-```
-
-Fine control over the scrolling is supported with the following defines:
-
-```
-#define PS2_MOUSE_SCROLL_DIVISOR_H 2
-#define PS2_MOUSE_SCROLL_DIVISOR_V 2
-```
-
-#### Debug settings
-
-To debug the mouse, add `debug_mouse = true` or enable via bootmagic.
-
-```
-/* To debug the mouse reports */
-#define PS2_MOUSE_DEBUG_HID
-#define PS2_MOUSE_DEBUG_RAW
-```
-
-## Safety Considerations
-
-You probably don't want to "brick" your keyboard, making it impossible
-to rewrite firmware onto it. Here are some of the parameters to show
-what things are (and likely aren't) too risky.
-
-- If your keyboard map does not include RESET, then, to get into DFU
- mode, you will need to press the reset button on the PCB, which
- requires unscrewing the bottom.
-- Messing with tmk_core / common files might make the keyboard
- inoperable
-- Too large a .hex file is trouble; `make dfu` will erase the block,
- test the size (oops, wrong order!), which errors out, failing to
- flash the keyboard, leaving it in DFU mode.
- - To this end, note that the maximum .hex file size on Planck is
- 7000h (28672 decimal)
-
-```
-Linking: .build/planck_rev4_cbbrowne.elf [OK]
-Creating load file for Flash: .build/planck_rev4_cbbrowne.hex [OK]
-
-Size after:
- text data bss dec hex filename
- 0 22396 0 22396 577c planck_rev4_cbbrowne.hex
-```
-
- - The above file is of size 22396/577ch, which is less than
- 28672/7000h
- - As long as you have a suitable alternative .hex file around, you
- can retry, loading that one
- - Some of the options you might specify in your keyboard's Makefile
- consume extra memory; watch out for BOOTMAGIC_ENABLE,
- MOUSEKEY_ENABLE, EXTRAKEY_ENABLE, CONSOLE_ENABLE, API_SYSEX_ENABLE
-- DFU tools do /not/ allow you to write into the bootloader (unless
- you throw in extra fruitsalad of options), so there is little risk
- there.
-- EEPROM has around a 100000 write cycle. You shouldn't rewrite the
- firmware repeatedly and continually; that'll burn the EEPROM
- eventually.
-
diff --git a/docs/porting_your_keyboard_to_qmk.md b/docs/porting_your_keyboard_to_qmk.md
index 5a5025c35..3fa08830b 100644
--- a/docs/porting_your_keyboard_to_qmk.md
+++ b/docs/porting_your_keyboard_to_qmk.md
@@ -34,7 +34,7 @@ The values at the top likely won't need to be changed, since most boards use the
OPT_DEFS += -DBOOTLOADER_SIZE=512
```
-At the bottom of the file, you'll find lots of features to turn on and off - all of these options should be set with `?=` to allow for the keymap overrides. `?=` only assigns if the variable was previously undefined. For the full documenation of these features, see the [Makefile options](#makefile-options).
+At the bottom of the file, you'll find lots of features to turn on and off - all of these options should be set with `?=` to allow for the keymap overrides. `?=` only assigns if the variable was previously undefined. For the full documenation of these features, see the [Makefile options](getting_started_make_guide.md#makefile-options).
## `/keyboards/<keyboard>/readme.md`
@@ -42,7 +42,7 @@ This is where you'll describe your keyboard - please write as much as you can ab
## `/keyboards/<keyboard>/<keyboard>.c`
-This is where all of the custom logic for your keyboard goes - you may not need to put anything in this file, since a lot of things are configured automatically. All of the `*_kb()` functions are defined here. If you modify them, remember to keep the calls to `*_user()`, or things in the keymaps might not work. You can read more about the functions [here](#custom-quantum-functions-for-keyboards-and-keymaps)
+This is where all of the custom logic for your keyboard goes - you may not need to put anything in this file, since a lot of things are configured automatically. All of the `*_kb()` functions are defined here. If you modify them, remember to keep the calls to `*_user()`, or things in the keymaps might not work. You can read more about the functions [here](custom_quantum_functions.md).
## `/keyboards/<keyboard>/<keyboard>.h`
diff --git a/docs/qmk_overview.md b/docs/qmk_overview.md
deleted file mode 100644
index 6fdb68c49..000000000
--- a/docs/qmk_overview.md
+++ /dev/null
@@ -1,75 +0,0 @@
-# QMK Overview
-
-This 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.
-
-# Basic QMK structure
-
-QMK is a fork of @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.
-
-## Keyboard project structure
-
-Within the `handwired` and `keyboard` folders is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within you'll find the following structure:
-
-* `keymaps/`: Different keymaps that can be built
-* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `Makefile`.
-* `config.h`: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific `config.h`.
-
-### Keymap structure
-
-In every keymap folder, the following files may be found. Only `keymap.c` is required, if the rest of the files are not found the default options will be chosen.
-
-* `config.h`: the options to configure your keymap
-* `keymap.c`: all of your keymap code, required
-* `Makefile`: the features of QMK that are enabled, required to run `make` in your keymap folder
-* `readme.md`: a description of your keymap, how others might use it, and explanations of features
-* Other files: Some people choose to include an image depicting the layout, and other files that help people to use or understand a particular keymap.
-
-# The `make` command
-
-The `make` command is how you compile the firmware into a .hex file, which can be loaded by a dfu programmer (like dfu-progammer via `make dfu`) or the [Teensy loader](https://www.pjrc.com/teensy/loader.html) (only used with Teensys). It it recommended that you always run make from within the `root` folder.
-
-**NOTE:** To abort a make command press `Ctrl-c`
-
-For more details on the QMK build process see [Make Instructions](make_instructions.md).
-
-### Simple instructions for building and uploading a keyboard
-
-**Most keyboards have more specific instructions in the keyboard specific readme.md file, so please check that first**
-
-1. Enter the `root` folder
-2. Run `make <keyboard>-<subproject>-<keymap>-<programmer>`
-
-In the above commands, replace:
-
-* `<keyboard>` with the name of your keyboard
-* `<keymap>` with the name of your keymap
-* `<subproject>` with the name of the subproject (revision or sub-model of your keyboard). For example, for Ergodox it can be `ez` or `infinity`, and for Planck `rev3` or `rev4`.
- * If the keyboard doesn't have a subproject, or if you are happy with the default (defined in `rules.mk` file of the `keyboard` folder), you can leave it out. But remember to also remove the dash (`-`) from the command.
-* `<programmer>` The programmer to use. Most keyboards use `dfu`, but some use `teensy`. Infinity keyboards use `dfu-util`. Check the readme file in the keyboard folder to find out which programmer to use.
- * If you don't add `-<programmer` to the command line, the firmware will be still be compiled into a hex file, but the upload will be skipped.
-
-**NOTE:** Some operating systems will refuse to program unless you run the make command as root for example `sudo make clueboard-default-dfu`
-
-## Make Examples
-
-* Build all Clueboard keymaps: `make clueboard`
-* Build the default Planck keymap: `make planck-rev4-default`
-* Build and flash your ergodox-ez: `make ergodox-ez-default-teensy`
-
-# The `config.h` file
-
-There are 2 `config.h` locations:
-
-* keyboard (`/keyboards/<keyboard>/`)
-* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/`)
-
-The keyboard `config.h` is included only if the keymap one doesn't exist. The format to use for your custom one [is here](https://github.com/qmk/qmk_firmware/blob/master/doc/keymap_config_h_example.h). If you want to override a setting from the parent `config.h` file, you need to do this:
-
-```c
-#undef MY_SETTING
-#define MY_SETTING 4
-```
-
-For a value of `4` for this imaginary setting. So we `undef` it first, then `define` it.
-
-You can then override any settings, rather than having to copy and paste the whole thing. \ No newline at end of file
diff --git a/docs/quantum_keycodes.md b/docs/quantum_keycodes.md
index f13801ef5..a5160bf94 100644
--- a/docs/quantum_keycodes.md
+++ b/docs/quantum_keycodes.md
@@ -1,8 +1,10 @@
# Quantum Keycodes
+Quantum keycodes allow for easier customisation of your keymap than the basic ones provide, without having to define custom actions.
+
All keycodes within quantum are numbers between `0x0000` and `0xFFFF`. Within your `keymap.c` it may look like you have functions and other special cases, but ultimately the C preprocessor will translate those into a single 4 byte integer. QMK has reserved `0x0000` through `0x00FF` for standard keycodes. These are keycodes such as `KC_A`, `KC_1`, and `KC_LCTL`, which are basic keys defined in the USB HID specification.
-On 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. Keycodes above `0x00FF` may not be used with any of the mod/layer-tap keys listed
+On 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.
## QMK keycodes
@@ -10,345 +12,11 @@ On this page we have documented keycodes between `0x00FF` and `0xFFFF` which are
|----|-----------|
|`RESET`|Put the keyboard into DFU mode for flashing|
|`DEBUG`|Toggles debug mode|
-|`KC_GESC`/`GRAVE_ESC`|Acts as escape when pressed normally but when pressed with Shift or GUI will send a `~`|
+|`KC_GESC`/`GRAVE_ESC`|Acts as escape when pressed normally but when pressed with Shift or GUI will send a ```|
|`KC_LSPO`|Left shift when held, open paranthesis when tapped|
|`KC_RSPC`|Right shift when held, close paranthesis when tapped|
-|`KC_LEAD`|The [leader key](leader_key.md)|
-|`FUNC(n)`/`F(n)`|Call `fn_action(n)`|
+|`KC_LEAD`|The [leader key](feature_leader_key.md)|
+|`KC_LOCK`|The [lock key](key_lock.md)|
+|`FUNC(n)`/`F(n)`|Call `fn_action(n)` (deprecated)|
|`M(n)`|to call macro n|
|`MACROTAP(n)`|to macro-tap n idk FIXME|
-|`KC_LOCK`|The [lock key](key_lock.md)|
-
-## Bootmagic Keycodes
-
-Shortcuts for bootmagic options (these work even when bootmagic is off.)
-
-|Name|Description|
-|----|-----------|
-|`MAGIC_SWAP_CONTROL_CAPSLOCK`|Swap Capslock and Left Control|
-|`MAGIC_CAPSLOCK_TO_CONTROL`|Treat Capslock like a Control Key|
-|`MAGIC_SWAP_LALT_LGUI`|Swap the left Alt and GUI keys|
-|`MAGIC_SWAP_RALT_RGUI`|Swap the right Alt and GUI keys|
-|`MAGIC_NO_GUI`|Disable the GUI key|
-|`MAGIC_SWAP_GRAVE_ESC`|Swap the Grave and Esc key.|
-|`MAGIC_SWAP_BACKSLASH_BACKSPACE`|Swap backslack and backspace|
-|`MAGIC_HOST_NKRO`|Force NKRO on|
-|`MAGIC_SWAP_ALT_GUI`/`AG_SWAP`|Swap Alt and Gui on both sides|
-|`MAGIC_UNSWAP_CONTROL_CAPSLOCK`|Disable the Control/Capslock swap|
-|`MAGIC_UNCAPSLOCK_TO_CONTROL`|Disable treating Capslock like Control |
-|`MAGIC_UNSWAP_LALT_LGUI`|Disable Left Alt and GUI switching|
-|`MAGIC_UNSWAP_RALT_RGUI`|Disable Right Alt and GUI switching|
-|`MAGIC_UNNO_GUI`|Enable the GUI key |
-|`MAGIC_UNSWAP_GRAVE_ESC`|Disable the Grave/Esc swap |
-|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`|Disable the backslash/backspace swap|
-|`MAGIC_UNHOST_NKRO`|Force NKRO off|
-|`MAGIC_UNSWAP_ALT_GUI`/`AG_NORM`|Disable the Alt/GUI switching|
-|`MAGIC_TOGGLE_NKRO`|Turn NKRO on or off|
-
-<!-- FIXME: this formatting needs work
-
-## Audio
-
-```c
-#ifdef AUDIO_ENABLE
- AU_ON,
- AU_OFF,
- AU_TOG,
-
- #ifdef FAUXCLICKY_ENABLE
- FC_ON,
- FC_OFF,
- FC_TOG,
- #endif
-
- // Music mode on/off/toggle
- MU_ON,
- MU_OFF,
- MU_TOG,
-
- // Music voice iterate
- MUV_IN,
- MUV_DE,
-#endif
-```
-
-### Midi
-
-#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
- MI_ON, // send midi notes when music mode is enabled
- MI_OFF, // don't send midi notes when music mode is enabled
-#endif
-
-MIDI_TONE_MIN,
-MIDI_TONE_MAX
-
-MI_C = MIDI_TONE_MIN,
-MI_Cs,
-MI_Db = MI_Cs,
-MI_D,
-MI_Ds,
-MI_Eb = MI_Ds,
-MI_E,
-MI_F,
-MI_Fs,
-MI_Gb = MI_Fs,
-MI_G,
-MI_Gs,
-MI_Ab = MI_Gs,
-MI_A,
-MI_As,
-MI_Bb = MI_As,
-MI_B,
-
-MIDI_TONE_KEYCODE_OCTAVES > 1
-
-where x = 1-5:
-MI_C_x,
-MI_Cs_x,
-MI_Db_x = MI_Cs_x,
-MI_D_x,
-MI_Ds_x,
-MI_Eb_x = MI_Ds_x,
-MI_E_x,
-MI_F_x,
-MI_Fs_x,
-MI_Gb_x = MI_Fs_x,
-MI_G_x,
-MI_Gs_x,
-MI_Ab_x = MI_Gs_x,
-MI_A_x,
-MI_As_x,
-MI_Bb_x = MI_As_x,
-MI_B_x,
-
-MI_OCT_Nx 1-2
-MI_OCT_x 0-7
-MIDI_OCTAVE_MIN = MI_OCT_N2,
-MIDI_OCTAVE_MAX = MI_OCT_7,
-MI_OCTD, // octave down
-MI_OCTU, // octave up
-
-MI_TRNS_Nx 1-6
-MI_TRNS_x 0-6
-MIDI_TRANSPOSE_MIN = MI_TRNS_N6,
-MIDI_TRANSPOSE_MAX = MI_TRNS_6,
-MI_TRNSD, // transpose down
-MI_TRNSU, // transpose up
-
-MI_VEL_x 1-10
-MIDI_VELOCITY_MIN = MI_VEL_1,
-MIDI_VELOCITY_MAX = MI_VEL_9,
-MI_VELD, // velocity down
-MI_VELU, // velocity up
-
-MI_CHx 1-16
-MIDI_CHANNEL_MIN = MI_CH1
-MIDI_CHANNEL_MAX = MI_CH16,
-MI_CHD, // previous channel
-MI_CHU, // next channel
-
-MI_ALLOFF, // all notes off
-
-MI_SUS, // sustain
-MI_PORT, // portamento
-MI_SOST, // sostenuto
-MI_SOFT, // soft pedal
-MI_LEG, // legato
-
-MI_MOD, // modulation
-MI_MODSD, // decrease modulation speed
-MI_MODSU, // increase modulation speed
-#endif // MIDI_ADVANCED
-
--->
-
-## Backlight
-
-These keycodes control the backlight. Most keyboards use this for single color in-switch lighting.
-
-|Name|Description|
-|----|-----------|
-|`BL_x`|Set a specific backlight level between 0-9|
-|`BL_ON`|An alias for `BL_9`|
-|`BL_OFF`|An alias for `BL_0`|
-|`BL_DEC`|Turn the backlight level down by 1|
-|`BL_INC`|Turn the backlight level up by 1|
-|`BL_TOGG`|Toggle the backlight on or off|
-|`BL_STEP`|Step through backlight levels, wrapping around to 0 when you reach the top.|
-
-## RGBLIGHT WS2818 LEDs
-
-This controls the `RGBLIGHT` functionality. Most keyboards use WS2812 (and compatible) LEDs for underlight or case lighting.
-
-|Name|Description|
-|----|-----------|
-|`RGB_TOG`|toggle on/off|
-|`RGB_MOD`|cycle through modes|
-|`RGB_HUI`|hue increase|
-|`RGB_HUD`|hue decrease|
-|`RGB_SAI`|saturation increase|
-|`RGB_SAD`|saturation decrease|
-|`RGB_VAI`|value increase|
-|`RGB_VAD`|value decrease|
-
-## Thermal Printer (experimental)
-
-|Name|Description|
-|----|-----------|
-|`PRINT_ON`|Start printing everything the user types|
-|`PRINT_OFF`|Stop printing everything the user types|
-
-## Keyboard output selection
-
-This is used when multiple keyboard outputs can be selected. Currently this only allows for switching between USB and Bluetooth on keyboards that support both.
-
-|Name|Description|
-|----|-----------|
-|`OUT_AUTO`|auto mode|
-|`OUT_USB`|usb only|
-|`OUT_BT`|bluetooth (when `BLUETOOTH_ENABLE`)|
-
-## Modifiers
-
-These are special keycodes that simulate pressing several modifiers at once.
-
-|Name|Description|
-|----|-----------|
-|`KC_HYPR`|Hold down LCTL + LSFT + LALT + LGUI|
-|`KC_MEH`|Hold down LCTL + LSFT + LALT|
-
-/* FIXME: Should we have these in QMK too?
- * |`KC_LCAG`|`LCTL` + `LALT` + `LGUI`|
- * |`KC_ALTG`|`RCTL` + `RALT`|
- * |`KC_SCMD`/`KC_SWIN`|`LGUI` + `LSFT`|
- * |`KC_LCA`|`LCTL` + `LALT`|
- */
-
-### Modifiers with keys
-
-|Name|Description|
-|----|-----------|
-|`LCTL(kc)`|`LCTL` + `kc`|
-|`LSFT(kc)`/`S(kc)`|`LSFT` + `kc`|
-|`LALT(kc)`|`LALT` + `kc`|
-|`LGUI(kc)`|`LGUI` + `kc`|
-|`RCTL(kc)`|`RCTL` + `kc`|
-|`RSFT(kc)`|`RSFT` + `kc`|
-|`RALT(kc)`|`RALT` + `kc`|
-|`RGUI(kc)`|`RGUI` + `kc`|
-|`HYPR(kc)`|`LCTL` + `LSFT` + `LALT` + `LGUI` + `kc`|
-|`MEH(kc)`|`LCTL` + `LSFT` + `LALT` + `kc`|
-|`LCAG(kc)`|`LCTL` + `LALT` + `LGUI` + `kc`|
-|`ALTG(kc)`|`RCTL` + `RALT` + `kc`|
-|`SCMD(kc)`/`SWIN(kc)`|`LGUI` + `LSFT` + `kc`|
-|`LCA(kc)`|`LCTL` + `LALT` + `kc`|
-
-### One Shot Keys
-
-Most modifiers work by being held down while you push another key. You can use `OSM()` to setup a "One Shot" modifier. When you tap a one shot mod it will remain is a pressed state until you press another key.
-
-To specify a your modifier you need to pass the `MOD` form of the key. For example, if you want to setup a One Shot Control you would use `OSM(MOD_LCTL)`.
-
-|Name|Description|
-|----|-----------|
-|`OSM(mod)`|use mod for one keypress|
-|`OSL(layer)`|switch to layer for one keypress|
-
-### Mod-tap keys
-
-These keycodes will press the mod(s) when held, and the key when tapped. They only work with [basic keycodes](basic_keycodes.md).
-
-|Name|Description|
-|----|-----------|
-|`CTL_T(kc)`/`LCTL_T(kc)`|`LCTL` when held, `kc` when tapped|
-|`RCTL_T(kc)`|`RCTL` when held, `kc` when tapped|
-|`SFT_T(kc)`/`LSFT_T(kc)`|`LSFT` when held, `kc` when tapped|
-|`RSFT_T(kc)`|`RSFT` when held, `kc` when tapped|
-|`ALT_T(kc)`/`LALT_T(kc)`|`LALT` when held, `kc` when tapped|
-|`RALT_T(kc)`/`ALGR_T(kc)`|`RALT` when held, `kc` when tapped|
-|`GUI_T(kc)`/`LGUI_T(kc)`|`LGUI` when held, `kc` when tapped|
-|`RGUI_T(kc)`|`RGUI` when held, `kc` when tapped|
-|`C_S_T(kc)`|`LCTL` + `LSFT` when held, `kc` when tapped|
-|`MEH_T(kc)`|`LCTL` + `LSFT` + `LALT` when held, `kc` when tapped|
-|`LCAG_T(kc)`|`LCTL` + `LALT` + `LGUI` when held, `kc` when tapped|
-|`RCAG_T(kc)`|`RCTL` + `RALT` + `RGUI` when held, `kc` when tapped|
-|`ALL_T(kc)`|`LCTL` + `LSFT` + `LALT` + `LGUI` when held, `kc` when tapped [more info](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)|
-|`SCMD_T(kc)`/`SWIN_T(kc)`|`LGUI` + `LSFT` when held, `kc` when tapped|
-|`LCA_T(kc)`|`LCTL` + `LALT` when held, `kc` when tapped|
-
-## US ANSI Shifted symbols
-
-These 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.
-
-It's important to remember that all of these keycodes send a left shift - this may cause unintended actions if unaccounted for. The short code is preferred in most situations.
-
-|Short Name|Long Name|Description|
-|----------|---------|-----------|
-|`KC_TILD`|`KC_TILDE`|tilde `~`|
-|`KC_EXLM`|`KC_EXCLAIM`|exclamation mark `!`|
-|`KC_AT`||at sign `@`|
-|`KC_HASH`||hash sign `#`|
-|`KC_DLR`|`KC_DOLLAR`|dollar sign `$`|
-|`KC_PERC`|`KC_PERCENT`|percent sign `%`|
-|`KC_CIRC`|`KC_CIRCUMFLEX`|circumflex `^`|
-|`KC_AMPR`|`KC_AMPERSAND`|ampersand `&`|
-|`KC_ASTR`|`KC_ASTERISK`|asterisk `*`|
-|`KC_LPRN`|`KC_LEFT_PAREN`|left parenthesis `(`|
-|`KC_RPRN`|`KC_RIGHT_PAREN`|right parenthesis `)`|
-|`KC_UNDS`|`KC_UNDERSCORE`|underscore `_`|
-|`KC_PLUS`||plus sign `+`|
-|`KC_LCBR`|`KC_LEFT_CURLY_BRACE`|left curly brace `{`|
-|`KC_RCBR`|`KC_RIGHT_CURLY_BRACE`|right curly brace `}`|
-|`KC_LT`/`KC_LABK`|`KC_LEFT_ANGLE_BRACKET`|left angle bracket `<`|
-|`KC_GT`/`KC_RABK`|`KC_RIGHT_ANGLE_BRACKET`|right angle bracket `>`|
-|`KC_COLN`|`KC_COLON`|colon `:`|
-|`KC_PIPE`||pipe `\|`|
-|`KC_QUES`|`KC_QUESTION`|question mark `?`|
-|`KC_DQT`/`KC_DQUO`|`KC_DOUBLE_QUOTE`|double quote `"`|
-
-## Layer Changes
-
-These are keycodes that can be used to change the current layer.
-
-|Name|Description|
-|----|-----------|
-|`LT(layer, kc)`|turn on layer (0-15) when held, kc ([basic keycodes](basic_keycodes.md)) when tapped|
-|`TO(layer)`|turn on layer when depressed|
-|`MO(layer)`|momentarily turn on layer when depressed (requires `KC_TRNS` on destination layer)|
-|`DF(layer)`|sets the base (default) layer|
-|`TG(layer)`|toggle layer on/off|
-|`TT(layer)`|tap toggle? idk FIXME|
-|`OSL(layer)`|switch to layer for one keycode|
-
-## Unicode
-
-These keycodes can be used in conjuction with the [Unicode](unicode_and_additional_language_support.md) support.
-
-|`UNICODE(n)`/`UC(n)`|if `UNICODE_ENABLE`, this will send characters up to `0x7FFF`|
-|`X(n)`|if `UNICODEMAP_ENABLE`, also sends unicode via a different method|
-
-# `SAFE_RANGE`, or safely defining custom keycodes
-
-Sometimes you want to define your own custom keycodes to make your keymap easier to read. QMK provides `SAFE_RANGE` to help you do that. `SAFE_RANGE` is the first available keycode in the `0x0000`-`0xFFFF` range and you can use it when creating your own custom keycode enum:
-
-```
-enum my_keycodes {
- FOO = SAFE_RANGE,
- BAR
-};
-```
-
-You can then use `process_record_user()` to do something with your keycode:
-
-```
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case FOO:
- // Do something here
- break;
- case BAR:
- // Do something here
- break;
- }
-}
-```
diff --git a/docs/redirects.json b/docs/redirects.json
new file mode 100644
index 000000000..11f217a7c
--- /dev/null
+++ b/docs/redirects.json
@@ -0,0 +1,12 @@
+{
+ "redirects": [
+ {
+ "from": "build_environment_setup.html",
+ "to": "getting_started_build_tools.html"
+ },
+ {
+ "from": "make_instructions.html",
+ "to": "getting_started_make_guide.html"
+ }
+ ]
+} \ No newline at end of file
diff --git a/docs/stenography.md b/docs/stenography.md
index fcac51201..5b457a2a6 100644
--- a/docs/stenography.md
+++ b/docs/stenography.md
@@ -12,11 +12,11 @@ To use Plover with QMK just enable NKRO and optionally adjust your layout if you
## Plover with Steno Protocol
-Plover also understands the language of several steno machines. QMK can speak a couple of these languages, TX Bolt and GeminiRP. An example layout can be found in `planck/keymaps/steno`.
+Plover also understands the language of several steno machines. QMK can speak a couple of these languages, TX Bolt and GeminiPR. An example layout can be found in `planck/keymaps/steno`.
When QMK speaks to Plover over a steno protocol Plover will not use the keyboard as input. This means that you can switch back and forth between a standard keyboard and your steno keyboard, or even switch layers from Plover to standard and back without needing to activate/deactive Plover.
-In this mode Plover expects to speak with a steno machine over a serial port so QMK will present itself to the operating system as a virtual serial port in addition to a keyboard. By default QMK will speak the TX Bolt protocol but can be switched to GeminiRP; the last protocol used is stored in non-volatile memory so QMK will use the same protocol on restart.
+In this mode Plover expects to speak with a steno machine over a serial port so QMK will present itself to the operating system as a virtual serial port in addition to a keyboard. By default QMK will speak the TX Bolt protocol but can be switched to GeminiPR; the last protocol used is stored in non-volatile memory so QMK will use the same protocol on restart.
> Note: Due to hardware limitations you may not be able to run both a virtual serial port and mouse emulation at the same time.
@@ -24,13 +24,13 @@ In this mode Plover expects to speak with a steno machine over a serial port so
TX Bolt communicates the status of 24 keys over a very simple protocol in variable-sized (1-5 byte) packets.
-### GeminiRP
+### GeminiPR
-GeminiRP encodes 42 keys into a 6-byte packet. While TX Bolt contains everything that is necessary for standard stenography, GeminiRP opens up many more options, including supporting non-English theories.
+GeminiPR encodes 42 keys into a 6-byte packet. While TX Bolt contains everything that is necessary for standard stenography, GeminiPR opens up many more options, including supporting non-English theories.
## Configuring QMK for Steno
-Firstly, enable steno in your keymap's Makefile. You should also diable mousekeys to prevent conflicts.
+Firstly, enable steno in your keymap's Makefile. You may also need disable mousekeys, extra keys, or another USB endpoint to prevent conflicts. The builtin USB stack for some processors only supports a certain number of USB endpoints and the virtual serial port needed for steno fills 3 of them.
```Makefile
STENO_ENABLE = yes
@@ -60,9 +60,9 @@ On the display tab click 'Open stroke display'. With Plover disabled you should
As defined in `keymap_steno.h`.
-> Note: TX Bolt does not support the full set of keys. The TX Bolt implementation in QMK will map the GeminiRP keys to the nearest TX Bolt key so that one key map will work for both.
+> Note: TX Bolt does not support the full set of keys. The TX Bolt implementation in QMK will map the GeminiPR keys to the nearest TX Bolt key so that one key map will work for both.
-|GeminiRP|TX Bolt|Steno Key|
+|GeminiPR|TX Bolt|Steno Key|
|--------|-------|-----------|
|`STN_N1`|`STN_NUM`|Number bar #1|
|`STN_N2`|`STN_NUM`|Number bar #2|
@@ -102,7 +102,7 @@ As defined in `keymap_steno.h`.
|`STN_SR`|`STN_SR`| `-S`|
|`STN_DR`|`STN_DR`| `-D`|
|`STN_ZR`|`STN_ZR`| `-Z`|
-|`STN_FN`|| (GeminiRP only)|
-|`STN_RES1`||(GeminiRP only)|
-|`STN_RES2`||(GeminiRP only)|
-|`STN_PWR`||(GeminiRP only)|
+|`STN_FN`|| (GeminiPR only)|
+|`STN_RES1`||(GeminiPR only)|
+|`STN_RES2`||(GeminiPR only)|
+|`STN_PWR`||(GeminiPR only)|
diff --git a/docs/understanding_qmk.md b/docs/understanding_qmk.md
index 28927f0ef..2ac4f3036 100644
--- a/docs/understanding_qmk.md
+++ b/docs/understanding_qmk.md
@@ -3,7 +3,7 @@
This document attempts to explain how the QMK firmware works from a very high level. It assumes you understand basic programming concepts but does not (except where needed to demonstrate) assume familiarity with C. It assumes that you have a basic understanding of the following documents:
* [QMK Overview](qmk_overview.md)
-* [How Keyboards Work](basic_how_keyboards_work.md)
+* [How Keyboards Work](how_keyboards_work.md)
* [FAQ](faq.md)
## Startup