aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorskullY <skullydazed@gmail.com>2017-08-06 20:57:57 -0700
committerJack Humbert <jack.humb@gmail.com>2017-08-16 15:47:20 -0400
commit9d1a08e38ac9937cff4e61abfd0acc26ad5fdf4a (patch)
tree352da3e60b219405be323306bcd67a6729107d61 /docs
parent9b879b1267cd5cbebf4d73595c7ca4ed52fe5ef4 (diff)
downloadqmk_firmware-9d1a08e38ac9937cff4e61abfd0acc26ad5fdf4a.tar.gz
qmk_firmware-9d1a08e38ac9937cff4e61abfd0acc26ad5fdf4a.zip
Doc updates from going through every file
Diffstat (limited to 'docs')
-rw-r--r--docs/README.md2
-rw-r--r--docs/_summary.md8
-rw-r--r--docs/adding_features_to_qmk.md4
-rw-r--r--docs/documentation_best_practices.md20
-rw-r--r--docs/faq_build.md21
-rw-r--r--docs/faq_debug.md39
-rw-r--r--docs/faq_general.md4
-rw-r--r--docs/faq_keymap.md4
-rw-r--r--docs/feature_audio.md86
-rw-r--r--docs/feature_bluetooth.md6
-rw-r--r--docs/feature_common_shortcuts.md2
-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.md31
-rw-r--r--docs/features.md2
-rw-r--r--docs/getting_started_build_tools.md2
-rw-r--r--docs/getting_started_make_guide.md6
-rw-r--r--docs/hand_wire.md6
-rw-r--r--docs/how_keyboards_work.md (renamed from docs/basic_how_keyboards_work.md)0
-rw-r--r--docs/keycodes.md42
-rw-r--r--docs/keycodes_basic.md (renamed from docs/basic_keycodes.md)0
-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/quantum_keycodes.md4
-rw-r--r--docs/understanding_qmk.md2
27 files changed, 458 insertions, 487 deletions
diff --git a/docs/README.md b/docs/README.md
index 06597a2b6..09317d652 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -22,4 +22,4 @@ This would build the `rev4` revision of the `planck` with the `default` keymap.
22 22
23## How to customize {#how-to-customize} 23## How to customize {#how-to-customize}
24 24
25QMK 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). 25QMK has lots of [features](features.md) to explore, and a good deal of [reference documentation](http://docs.qmk.fm) to dig through. Most features are taken advantage of by modifying your [keymap](keymap.md), and changing the [keycodes](keycodes.md).
diff --git a/docs/_summary.md b/docs/_summary.md
index 071ce5631..c73b8a0ed 100644
--- a/docs/_summary.md
+++ b/docs/_summary.md
@@ -17,9 +17,10 @@
17 * [Bootmagic](feature_bootmagic.md) 17 * [Bootmagic](feature_bootmagic.md)
18 * [Dynamic Macros](dynamic_macros.md) 18 * [Dynamic Macros](dynamic_macros.md)
19 * [Key Lock](key_lock.md) 19 * [Key Lock](key_lock.md)
20 * [Leader Key](leader_key.md) 20 * [Leader Key](feature_leader_key.md)
21 * [Macros](macros.md) 21 * [Macros](macros.md)
22 * [Mouse keys](mouse_keys.md) 22 * [Mouse keys](mouse_keys.md)
23 * [PS2 Mouse](feature_ps2_mouse.md)
23 * [Space Cadet](space_cadet_shift.md) 24 * [Space Cadet](space_cadet_shift.md)
24 * [Tap Dance](tap_dance.md) 25 * [Tap Dance](tap_dance.md)
25 * [Thermal Printer](feature_thermal_printer.md) 26 * [Thermal Printer](feature_thermal_printer.md)
@@ -30,7 +31,7 @@
30 * [Glossary](glossary.md) 31 * [Glossary](glossary.md)
31 * [Keymap overview](keymap.md) 32 * [Keymap overview](keymap.md)
32 * [Keycodes](keycodes.md) 33 * [Keycodes](keycodes.md)
33 * [Basic](basic_keycodes.md) 34 * [Basic](keycodes_basic.md)
34 * [Quantum](quantum_keycodes.md) 35 * [Quantum](quantum_keycodes.md)
35 * [Backlight](feature_backlight.md#backlight-keycodes) 36 * [Backlight](feature_backlight.md#backlight-keycodes)
36 * [Bluetooth](feature_bluetooth.md#bluetooth-keycodes) 37 * [Bluetooth](feature_bluetooth.md#bluetooth-keycodes)
@@ -40,6 +41,7 @@
40 * [Mod Tap](feature_common_shortcuts.md#mod-tap) 41 * [Mod Tap](feature_common_shortcuts.md#mod-tap)
41 * [One Shot Keys](feature_common_shortcuts.md#one-shot-keys) 42 * [One Shot Keys](feature_common_shortcuts.md#one-shot-keys)
42 * [Shifted Keys](feature_common_shortcuts.md#shifted-keycodes) 43 * [Shifted Keys](feature_common_shortcuts.md#shifted-keycodes)
44 * [Stenography](stenography.md#keycode-reference)
43 * [RGB Light](feature_rgblight.md#rgblight-keycodes) 45 * [RGB Light](feature_rgblight.md#rgblight-keycodes)
44 * [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes) 46 * [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes)
45 * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) 47 * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
@@ -57,7 +59,7 @@
57 * [Porting your keyboard to QMK](porting_your_keyboard_to_qmk.md) 59 * [Porting your keyboard to QMK](porting_your_keyboard_to_qmk.md)
58 60
59* For a Deeper Understanding 61* For a Deeper Understanding
60 * [How Keyboards Work](basic_how_keyboards_work.md) 62 * [How Keyboards Work](how_keyboards_work.md)
61 * [Understanding QMK](understanding_qmk.md) 63 * [Understanding QMK](understanding_qmk.md)
62 64
63* Other Topics 65* Other Topics
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
11 11
12* **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. 12* **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.
13* **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. 13* **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.
14* **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. 14* **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.
15* **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. 15* **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.
16* **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). 16* **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?
75What about an error message? 75What about an error message?
76**[error [ERROR] This is not the error you are looking for] 76**[error [ERROR] This is not the error you are looking for]
77``` 77```
78
79# Documenting Features
80
81If 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:
82
83```markdown
84# My Cool Feature
85
86This page describes my cool feature. You can use my cool feature to make coffee and order cream and sugar to be delivered via drone.
87
88## My Cool Feature Keycodes
89
90|Long Name|Short Name|Description|
91|---------|----------|-----------|
92|KC_COFFEE||Make Coffee|
93|KC_CREAM||Order Cream|
94|KC_SUGAR||Order Sugar|
95```
96
97Place 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_build.md b/docs/faq_build.md
index ebe8caccd..353e80594 100644
--- a/docs/faq_build.md
+++ b/docs/faq_build.md
@@ -1,17 +1,9 @@
1# Frequently Asked Build Questions 1# Frequently Asked Build Questions
2 2
3This 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). 3This page covers questions about building QMK. If you have not yet you should read the [Build Environment Setup](build_environment_setup.md) and [Make Instructions](make_instructions.md) guides.
4
5In short,
6
7 $ make [-f Makefile.<variant>] [KEYMAP=...] clean
8 $ make [-f Makefile.<variant>] [KEYMAP=...]
9 $ make [-f Makefile.<variant>] [KEYMAP=...] dfu
10
11 4
12## Can't program on Linux 5## Can't program on Linux
13You will need proper permission to operate a device. For Linux users see udev rules below. 6You will need proper permission to operate a device. For Linux users see udev rules below. Easy way is to use `sudo` command, if you are not familiar with this command check its manual with `man sudo` or this page on line.
14Easy 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.
15 7
16In short when your controller is ATMega32u4, 8In short when your controller is ATMega32u4,
17 9
@@ -21,16 +13,16 @@ In short when your controller is ATMega32u4,
21 13
22or just 14or just
23 15
24 $ sudo make dfu 16 $ sudo make <keyboard>-<keymap>-dfu
25 17
26But to run `make` with root privilege is not good idea. Use former method as possible. 18But to run `make` with root privilege is not good idea. Use former method if possible.
27 19
28## WINAVR is obsolete 20## WINAVR is obsolete
29It is no longer recommended and may cause some problem. 21It is no longer recommended and may cause some problem.
30See [Issue #99](https://github.com/tmk/tmk_keyboard/issues/99). 22See [TMK Issue #99](https://github.com/tmk/tmk_keyboard/issues/99).
31 23
32## USB VID and PID 24## USB VID and PID
33You 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. 25You 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.
34 26
35Most boards in QMK use `0xFEED` as the vendor ID. You should look through other keyboards to make sure you pick a unique Product ID. 27Most boards in QMK use `0xFEED` as the vendor ID. You should look through other keyboards to make sure you pick a unique Product ID.
36 28
@@ -41,7 +33,6 @@ You can buy a really unique VID:PID here. I don't think you need this for person
41- http://www.obdev.at/products/vusb/license.html 33- http://www.obdev.at/products/vusb/license.html
42- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1 34- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1
43 35
44
45## Linux udev rules 36## Linux udev rules
46On Linux you need proper privilege to access device file of MCU, you'll have to use `sudo` when flashing firmware. You can circumvent this with placing these files in `/etc/udev/rules.d/`. 37On Linux you need proper privilege to access device file of MCU, you'll have to use `sudo` when flashing firmware. You can circumvent this with placing these files in `/etc/udev/rules.d/`.
47 38
diff --git a/docs/faq_debug.md b/docs/faq_debug.md
index 9e76ac409..3f7cfe747 100644
--- a/docs/faq_debug.md
+++ b/docs/faq_debug.md
@@ -48,6 +48,45 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
48*** 48***
49 49
50# Miscellaneous 50# Miscellaneous
51## Safety Considerations
52
53You probably don't want to "brick" your keyboard, making it impossible
54to rewrite firmware onto it. Here are some of the parameters to show
55what things are (and likely aren't) too risky.
56
57- If your keyboard map does not include RESET, then, to get into DFU
58 mode, you will need to press the reset button on the PCB, which
59 requires unscrewing the bottom.
60- Messing with tmk_core / common files might make the keyboard
61 inoperable
62- Too large a .hex file is trouble; `make dfu` will erase the block,
63 test the size (oops, wrong order!), which errors out, failing to
64 flash the keyboard, leaving it in DFU mode.
65 - To this end, note that the maximum .hex file size on Planck is
66 7000h (28672 decimal)
67
68```
69Linking: .build/planck_rev4_cbbrowne.elf [OK]
70Creating load file for Flash: .build/planck_rev4_cbbrowne.hex [OK]
71
72Size after:
73 text data bss dec hex filename
74 0 22396 0 22396 577c planck_rev4_cbbrowne.hex
75```
76
77 - The above file is of size 22396/577ch, which is less than
78 28672/7000h
79 - As long as you have a suitable alternative .hex file around, you
80 can retry, loading that one
81 - Some of the options you might specify in your keyboard's Makefile
82 consume extra memory; watch out for BOOTMAGIC_ENABLE,
83 MOUSEKEY_ENABLE, EXTRAKEY_ENABLE, CONSOLE_ENABLE, API_SYSEX_ENABLE
84- DFU tools do /not/ allow you to write into the bootloader (unless
85 you throw in extra fruitsalad of options), so there is little risk
86 there.
87- EEPROM has around a 100000 write cycle. You shouldn't rewrite the
88 firmware repeatedly and continually; that'll burn the EEPROM
89 eventually.
51## NKRO Doesn't work 90## NKRO Doesn't work
52First you have to compile frimware with this build option `NKRO_ENABLE` in **Makefile**. 91First you have to compile frimware with this build option `NKRO_ENABLE` in **Makefile**.
53 92
diff --git a/docs/faq_general.md b/docs/faq_general.md
index efa564743..fcc40e0a1 100644
--- a/docs/faq_general.md
+++ b/docs/faq_general.md
@@ -12,9 +12,9 @@
12 12
13TMK 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. 13TMK 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.
14 14
15From 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). 15From 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).
16 16
17From a project and community management standpoint TMK maintains all the officially supported keyboards by himself, with a bit of community support. Separate community maintained forks exist or can be created for other keyboards. Only a few keymaps are provided by default, so users typically don't share keymaps with each other. QMK encourages sharing of both keyboards and keymaps through a centrally managed repository, accepting all pull requests that follows the quality standards. These are mostly community maintained, but the QMK team also helps when necessary. 17From a project and community management standpoint TMK maintains all the officially supported keyboards by himself, with a bit of community support. Separate community maintained forks exist or can be created for other keyboards. Only a few keymaps are provided by default, so users typically don't share keymaps with each other. QMK encourages sharing of both keyboards and keymaps through a centrally managed repository, accepting all pull requests that follow the quality standards. These are mostly community maintained, but the QMK team also helps when necessary.
18 18
19Both approaches have their merits and their drawbacks, and code flows freely between TMK and QMK when it makes sense. 19Both approaches have their merits and their drawbacks, and code flows freely between TMK and QMK when it makes sense.
20 20
diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md
index 9f54f2213..eb49a3699 100644
--- a/docs/faq_keymap.md
+++ b/docs/faq_keymap.md
@@ -1,9 +1,9 @@
1# Keymap FAQ 1# Keymap FAQ
2 2
3This page covers questions people often have about keymaps. If you haven't you should read [Keymap Overview](keymap.html) first. 3This page covers questions people often have about keymaps. If you haven't you should read [Keymap Overview](keymap.md) first.
4 4
5## What Keycodes Can I Use? 5## What Keycodes Can I Use?
6See [Basic Keycodes](keycodes.html) and [Quantum Keycodes](quantum_keycodes.html) for most of the keys you can define. 6See [Keycodes](keycodes.md) for an index of keycodes available to you. These link to more extensive documentation when available.
7 7
8Keycodes are actually defined in [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h). 8Keycodes are actually defined in [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h).
9 9
diff --git a/docs/feature_audio.md b/docs/feature_audio.md
index 6b476880d..c142ff69c 100644
--- a/docs/feature_audio.md
+++ b/docs/feature_audio.md
@@ -1,5 +1,91 @@
1# Audio 1# Audio
2 2
3Your 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.
4
5If you add `AUDIO_ENABLE = yes` to your `rules.mk`, there's a couple different sounds that will automatically be enabled without any other configuration:
6
7```
8STARTUP_SONG // plays when the keyboard starts up (audio.c)
9GOODBYE_SONG // plays when you press the RESET key (quantum.c)
10AG_NORM_SONG // plays when you press AG_NORM (quantum.c)
11AG_SWAP_SONG // plays when you press AG_SWAP (quantum.c)
12MUSIC_ON_SONG // plays when music mode is activated (process_music.c)
13MUSIC_OFF_SONG // plays when music mode is deactivated (process_music.c)
14CHROMATIC_SONG // plays when the chromatic music mode is selected (process_music.c)
15GUITAR_SONG // plays when the guitar music mode is selected (process_music.c)
16VIOLIN_SONG // plays when the violin music mode is selected (process_music.c)
17MAJOR_SONG // plays when the major music mode is selected (process_music.c)
18```
19
20You can override the default songs by doing something like this in your `config.h`:
21
22```c
23#ifdef AUDIO_ENABLE
24 #define STARTUP_SONG SONG(STARTUP_SOUND)
25#endif
26```
27
28A 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).
29
30To play a custom sound at a particular time, you can define a song like this (near the top of the file):
31
32```c
33float my_song[][2] = SONG(QWERTY_SOUND);
34```
35
36And then play your song like this:
37
38```c
39PLAY_SONG(my_song);
40```
41
42Alternatively, you can play it in a loop like this:
43
44```c
45PLAY_LOOP(my_song);
46```
47
48It's advised that you wrap all audio features in `#ifdef AUDIO_ENABLE` / `#endif` to avoid causing problems when audio isn't built into the keyboard.
49
50## Music mode
51
52The music mode maps your columns to a chromatic scale, and your rows to octaves. This works best with ortholinear keyboards, but can be made to work with others. All keycodes less than `0xFF` get blocked, so you won't type while playing notes - if you have special keys/mods, those will still work. A work-around for this is to jump to a different layer with KC_NOs before (or after) enabling music mode.
53
54Recording is experimental due to some memory issues - if you experience some weird behavior, unplugging/replugging your keyboard will fix things.
55
56Keycodes available:
57
58* `MU_ON` - Turn music mode on
59* `MU_OFF` - Turn music mode off
60* `MU_TOG` - Toggle music mode
61* `MU_MOD` - Cycle through the music modes:
62 * `CHROMATIC_MODE` - Chromatic scale, row changes the octave
63 * `GUITAR_MODE` - Chromatic scale, but the row changes the string (+5 st)
64 * `VIOLIN_MODE` - Chromatic scale, but the row changes the string (+7 st)
65 * `MAJOR_MODE` - Major scale
66
67In music mode, the following keycodes work differently, and don't pass through:
68
69* `LCTL` - start a recording
70* `LALT` - stop recording/stop playing
71* `LGUI` - play recording
72* `KC_UP` - speed-up playback
73* `KC_DOWN` - slow-down playback
74
75By 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:
76
77 #define MUSIC_MASK keycode != KC_NO
78
79Which will capture all keycodes - be careful, this will get you stuck in music mode until you restart your keyboard!
80
81The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, add something like this to your `config.h`:
82
83 #define PITCH_STANDARD_A 432.0f
84
85## MIDI functionalty
86
87This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile.
88
3<!-- FIXME: this formatting needs work 89<!-- FIXME: this formatting needs work
4 90
5## Audio 91## Audio
diff --git a/docs/feature_bluetooth.md b/docs/feature_bluetooth.md
index d58627857..79a54208e 100644
--- a/docs/feature_bluetooth.md
+++ b/docs/feature_bluetooth.md
@@ -1,6 +1,10 @@
1# Bluetooth 1# Bluetooth
2 2
3<!-- FIXME: Document bluetooth support. --> 3## Bluetooth functionality
4
5This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts), but can be enabled via the Makefile. The firmware will still output characters via USB, so be aware of this when charging via a computer. It would make sense to have a switch on the Bluefruit to turn it off at will.
6
7<!-- FIXME: Document bluetooth support more completely. -->
4 8
5## Bluetooth Keycodes 9## Bluetooth Keycodes
6 10
diff --git a/docs/feature_common_shortcuts.md b/docs/feature_common_shortcuts.md
index e91142026..a3dde8b67 100644
--- a/docs/feature_common_shortcuts.md
+++ b/docs/feature_common_shortcuts.md
@@ -13,7 +13,7 @@ This will allow you to use `FN_CAPS` and `ALT_TAB` in your `KEYMAP()`, keeping i
13 13
14### Limits of these aliases 14### Limits of these aliases
15 15
16Currently, 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 [Keycodes](keycodes.html). 16Currently, the keycodes able to used with these functions are limited to the [Basic Keycodes](keycodes_basic.html), meaning you can't use keycodes like `KC_TILD`, or anything greater than 0xFF. For a full list of the keycodes able to be used see [Basic Keycodes](keycodes_basic.html).
17 17
18## Switching and toggling layers 18## Switching and toggling layers
19 19
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 @@
1## PS/2 Mouse Support
2
3Its possible to hook up a PS/2 mouse (for example touchpads or trackpoints) to your keyboard as a composite device.
4
5To 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.
6
7There are three available modes for hooking up PS/2 devices: USART (best), interrupts (better) or busywait (not recommended).
8
9### Busywait version
10
11Note: This is not recommended, you may encounter jerky movement or unsent inputs. Please use interrupt or USART version if possible.
12
13In rules.mk:
14
15```
16PS2_MOUSE_ENABLE = yes
17PS2_USE_BUSYWAIT = yes
18```
19
20In your keyboard config.h:
21
22```
23#ifdef PS2_USE_BUSYWAIT
24# define PS2_CLOCK_PORT PORTD
25# define PS2_CLOCK_PIN PIND
26# define PS2_CLOCK_DDR DDRD
27# define PS2_CLOCK_BIT 1
28# define PS2_DATA_PORT PORTD
29# define PS2_DATA_PIN PIND
30# define PS2_DATA_DDR DDRD
31# define PS2_DATA_BIT 2
32#endif
33```
34
35### Interrupt version
36
37The following example uses D2 for clock and D5 for data. You can use any INT or PCINT pin for clock, and any pin for data.
38
39In rules.mk:
40
41```
42PS2_MOUSE_ENABLE = yes
43PS2_USE_INT = yes
44```
45
46In your keyboard config.h:
47
48```
49#ifdef PS2_USE_INT
50#define PS2_CLOCK_PORT PORTD
51#define PS2_CLOCK_PIN PIND
52#define PS2_CLOCK_DDR DDRD
53#define PS2_CLOCK_BIT 2
54#define PS2_DATA_PORT PORTD
55#define PS2_DATA_PIN PIND
56#define PS2_DATA_DDR DDRD
57#define PS2_DATA_BIT 5
58
59#define PS2_INT_INIT() do { \
60 EICRA |= ((1<<ISC21) | \
61 (0<<ISC20)); \
62} while (0)
63#define PS2_INT_ON() do { \
64 EIMSK |= (1<<INT2); \
65} while (0)
66#define PS2_INT_OFF() do { \
67 EIMSK &= ~(1<<INT2); \
68} while (0)
69#define PS2_INT_VECT INT2_vect
70#endif
71```
72
73### USART version
74
75To use USART on the ATMega32u4, you have to use PD5 for clock and PD2 for data. If one of those are unavailable, you need to use interrupt version.
76
77In rules.mk:
78
79```
80PS2_MOUSE_ENABLE = yes
81PS2_USE_USART = yes
82```
83
84In your keyboard config.h:
85
86```
87#ifdef PS2_USE_USART
88#define PS2_CLOCK_PORT PORTD
89#define PS2_CLOCK_PIN PIND
90#define PS2_CLOCK_DDR DDRD
91#define PS2_CLOCK_BIT 5
92#define PS2_DATA_PORT PORTD
93#define PS2_DATA_PIN PIND
94#define PS2_DATA_DDR DDRD
95#define PS2_DATA_BIT 2
96
97/* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
98/* set DDR of CLOCK as input to be slave */
99#define PS2_USART_INIT() do { \
100 PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT); \
101 PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT); \
102 UCSR1C = ((1 << UMSEL10) | \
103 (3 << UPM10) | \
104 (0 << USBS1) | \
105 (3 << UCSZ10) | \
106 (0 << UCPOL1)); \
107 UCSR1A = 0; \
108 UBRR1H = 0; \
109 UBRR1L = 0; \
110} while (0)
111#define PS2_USART_RX_INT_ON() do { \
112 UCSR1B = ((1 << RXCIE1) | \
113 (1 << RXEN1)); \
114} while (0)
115#define PS2_USART_RX_POLL_ON() do { \
116 UCSR1B = (1 << RXEN1); \
117} while (0)
118#define PS2_USART_OFF() do { \
119 UCSR1C = 0; \
120 UCSR1B &= ~((1 << RXEN1) | \
121 (1 << TXEN1)); \
122} while (0)
123#define PS2_USART_RX_READY (UCSR1A & (1<<RXC1))
124#define PS2_USART_RX_DATA UDR1
125#define PS2_USART_ERROR (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1)))
126#define PS2_USART_RX_VECT USART1_RX_vect
127#endif
128```
129
130### Additional Settings
131
132#### PS/2 mouse features
133
134These enable settings supported by the PS/2 mouse protocol: http://www.computer-engineering.org/ps2mouse/
135
136```
137/* Use remote mode instead of the default stream mode (see link) */
138#define PS2_MOUSE_USE_REMOTE_MODE
139
140/* Enable the scrollwheel or scroll gesture on your mouse or touchpad */
141#define PS2_MOUSE_ENABLE_SCROLLING
142
143/* Some mice will need a scroll mask to be configured. The default is 0xFF. */
144#define PS2_MOUSE_SCROLL_MASK 0x0F
145
146/* Applies a transformation to the movement before sending to the host (see link) */
147#define PS2_MOUSE_USE_2_1_SCALING
148
149/* The time to wait after initializing the ps2 host */
150#define PS2_MOUSE_INIT_DELAY 1000 /* Default */
151```
152
153You can also call the following functions from ps2_mouse.h
154
155```
156void ps2_mouse_disable_data_reporting(void);
157
158void ps2_mouse_enable_data_reporting(void);
159
160void ps2_mouse_set_remote_mode(void);
161
162void ps2_mouse_set_stream_mode(void);
163
164void ps2_mouse_set_scaling_2_1(void);
165
166void ps2_mouse_set_scaling_1_1(void);
167
168void ps2_mouse_set_resolution(ps2_mouse_resolution_t resolution);
169
170void ps2_mouse_set_sample_rate(ps2_mouse_sample_rate_t sample_rate);
171```
172
173#### Fine control
174
175Use the following defines to change the sensitivity and speed of the mouse.
176Note: you can also use `ps2_mouse_set_resolution` for the same effect (not supported on most touchpads).
177
178```
179#define PS2_MOUSE_X_MULTIPLIER 3
180#define PS2_MOUSE_Y_MULTIPLIER 3
181#define PS2_MOUSE_V_MULTIPLIER 1
182```
183
184#### Scroll button
185
186If you're using a trackpoint, you will likely want to be able to use it for scrolling.
187Its possible to enable a "scroll button/s" that when pressed will cause the mouse to scroll instead of moving.
188To enable the feature, you must set a scroll button mask as follows:
189
190```
191#define PS2_MOUSE_SCROLL_BTN_MASK (1<<PS2_MOUSE_BUTTON_MIDDLE) /* Default */
192```
193
194To disable the scroll button feature:
195
196```
197#define PS2_MOUSE_SCROLL_BTN_MASK 0
198```
199
200The available buttons are:
201
202```
203#define PS2_MOUSE_BTN_LEFT 0
204#define PS2_MOUSE_BTN_RIGHT 1
205#define PS2_MOUSE_BTN_MIDDLE 2
206```
207
208You can also combine buttons in the mask by `|`ing them together.
209
210Once you've configured your scroll button mask, you must configure the scroll button send interval.
211This is the interval before which if the scroll buttons were released they would be sent to the host.
212After this interval, they will cause the mouse to scroll and will not be sent.
213
214```
215#define PS2_MOUSE_SCROLL_BTN_SEND 300 /* Default */
216```
217
218To disable sending the scroll buttons:
219```
220#define PS2_MOUSE_SCROLL_BTN_SEND 0
221```
222
223Fine control over the scrolling is supported with the following defines:
224
225```
226#define PS2_MOUSE_SCROLL_DIVISOR_H 2
227#define PS2_MOUSE_SCROLL_DIVISOR_V 2
228```
229
230#### Debug settings
231
232To debug the mouse, add `debug_mouse = true` or enable via bootmagic.
233
234```
235/* To debug the mouse reports */
236#define PS2_MOUSE_DEBUG_HID
237#define PS2_MOUSE_DEBUG_RAW
238```
diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md
index 8bbe06b97..7f12155cb 100644
--- a/docs/feature_rgblight.md
+++ b/docs/feature_rgblight.md
@@ -2,6 +2,37 @@
2 2
3<!-- FIXME: Describe how to use RGB Lighting here. --> 3<!-- FIXME: Describe how to use RGB Lighting here. -->
4 4
5## RGB Under Glow Mod
6
7![Planck with RGB Underglow](https://raw.githubusercontent.com/qmk/qmk_firmware/master/keyboards/planck/keymaps/yang/planck-with-rgb-underglow.jpg)
8
9Here is a quick demo on Youtube (with NPKC KC60) (https://www.youtube.com/watch?v=VKrpPAHlisY).
10
11For 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.
12
13 RGBLIGHT_ENABLE = yes
14
15In order to use the underglow animation functions, you need to have `#define RGBLIGHT_ANIMATIONS` in your `config.h`.
16
17Please 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:
18
19 #define RGB_DI_PIN F4 // The pin your RGB strip is wired to
20 #define RGBLIGHT_ANIMATIONS // Require for fancier stuff (not compatible with audio)
21 #define RGBLED_NUM 14 // Number of LEDs
22 #define RGBLIGHT_HUE_STEP 10
23 #define RGBLIGHT_SAT_STEP 17
24 #define RGBLIGHT_VAL_STEP 17
25
26You'll need to edit `RGB_DI_PIN` to the pin you have your `DI` on your RGB strip wired to.
27
28The 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`
29
30### WS2812 Wiring
31
32![WS2812 Wiring](https://raw.githubusercontent.com/qmk/qmk_firmware/master/keyboards/planck/keymaps/yang/WS2812-wiring.jpg)
33
34Please 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.
35
5## RGB Lighting Keycodes 36## RGB Lighting Keycodes
6 37
7This controls the RGB Lighting functionality. Most keyboards use WS2812 (and compatible) LEDs for underlight or case lighting. 38This controls the RGB Lighting functionality. Most keyboards use WS2812 (and compatible) LEDs for underlight or case lighting.
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/)
7 7
8## The Leader key: A new kind of modifier 8## The Leader key: A new kind of modifier
9 9
10Most modifiers have to be held or toggled. But what if you had a key that indicated the start of a sequence? You could press that key and then rapidly press 1-3 more keys to trigger a macro, or enter a special layer, or anything else you might want to do. To learn more about it check out the [Leader Key](leader_key.md) page. 10Most modifiers have to be held or toggled. But what if you had a key that indicated the start of a sequence? You could press that key and then rapidly press 1-3 more keys to trigger a macro, or enter a special layer, or anything else you might want to do. To learn more about it check out the [Leader Key](feature_leader_key.md) page.
11 11
12## Tap Dance: A single key can do 3, 5, or 100 different things 12## Tap Dance: A single key can do 3, 5, or 100 different things
13 13
diff --git a/docs/getting_started_build_tools.md b/docs/getting_started_build_tools.md
index 49ffdaf69..e46b7f2e5 100644
--- a/docs/getting_started_build_tools.md
+++ b/docs/getting_started_build_tools.md
@@ -86,7 +86,7 @@ The Toolchain setup is done through the Windows Subsystem for Linux, and the pro
86* 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 86* 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
87* 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. 87* 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.
88 88
89## Windows (Vista and later) 89## Windows (Vista and later) (Deprecated)
90 90
91These are the old instructions for Windows Vista and later. We recommend you use [MSYS2 as outlined above](#windows-with-msys2-recommended). 91These are the old instructions for Windows Vista and later. We recommend you use [MSYS2 as outlined above](#windows-with-msys2-recommended).
92 92
diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md
index 299c5785b..fac801082 100644
--- a/docs/getting_started_make_guide.md
+++ b/docs/getting_started_make_guide.md
@@ -21,7 +21,7 @@ As mentioned above, there are some shortcuts, when you are in a:
21* `keyboard` folder, the command will automatically fill the `<keyboard>` part. So you only need to type `<subproject>-<keymap>-<target>` 21* `keyboard` folder, the command will automatically fill the `<keyboard>` part. So you only need to type `<subproject>-<keymap>-<target>`
22* `subproject` folder, it will fill in both `<keyboard>` and `<subproject>` 22* `subproject` folder, it will fill in both `<keyboard>` and `<subproject>`
23* `keymap` folder, then `<keyboard>` and `<keymap>` will be filled in. If you need to specify the `<subproject>` use the following syntax `<subproject>-<target>` 23* `keymap` folder, then `<keyboard>` and `<keymap>` will be filled in. If you need to specify the `<subproject>` use the following syntax `<subproject>-<target>`
24 * 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)) 24 * Note in order to support this shortcut, the keymap needs its own Makefile
25* `keymap` folder of a `subproject`, then everything except the `<target>` will be filled in 25* `keymap` folder of a `subproject`, then everything except the `<target>` will be filled in
26 26
27The `<target>` means the following 27The `<target>` means the following
@@ -142,7 +142,7 @@ This allows you to interface with a Bluefruit EZ-key to send keycodes wirelessly
142 142
143`AUDIO_ENABLE` 143`AUDIO_ENABLE`
144 144
145This allows you output audio on the C6 pin (needs abstracting). See the [audio section](#audio-output-from-a-speaker) for more information. 145This allows you output audio on the C6 pin (needs abstracting). See the [audio page](feature_audio.md) for more information.
146 146
147`FAUXCLICKY_ENABLE` 147`FAUXCLICKY_ENABLE`
148 148
@@ -150,7 +150,7 @@ Uses buzzer to emulate clicky switches. A cheap imitation of the Cherry blue swi
150 150
151`VARIABLE_TRACE` 151`VARIABLE_TRACE`
152 152
153Use this to debug changes to variable values, see the [tracing variables](#tracing-variables) section for more information. 153Use 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.
154 154
155`API_SYSEX_ENABLE` 155`API_SYSEX_ENABLE`
156 156
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] = {
298}; 298};
299``` 299```
300 300
301Note 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. 301Note 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.
302 302
303It's also important to use the `KEYMAP` function we defined earlier - this is what allows the firmware to associate our intended readable keymap with the actual wiring. 303It's also important to use the `KEYMAP` function we defined earlier - this is what allows the firmware to associate our intended readable keymap with the actual wiring.
304 304
305## Compiling your firmware 305## Compiling your firmware
306 306
307After you've written out your entire keymap, you're ready to get the firmware compiled and onto your Teensy. Before compiling, you'll need to get your [development environment set-up](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. 307After you've written out your entire keymap, you're ready to get the firmware compiled and onto your Teensy. Before compiling, you'll need to get your [development environment set-up](getting_started_build_tools.md) - you can skip the dfu-programmer instructions, but you'll need to download and install the [Teensy Loader](https://www.pjrc.com/teensy/loader.html) to get the firmware on your Teensy.
308 308
309Once 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. 309Once 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.
310 310
@@ -328,4 +328,4 @@ If you've done all of these things, keep in mind that sometimes you might have h
328 328
329Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out. 329Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out.
330 330
331There 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) 331There 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..3969c5680 100644
--- a/docs/basic_how_keyboards_work.md
+++ b/docs/how_keyboards_work.md
diff --git a/docs/keycodes.md b/docs/keycodes.md
index b9e1f42f7..c601ad4ce 100644
--- a/docs/keycodes.md
+++ b/docs/keycodes.md
@@ -66,8 +66,6 @@ When defining a [keymap](keymap.md) each key needs a valid key definition. This
66|`KC_X`|||| 66|`KC_X`||||
67|`KC_Y`|||| 67|`KC_Y`||||
68|`KC_Z`|||| 68|`KC_Z`||||
69|Long Name|Short Name|Description|
70|---------|----------|-----------|
71|`KC_ENTER`|`KC_ENT`|`Return (ENTER)`| 69|`KC_ENTER`|`KC_ENT`|`Return (ENTER)`|
72|`KC_ESCAPE`|`KC_ESC`|`ESCAPE`| 70|`KC_ESCAPE`|`KC_ESC`|`ESCAPE`|
73|`KC_BSPACE`|`KC_BSPC`|`DELETE (Backspace)`| 71|`KC_BSPACE`|`KC_BSPC`|`DELETE (Backspace)`|
@@ -90,8 +88,6 @@ When defining a [keymap](keymap.md) each key needs a valid key definition. This
90|`KC_DOT`||`.` and `>`| 88|`KC_DOT`||`.` and `>`|
91|`KC_SLASH`|`KC_SLSH`|`/` and `?`| 89|`KC_SLASH`|`KC_SLSH`|`/` and `?`|
92|`KC_CAPSLOCK`|`KC_CAPS`|Caps Lock| 90|`KC_CAPSLOCK`|`KC_CAPS`|Caps Lock|
93|Long Name|Short Name|Description|
94|---------|----------|-----------|
95|`KC_LCTRL`|`KC_LCTL`|LeftControl| 91|`KC_LCTRL`|`KC_LCTL`|LeftControl|
96|`KC_LSHIFT`|`KC_LSFT`|LeftShift| 92|`KC_LSHIFT`|`KC_LSFT`|LeftShift|
97|`KC_LALT`||LeftAlt| 93|`KC_LALT`||LeftAlt|
@@ -105,8 +101,6 @@ When defining a [keymap](keymap.md) each key needs a valid key definition. This
105|`KC_LOCKING_SCROLL`|`KC_LSCR`|Locking Scroll Lock| 101|`KC_LOCKING_SCROLL`|`KC_LSCR`|Locking Scroll Lock|
106|`KC_INT4`|`KC_HENK`|JIS Henken| 102|`KC_INT4`|`KC_HENK`|JIS Henken|
107|`KC_INT5`|`KC_MHEN`|JIS Muhenken| 103|`KC_INT5`|`KC_MHEN`|JIS Muhenken|
108|Long Name|Short Name|Description|
109|---------|----------|-----------|
110|`KC_PSCREEN`|`KC_PSCR`|PrintScreen| 104|`KC_PSCREEN`|`KC_PSCR`|PrintScreen|
111|`KC_SCROLLLOCK`|`KC_SLCK`|Scroll Lock| 105|`KC_SCROLLLOCK`|`KC_SLCK`|Scroll Lock|
112|`KC_PAUSE`|`KC_PAUS`|Pause| 106|`KC_PAUSE`|`KC_PAUS`|Pause|
@@ -157,8 +151,6 @@ When defining a [keymap](keymap.md) each key needs a valid key definition. This
157|`KC_WWW_STOP`|`KC_WSTP`|| 151|`KC_WWW_STOP`|`KC_WSTP`||
158|`KC_WWW_REFRESH`|`KC_WREF`|| 152|`KC_WWW_REFRESH`|`KC_WREF`||
159|`KC_WWW_FAVORITES`|`KC_WFAV`|| 153|`KC_WWW_FAVORITES`|`KC_WFAV`||
160|Long Name|Short Name|Description|
161|---------|----------|-----------|
162|`KC_STOP`||Stop| 154|`KC_STOP`||Stop|
163|`KC__MUTE`||Mute| 155|`KC__MUTE`||Mute|
164|`KC__VOLUP`||Volume Up| 156|`KC__VOLUP`||Volume Up|
@@ -173,8 +165,6 @@ When defining a [keymap](keymap.md) each key needs a valid key definition. This
173|`KC_MEDIA_STOP`|`KC_MSTP`|| 165|`KC_MEDIA_STOP`|`KC_MSTP`||
174|`KC_MEDIA_PLAY_PAUSE`|`KC_MPLY`|| 166|`KC_MEDIA_PLAY_PAUSE`|`KC_MPLY`||
175|`KC_MEDIA_SELECT`|`KC_MSEL`|| 167|`KC_MEDIA_SELECT`|`KC_MSEL`||
176|Long Name|Short Name|Description|
177|---------|----------|-----------|
178|`KC_NUMLOCK`|`KC_NLCK`|Keypad Num Lock and Clear| 168|`KC_NUMLOCK`|`KC_NLCK`|Keypad Num Lock and Clear|
179|`KC_KP_SLASH`|`KC_PSLS`|Keypad /| 169|`KC_KP_SLASH`|`KC_PSLS`|Keypad /|
180|`KC_KP_ASTERISK`|`KC_PAST`|Keypad *| 170|`KC_KP_ASTERISK`|`KC_PAST`|Keypad *|
@@ -195,12 +185,8 @@ When defining a [keymap](keymap.md) each key needs a valid key definition. This
195|`KC_KP_EQUAL`|`KC_PEQL`|Keypad =| 185|`KC_KP_EQUAL`|`KC_PEQL`|Keypad =|
196|`KC_KP_COMMA`|`KC_PCMM`|Keypad Comma| 186|`KC_KP_COMMA`|`KC_PCMM`|Keypad Comma|
197|`KC_KP_EQUAL_AS400`||Keypad Equal Sign| 187|`KC_KP_EQUAL_AS400`||Keypad Equal Sign|
198|Long Name|Short Name|Description|
199|---------|----------|-----------|
200|`KC_NO`||Ignore this key. (NOOP) | 188|`KC_NO`||Ignore this key. (NOOP) |
201|`KC_TRNS`||Make this key transparent to find the key on a lower layer.| 189|`KC_TRNS`||Make this key transparent to find the key on a lower layer.|
202|Long Name|Short Name|Description|
203|---------|----------|-----------|
204|[`KC_MS_UP`](mouse_keys.md)|`KC_MS_U`|Mouse Cursor Up| 190|[`KC_MS_UP`](mouse_keys.md)|`KC_MS_U`|Mouse Cursor Up|
205|[`KC_MS_DOWN`](mouse_keys.md)|`KC_MS_D`|Mouse Cursor Down| 191|[`KC_MS_DOWN`](mouse_keys.md)|`KC_MS_D`|Mouse Cursor Down|
206|[`KC_MS_LEFT`](mouse_keys.md)|`KC_MS_L`|Mouse Cursor Left| 192|[`KC_MS_LEFT`](mouse_keys.md)|`KC_MS_L`|Mouse Cursor Left|
@@ -217,19 +203,15 @@ When defining a [keymap](keymap.md) each key needs a valid key definition. This
217|[`KC_MS_ACCEL0`](mouse_keys.md)|`KC_ACL0`|Mouse Acceleration 0| 203|[`KC_MS_ACCEL0`](mouse_keys.md)|`KC_ACL0`|Mouse Acceleration 0|
218|[`KC_MS_ACCEL1`](mouse_keys.md)|`KC_ACL1`|Mouse Acceleration 1| 204|[`KC_MS_ACCEL1`](mouse_keys.md)|`KC_ACL1`|Mouse Acceleration 1|
219|[`KC_MS_ACCEL2`](mouse_keys.md)|`KC_ACL2`|Mouse Acceleration 2| 205|[`KC_MS_ACCEL2`](mouse_keys.md)|`KC_ACL2`|Mouse Acceleration 2|
220|Long Name|Short Name|Description|
221|---------|----------|-----------|
222|[`RESET`](quantum_keycodes.md#qmk-keycodes)||Put the keyboard into DFU mode for flashing| 206|[`RESET`](quantum_keycodes.md#qmk-keycodes)||Put the keyboard into DFU mode for flashing|
223|[`DEBUG`](quantum_keycodes.md#qmk-keycodes)||Toggles debug mode| 207|[`DEBUG`](quantum_keycodes.md#qmk-keycodes)||Toggles debug mode|
224|[`KC_GESC`](quantum_keycodes.md#qmk-keycodes)|`GRAVE_ESC`|Acts as escape when pressed normally but when pressed with Shift or GUI will send a `~`| 208|[`KC_GESC`](quantum_keycodes.md#qmk-keycodes)|`GRAVE_ESC`|Acts as escape when pressed normally but when pressed with Shift or GUI will send a `~`|
225|[`KC_LSPO`](quantum_keycodes.md#qmk-keycodes)||Left shift when held, open paranthesis when tapped| 209|[`KC_LSPO`](quantum_keycodes.md#qmk-keycodes)||Left shift when held, open paranthesis when tapped|
226|[`KC_RSPC`](quantum_keycodes.md#qmk-keycodes)||Right shift when held, close paranthesis when tapped| 210|[`KC_RSPC`](quantum_keycodes.md#qmk-keycodes)||Right shift when held, close paranthesis when tapped|
227|[`KC_LEAD`](quantum_keycodes.md#qmk-keycodes)||The [leader key](leader_key.md)| 211|[`KC_LEAD`](feature_leader_key.md)||The leader key|
228|[`FUNC(n)`](quantum_keycodes.md#qmk-keycodes)|`F(n)`|Call `fn_action(n)`| 212|[`FUNC(n)`](quantum_keycodes.md#qmk-keycodes)|`F(n)`|Call `fn_action(n)`|
229|[`M(n)`](quantum_keycodes.md#qmk-keycodes)||to call macro n| 213|[`M(n)`](quantum_keycodes.md#qmk-keycodes)||to call macro n|
230|[`MACROTAP(n)`](quantum_keycodes.md#qmk-keycodes)||to macro-tap n idk FIXME`| 214|[`MACROTAP(n)`](quantum_keycodes.md#qmk-keycodes)||to macro-tap n idk FIXME`|
231|Long Name|Short Name|Description|
232|---------|----------|-----------|
233|[`MAGIC_SWAP_CONTROL_CAPSLOCK`](feature_bootmagic.md)||Swap Capslock and Left Control| 215|[`MAGIC_SWAP_CONTROL_CAPSLOCK`](feature_bootmagic.md)||Swap Capslock and Left Control|
234|[`MAGIC_CAPSLOCK_TO_CONTROL`](feature_bootmagic.md)||Treat Capslock like a Control Key| 216|[`MAGIC_CAPSLOCK_TO_CONTROL`](feature_bootmagic.md)||Treat Capslock like a Control Key|
235|[`MAGIC_SWAP_LALT_LGUI`](feature_bootmagic.md)||Swap the left Alt and GUI keys| 217|[`MAGIC_SWAP_LALT_LGUI`](feature_bootmagic.md)||Swap the left Alt and GUI keys|
@@ -249,8 +231,6 @@ When defining a [keymap](keymap.md) each key needs a valid key definition. This
249|[`MAGIC_UNHOST_NKRO`](feature_bootmagic.md)||Force NKRO off| 231|[`MAGIC_UNHOST_NKRO`](feature_bootmagic.md)||Force NKRO off|
250|[`MAGIC_UNSWAP_ALT_GUI`/`AG_NORM`](feature_bootmagic.md)||Disable the Alt/GUI switching| 232|[`MAGIC_UNSWAP_ALT_GUI`/`AG_NORM`](feature_bootmagic.md)||Disable the Alt/GUI switching|
251|[`MAGIC_TOGGLE_NKRO`](feature_bootmagic.md)||Turn NKRO on or off| 233|[`MAGIC_TOGGLE_NKRO`](feature_bootmagic.md)||Turn NKRO on or off|
252|Long Name|Short Name|Description|
253|---------|----------|-----------|
254|[`BL_x`](feature_backlight.md)||Set a specific backlight level between 0-9| 234|[`BL_x`](feature_backlight.md)||Set a specific backlight level between 0-9|
255|[`BL_ON`](feature_backlight.md)||An alias for `BL_9`| 235|[`BL_ON`](feature_backlight.md)||An alias for `BL_9`|
256|[`BL_OFF`](feature_backlight.md)||An alias for `BL_0`| 236|[`BL_OFF`](feature_backlight.md)||An alias for `BL_0`|
@@ -258,8 +238,6 @@ When defining a [keymap](keymap.md) each key needs a valid key definition. This
258|[`BL_INC`](feature_backlight.md)||Turn the backlight level up by 1| 238|[`BL_INC`](feature_backlight.md)||Turn the backlight level up by 1|
259|[`BL_TOGG`](feature_backlight.md)||Toggle the backlight on or off| 239|[`BL_TOGG`](feature_backlight.md)||Toggle the backlight on or off|
260|[`BL_STEP`](feature_backlight.md)||Step through backlight levels, wrapping around to 0 when you reach the top.| 240|[`BL_STEP`](feature_backlight.md)||Step through backlight levels, wrapping around to 0 when you reach the top.|
261|Long Name|Short Name|Description|
262|---------|----------|-----------|
263|[`RGB_TOG`](feature_rgblight.md)||toggle on/off| 241|[`RGB_TOG`](feature_rgblight.md)||toggle on/off|
264|[`RGB_MOD`](feature_rgblight.md)||cycle through modes| 242|[`RGB_MOD`](feature_rgblight.md)||cycle through modes|
265|[`RGB_HUI`](feature_rgblight.md)||hue increase| 243|[`RGB_HUI`](feature_rgblight.md)||hue increase|
@@ -268,17 +246,11 @@ When defining a [keymap](keymap.md) each key needs a valid key definition. This
268|[`RGB_SAD`](feature_rgblight.md)||saturation decrease| 246|[`RGB_SAD`](feature_rgblight.md)||saturation decrease|
269|[`RGB_VAI`](feature_rgblight.md)||value increase| 247|[`RGB_VAI`](feature_rgblight.md)||value increase|
270|[`RGB_VAD`](feature_rgblight.md)||value decrease| 248|[`RGB_VAD`](feature_rgblight.md)||value decrease|
271|Long Name|Short Name|Description|
272|---------|----------|-----------|
273|[`PRINT_ON`](feature_thermal_printer.md)||Start printing everything the user types| 249|[`PRINT_ON`](feature_thermal_printer.md)||Start printing everything the user types|
274|[`PRINT_OFF`](feature_thermal_printer.md)||Stop printing everything the user types| 250|[`PRINT_OFF`](feature_thermal_printer.md)||Stop printing everything the user types|
275|Long Name|Short Name|Description|
276|---------|----------|-----------|
277|[`OUT_AUTO`](feature_bluetooth.md)||auto mode| 251|[`OUT_AUTO`](feature_bluetooth.md)||auto mode|
278|[`OUT_USB`](feature_bluetooth.md)||usb only| 252|[`OUT_USB`](feature_bluetooth.md)||usb only|
279|[`OUT_BT`](feature_bluetooth.md)||bluetooth (when `BLUETOOTH_ENABLE`)| 253|[`OUT_BT`](feature_bluetooth.md)||bluetooth (when `BLUETOOTH_ENABLE`)|
280|Long Name|Short Name|Description|
281|---------|----------|-----------|
282|[`KC_HYPR`](quantum_keycodes.md#modifiers)||Hold down LCTL + LSFT + LALT + LGUI`| 254|[`KC_HYPR`](quantum_keycodes.md#modifiers)||Hold down LCTL + LSFT + LALT + LGUI`|
283|[`KC_MEH`](quantum_keycodes.md#modifiers)||Hold down LCTL + LSFT + LALT`| 255|[`KC_MEH`](quantum_keycodes.md#modifiers)||Hold down LCTL + LSFT + LALT`|
284|[`LCTL(kc)`](quantum_keycodes.md#modifiers)||`LCTL` + `kc`| 256|[`LCTL(kc)`](quantum_keycodes.md#modifiers)||`LCTL` + `kc`|
@@ -295,8 +267,6 @@ When defining a [keymap](keymap.md) each key needs a valid key definition. This
295|[`ALTG(kc)`](quantum_keycodes.md#modifiers)||`RCTL` + `RALT` + `kc`| 267|[`ALTG(kc)`](quantum_keycodes.md#modifiers)||`RCTL` + `RALT` + `kc`|
296|[`SCMD(kc)`](quantum_keycodes.md#modifiers)|[`SWIN(kc)`](quantum_keycodes.md#modifiers)|`LGUI` + `LSFT` + `kc`| 268|[`SCMD(kc)`](quantum_keycodes.md#modifiers)|[`SWIN(kc)`](quantum_keycodes.md#modifiers)|`LGUI` + `LSFT` + `kc`|
297|[`LCA(kc)`](quantum_keycodes.md#modifiers)||`LCTL` + `LALT` + `kc`| 269|[`LCA(kc)`](quantum_keycodes.md#modifiers)||`LCTL` + `LALT` + `kc`|
298|Long Name|Short Name|Description|
299|---------|----------|-----------|
300|[`CTL_T(kc)`](quantum_keycodes.md#mod-tap-keys)|[`LCTL_T(kc)`](quantum_keycodes.md#mod-tap-keys)|`LCTL` when held, `kc` when tapped| 270|[`CTL_T(kc)`](quantum_keycodes.md#mod-tap-keys)|[`LCTL_T(kc)`](quantum_keycodes.md#mod-tap-keys)|`LCTL` when held, `kc` when tapped|
301|[`RCTL_T(kc)`](quantum_keycodes.md#mod-tap-keys)||[`RCTL` when held, `kc` when tapped| 271|[`RCTL_T(kc)`](quantum_keycodes.md#mod-tap-keys)||[`RCTL` when held, `kc` when tapped|
302|[`SFT_T(kc)`](quantum_keycodes.md#mod-tap-keys)|[`LSFT_T(kc)`](quantum_keycodes.md#mod-tap-keys)|`LSFT` when held, `kc` when tapped| 272|[`SFT_T(kc)`](quantum_keycodes.md#mod-tap-keys)|[`LSFT_T(kc)`](quantum_keycodes.md#mod-tap-keys)|`LSFT` when held, `kc` when tapped|
@@ -312,8 +282,6 @@ When defining a [keymap](keymap.md) each key needs a valid key definition. This
312|[`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/)| 282|[`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/)|
313|[`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| 283|[`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|
314|[`LCA_T(kc)`](quantum_keycodes.md#mod-tap-keys)||`LCTL` + `LALT` when held, `kc` when tapped| 284|[`LCA_T(kc)`](quantum_keycodes.md#mod-tap-keys)||`LCTL` + `LALT` when held, `kc` when tapped|
315|Short Name|Long Name|Description|
316|----------|---------|-----------|
317|[`KC_TILD`](keycodes_us_ansi_shifted.md)|`KC_TILDE`|tilde `~`| 285|[`KC_TILD`](keycodes_us_ansi_shifted.md)|`KC_TILDE`|tilde `~`|
318|[`KC_EXLM`](keycodes_us_ansi_shifted.md)|`KC_EXCLAIM`|exclamation mark `!`| 286|[`KC_EXLM`](keycodes_us_ansi_shifted.md)|`KC_EXCLAIM`|exclamation mark `!`|
319|[`KC_AT`](keycodes_us_ansi_shifted.md)||at sign `@`| 287|[`KC_AT`](keycodes_us_ansi_shifted.md)||at sign `@`|
@@ -335,17 +303,13 @@ When defining a [keymap](keymap.md) each key needs a valid key definition. This
335|[`KC_PIPE`](keycodes_us_ansi_shifted.md)||pipe `\|`| 303|[`KC_PIPE`](keycodes_us_ansi_shifted.md)||pipe `\|`|
336|[`KC_QUES`](keycodes_us_ansi_shifted.md)|`KC_QUESTION`|question mark `?`| 304|[`KC_QUES`](keycodes_us_ansi_shifted.md)|`KC_QUESTION`|question mark `?`|
337|[`KC_DQT`/`KC_DQUO`](keycodes_us_ansi_shifted.md)|`KC_DOUBLE_QUOTE`|double quote `"`| 305|[`KC_DQT`/`KC_DQUO`](keycodes_us_ansi_shifted.md)|`KC_DOUBLE_QUOTE`|double quote `"`|
338|Long Name|Short Name|Description| 306|[`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|
339|---------|----------|-----------|
340|[`LT(layer, kc)`](feature_common_shortcuts.md#switching-and-toggling-layers)||turn on layer (0-15) when held, kc ([basic keycodes](basic_keycodes.md)) when tapped|
341|[`TO(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||turn on layer when depressed| 307|[`TO(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||turn on layer when depressed|
342|[`MO(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||momentarily turn on layer when depressed (requires `KC_TRNS` on destination layer)| 308|[`MO(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||momentarily turn on layer when depressed (requires `KC_TRNS` on destination layer)|
343|[`DF(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||sets the base (default) layer| 309|[`DF(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||sets the base (default) layer|
344|[`TG(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||toggle layer on/off| 310|[`TG(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||toggle layer on/off|
345|[`TT(layer)](feature_common_shortcuts.md#switching-and-toggling-layers)`||tap toggle? idk FIXME`| 311|[`TT(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||tap toggle? idk FIXME`|
346|[`OSM(mod)`](quantum_keycodes.md#one-shot-keys)||hold mod for one keypress| 312|[`OSM(mod)`](quantum_keycodes.md#one-shot-keys)||hold mod for one keypress|
347|[`OSL(layer)`](quantum_keycodes.md#one-shot-keys)||switch to layer for one keypress| 313|[`OSL(layer)`](quantum_keycodes.md#one-shot-keys)||switch to layer for one keypress|
348|Long Name|Short Name|Description|
349|---------|----------|-----------|
350|[`UNICODE(n)`](unicode.md)|[`UC(n)`](unicode.md)|if `UNICODE_ENABLE`, this will send characters up to `0x7FFF`| 314|[`UNICODE(n)`](unicode.md)|[`UC(n)`](unicode.md)|if `UNICODE_ENABLE`, this will send characters up to `0x7FFF`|
351|[`X(n)`](unicode.md)||if `UNICODEMAP_ENABLE`, also sends unicode via a different method| 315|[`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 b1f69ab16..b1f69ab16 100644
--- a/docs/basic_keycodes.md
+++ b/docs/keycodes_basic.md
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
215 215
216This should have given you a basic overview for creating your own keymap. For more details see the following resources: 216This should have given you a basic overview for creating your own keymap. For more details see the following resources:
217 217
218* https://github.com/qmk/qmk_firmware/wiki/Keycodes 218* [Keycodes](keycodes.md)
219* https://github.com/qmk/qmk_firmware/wiki/FAQ-Keymap 219* [Keymap FAQ](faq_keymap.md)
220* https://github.com/qmk/qmk_firmware/wiki/Keymap-examples
221 220
222We 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 221We 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) {
24}; 24};
25``` 25```
26 26
27This 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: 27This 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:
28 28
29```c 29```c
30 if (!record->event.pressed) { 30 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 @@
1
2## Audio output from a speaker
3
4Your 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.
5
6If you add `AUDIO_ENABLE = yes` to your `rules.mk`, there's a couple different sounds that will automatically be enabled without any other configuration:
7
8```
9STARTUP_SONG // plays when the keyboard starts up (audio.c)
10GOODBYE_SONG // plays when you press the RESET key (quantum.c)
11AG_NORM_SONG // plays when you press AG_NORM (quantum.c)
12AG_SWAP_SONG // plays when you press AG_SWAP (quantum.c)
13MUSIC_ON_SONG // plays when music mode is activated (process_music.c)
14MUSIC_OFF_SONG // plays when music mode is deactivated (process_music.c)
15CHROMATIC_SONG // plays when the chromatic music mode is selected (process_music.c)
16GUITAR_SONG // plays when the guitar music mode is selected (process_music.c)
17VIOLIN_SONG // plays when the violin music mode is selected (process_music.c)
18MAJOR_SONG // plays when the major music mode is selected (process_music.c)
19```
20
21You can override the default songs by doing something like this in your `config.h`:
22
23```c
24#ifdef AUDIO_ENABLE
25 #define STARTUP_SONG SONG(STARTUP_SOUND)
26#endif
27```
28
29A 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).
30
31To play a custom sound at a particular time, you can define a song like this (near the top of the file):
32
33```c
34float my_song[][2] = SONG(QWERTY_SOUND);
35```
36
37And then play your song like this:
38
39```c
40PLAY_SONG(my_song);
41```
42
43Alternatively, you can play it in a loop like this:
44
45```c
46PLAY_LOOP(my_song);
47```
48
49It'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.
50
51## Music mode
52
53The 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.
54
55Recording is experimental due to some memory issues - if you experience some weird behavior, unplugging/replugging your keyboard will fix things.
56
57Keycodes available:
58
59* `MU_ON` - Turn music mode on
60* `MU_OFF` - Turn music mode off
61* `MU_TOG` - Toggle music mode
62* `MU_MOD` - Cycle through the music modes:
63 * `CHROMATIC_MODE` - Chromatic scale, row changes the octave
64 * `GUITAR_MODE` - Chromatic scale, but the row changes the string (+5 st)
65 * `VIOLIN_MODE` - Chromatic scale, but the row changes the string (+7 st)
66 * `MAJOR_MODE` - Major scale
67
68In music mode, the following keycodes work differently, and don't pass through:
69
70* `LCTL` - start a recording
71* `LALT` - stop recording/stop playing
72* `LGUI` - play recording
73* `KC_UP` - speed-up playback
74* `KC_DOWN` - slow-down playback
75
76By 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:
77
78 #define MUSIC_MASK keycode != KC_NO
79
80Which will capture all keycodes - be careful, this will get you stuck in music mode until you restart your keyboard!
81
82The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, add something like this to your `config.h`:
83
84 #define PITCH_STANDARD_A 432.0f
85
86## MIDI functionalty
87
88This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile.
89
90## Bluetooth functionality
91
92This 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.
93
94## RGB Under Glow Mod
95
96![Planck with RGB Underglow](https://raw.githubusercontent.com/qmk/qmk_firmware/master/keyboards/planck/keymaps/yang/planck-with-rgb-underglow.jpg)
97
98Here is a quick demo on Youtube (with NPKC KC60) (https://www.youtube.com/watch?v=VKrpPAHlisY).
99
100For 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.
101
102 RGBLIGHT_ENABLE = yes
103
104In order to use the underglow animation functions, you need to have `#define RGBLIGHT_ANIMATIONS` in your `config.h`.
105
106Please 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:
107
108 #define RGB_DI_PIN F4 // The pin your RGB strip is wired to
109 #define RGBLIGHT_ANIMATIONS // Require for fancier stuff (not compatible with audio)
110 #define RGBLED_NUM 14 // Number of LEDs
111 #define RGBLIGHT_HUE_STEP 10
112 #define RGBLIGHT_SAT_STEP 17
113 #define RGBLIGHT_VAL_STEP 17
114
115You'll need to edit `RGB_DI_PIN` to the pin you have your `DI` on your RGB strip wired to.
116
117The 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`
118
119### WS2812 Wiring
120
121![WS2812 Wiring](https://raw.githubusercontent.com/qmk/qmk_firmware/master/keyboards/planck/keymaps/yang/WS2812-wiring.jpg)
122
123Please 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.
124
125## PS/2 Mouse Support
126
127Its possible to hook up a PS/2 mouse (for example touchpads or trackpoints) to your keyboard as a composite device.
128
129To 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.
130
131There are three available modes for hooking up PS/2 devices: USART (best), interrupts (better) or busywait (not recommended).
132
133### Busywait version
134
135Note: This is not recommended, you may encounter jerky movement or unsent inputs. Please use interrupt or USART version if possible.
136
137In rules.mk:
138
139```
140PS2_MOUSE_ENABLE = yes
141PS2_USE_BUSYWAIT = yes
142```
143
144In your keyboard config.h:
145
146```
147#ifdef PS2_USE_BUSYWAIT
148# define PS2_CLOCK_PORT PORTD
149# define PS2_CLOCK_PIN PIND
150# define PS2_CLOCK_DDR DDRD
151# define PS2_CLOCK_BIT 1
152# define PS2_DATA_PORT PORTD
153# define PS2_DATA_PIN PIND
154# define PS2_DATA_DDR DDRD
155# define PS2_DATA_BIT 2
156#endif
157```
158
159### Interrupt version
160
161The 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.
162
163In rules.mk:
164
165```
166PS2_MOUSE_ENABLE = yes
167PS2_USE_INT = yes
168```
169
170In your keyboard config.h:
171
172```
173#ifdef PS2_USE_INT
174#define PS2_CLOCK_PORT PORTD
175#define PS2_CLOCK_PIN PIND
176#define PS2_CLOCK_DDR DDRD
177#define PS2_CLOCK_BIT 2
178#define PS2_DATA_PORT PORTD
179#define PS2_DATA_PIN PIND
180#define PS2_DATA_DDR DDRD
181#define PS2_DATA_BIT 5
182
183#define PS2_INT_INIT() do { \
184 EICRA |= ((1<<ISC21) | \
185 (0<<ISC20)); \
186} while (0)
187#define PS2_INT_ON() do { \
188 EIMSK |= (1<<INT2); \
189} while (0)
190#define PS2_INT_OFF() do { \
191 EIMSK &= ~(1<<INT2); \
192} while (0)
193#define PS2_INT_VECT INT2_vect
194#endif
195```
196
197### USART version
198
199To 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.
200
201In rules.mk:
202
203```
204PS2_MOUSE_ENABLE = yes
205PS2_USE_USART = yes
206```
207
208In your keyboard config.h:
209
210```
211#ifdef PS2_USE_USART
212#define PS2_CLOCK_PORT PORTD
213#define PS2_CLOCK_PIN PIND
214#define PS2_CLOCK_DDR DDRD
215#define PS2_CLOCK_BIT 5
216#define PS2_DATA_PORT PORTD
217#define PS2_DATA_PIN PIND
218#define PS2_DATA_DDR DDRD
219#define PS2_DATA_BIT 2
220
221/* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
222/* set DDR of CLOCK as input to be slave */
223#define PS2_USART_INIT() do { \
224 PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT); \
225 PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT); \
226 UCSR1C = ((1 << UMSEL10) | \
227 (3 << UPM10) | \
228 (0 << USBS1) | \
229 (3 << UCSZ10) | \
230 (0 << UCPOL1)); \
231 UCSR1A = 0; \
232 UBRR1H = 0; \
233 UBRR1L = 0; \
234} while (0)
235#define PS2_USART_RX_INT_ON() do { \
236 UCSR1B = ((1 << RXCIE1) | \
237 (1 << RXEN1)); \
238} while (0)
239#define PS2_USART_RX_POLL_ON() do { \
240 UCSR1B = (1 << RXEN1); \
241} while (0)
242#define PS2_USART_OFF() do { \
243 UCSR1C = 0; \
244 UCSR1B &= ~((1 << RXEN1) | \
245 (1 << TXEN1)); \
246} while (0)
247#define PS2_USART_RX_READY (UCSR1A & (1<<RXC1))
248#define PS2_USART_RX_DATA UDR1
249#define PS2_USART_ERROR (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1)))
250#define PS2_USART_RX_VECT USART1_RX_vect
251#endif
252```
253
254### Additional Settings
255
256#### PS/2 mouse features
257
258These enable settings supported by the PS/2 mouse protocol: http://www.computer-engineering.org/ps2mouse/
259
260```
261/* Use remote mode instead of the default stream mode (see link) */
262#define PS2_MOUSE_USE_REMOTE_MODE
263
264/* Enable the scrollwheel or scroll gesture on your mouse or touchpad */
265#define PS2_MOUSE_ENABLE_SCROLLING
266
267/* Some mice will need a scroll mask to be configured. The default is 0xFF. */
268#define PS2_MOUSE_SCROLL_MASK 0x0F
269
270/* Applies a transformation to the movement before sending to the host (see link) */
271#define PS2_MOUSE_USE_2_1_SCALING
272
273/* The time to wait after initializing the ps2 host */
274#define PS2_MOUSE_INIT_DELAY 1000 /* Default */
275```
276
277You can also call the following functions from ps2_mouse.h
278
279```
280void ps2_mouse_disable_data_reporting(void);
281
282void ps2_mouse_enable_data_reporting(void);
283
284void ps2_mouse_set_remote_mode(void);
285
286void ps2_mouse_set_stream_mode(void);
287
288void ps2_mouse_set_scaling_2_1(void);
289
290void ps2_mouse_set_scaling_1_1(void);
291
292void ps2_mouse_set_resolution(ps2_mouse_resolution_t resolution);
293
294void ps2_mouse_set_sample_rate(ps2_mouse_sample_rate_t sample_rate);
295```
296
297#### Fine control
298
299Use the following defines to change the sensitivity and speed of the mouse.
300Note: you can also use `ps2_mouse_set_resolution` for the same effect (not supported on most touchpads).
301
302```
303#define PS2_MOUSE_X_MULTIPLIER 3
304#define PS2_MOUSE_Y_MULTIPLIER 3
305#define PS2_MOUSE_V_MULTIPLIER 1
306```
307
308#### Scroll button
309
310If you're using a trackpoint, you will likely want to be able to use it for scrolling.
311Its possible to enable a "scroll button/s" that when pressed will cause the mouse to scroll instead of moving.
312To enable the feature, you must set a scroll button mask as follows:
313
314```
315#define PS2_MOUSE_SCROLL_BTN_MASK (1<<PS2_MOUSE_BUTTON_MIDDLE) /* Default */
316```
317
318To disable the scroll button feature:
319
320```
321#define PS2_MOUSE_SCROLL_BTN_MASK 0
322```
323
324The available buttons are:
325
326```
327#define PS2_MOUSE_BTN_LEFT 0
328#define PS2_MOUSE_BTN_RIGHT 1
329#define PS2_MOUSE_BTN_MIDDLE 2
330```
331
332You can also combine buttons in the mask by `|`ing them together.
333
334Once you've configured your scroll button mask, you must configure the scroll button send interval.
335This is the interval before which if the scroll buttons were released they would be sent to the host.
336After this interval, they will cause the mouse to scroll and will not be sent.
337
338```
339#define PS2_MOUSE_SCROLL_BTN_SEND 300 /* Default */
340```
341
342To disable sending the scroll buttons:
343```
344#define PS2_MOUSE_SCROLL_BTN_SEND 0
345```
346
347Fine control over the scrolling is supported with the following defines:
348
349```
350#define PS2_MOUSE_SCROLL_DIVISOR_H 2
351#define PS2_MOUSE_SCROLL_DIVISOR_V 2
352```
353
354#### Debug settings
355
356To debug the mouse, add `debug_mouse = true` or enable via bootmagic.
357
358```
359/* To debug the mouse reports */
360#define PS2_MOUSE_DEBUG_HID
361#define PS2_MOUSE_DEBUG_RAW
362```
363
364## Safety Considerations
365
366You probably don't want to "brick" your keyboard, making it impossible
367to rewrite firmware onto it. Here are some of the parameters to show
368what things are (and likely aren't) too risky.
369
370- If your keyboard map does not include RESET, then, to get into DFU
371 mode, you will need to press the reset button on the PCB, which
372 requires unscrewing the bottom.
373- Messing with tmk_core / common files might make the keyboard
374 inoperable
375- Too large a .hex file is trouble; `make dfu` will erase the block,
376 test the size (oops, wrong order!), which errors out, failing to
377 flash the keyboard, leaving it in DFU mode.
378 - To this end, note that the maximum .hex file size on Planck is
379 7000h (28672 decimal)
380
381```
382Linking: .build/planck_rev4_cbbrowne.elf [OK]
383Creating load file for Flash: .build/planck_rev4_cbbrowne.hex [OK]
384
385Size after:
386 text data bss dec hex filename
387 0 22396 0 22396 577c planck_rev4_cbbrowne.hex
388```
389
390 - The above file is of size 22396/577ch, which is less than
391 28672/7000h
392 - As long as you have a suitable alternative .hex file around, you
393 can retry, loading that one
394 - Some of the options you might specify in your keyboard's Makefile
395 consume extra memory; watch out for BOOTMAGIC_ENABLE,
396 MOUSEKEY_ENABLE, EXTRAKEY_ENABLE, CONSOLE_ENABLE, API_SYSEX_ENABLE
397- DFU tools do /not/ allow you to write into the bootloader (unless
398 you throw in extra fruitsalad of options), so there is little risk
399 there.
400- EEPROM has around a 100000 write cycle. You shouldn't rewrite the
401 firmware repeatedly and continually; that'll burn the EEPROM
402 eventually.
403
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
34OPT_DEFS += -DBOOTLOADER_SIZE=512 34OPT_DEFS += -DBOOTLOADER_SIZE=512
35``` 35```
36 36
37At the bottom of the file, you'll find lots of features to turn on and off - all of these options should be set with `?=` to allow for the keymap overrides. `?=` only assigns if the variable was previously undefined. For the full documenation of these features, see the [Makefile options](#makefile-options). 37At the bottom of the file, you'll find lots of features to turn on and off - all of these options should be set with `?=` to allow for the keymap overrides. `?=` only assigns if the variable was previously undefined. For the full documenation of these features, see the [Makefile options](getting_started_make_guide.md#makefile-options).
38 38
39## `/keyboards/<keyboard>/readme.md` 39## `/keyboards/<keyboard>/readme.md`
40 40
@@ -42,7 +42,7 @@ This is where you'll describe your keyboard - please write as much as you can ab
42 42
43## `/keyboards/<keyboard>/<keyboard>.c` 43## `/keyboards/<keyboard>/<keyboard>.c`
44 44
45This is where all of the custom logic for your keyboard goes - you may not need to put anything in this file, since a lot of things are configured automatically. All of the `*_kb()` functions are defined here. If you modify them, remember to keep the calls to `*_user()`, or things in the keymaps might not work. You can read more about the functions [here](#custom-quantum-functions-for-keyboards-and-keymaps) 45This is where all of the custom logic for your keyboard goes - you may not need to put anything in this file, since a lot of things are configured automatically. All of the `*_kb()` functions are defined here. If you modify them, remember to keep the calls to `*_user()`, or things in the keymaps might not work. You can read more about the functions [here](custom_quantum_functions.md).
46 46
47## `/keyboards/<keyboard>/<keyboard>.h` 47## `/keyboards/<keyboard>/<keyboard>.h`
48 48
diff --git a/docs/quantum_keycodes.md b/docs/quantum_keycodes.md
index 2e17ae4b7..a5160bf94 100644
--- a/docs/quantum_keycodes.md
+++ b/docs/quantum_keycodes.md
@@ -15,8 +15,8 @@ On this page we have documented keycodes between `0x00FF` and `0xFFFF` which are
15|`KC_GESC`/`GRAVE_ESC`|Acts as escape when pressed normally but when pressed with Shift or GUI will send a ```| 15|`KC_GESC`/`GRAVE_ESC`|Acts as escape when pressed normally but when pressed with Shift or GUI will send a ```|
16|`KC_LSPO`|Left shift when held, open paranthesis when tapped| 16|`KC_LSPO`|Left shift when held, open paranthesis when tapped|
17|`KC_RSPC`|Right shift when held, close paranthesis when tapped| 17|`KC_RSPC`|Right shift when held, close paranthesis when tapped|
18|`KC_LEAD`|The [leader key](leader_key.md)| 18|`KC_LEAD`|The [leader key](feature_leader_key.md)|
19|`KC_LOCK`|The [lock key](key_lock.md)| 19|`KC_LOCK`|The [lock key](key_lock.md)|
20|`FUNC(n)`/`F(n)`|Call `fn_action(n)`| 20|`FUNC(n)`/`F(n)`|Call `fn_action(n)` (deprecated)|
21|`M(n)`|to call macro n| 21|`M(n)`|to call macro n|
22|`MACROTAP(n)`|to macro-tap n idk FIXME| 22|`MACROTAP(n)`|to macro-tap n idk FIXME|
diff --git a/docs/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 @@
3This 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: 3This 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:
4 4
5* [QMK Overview](qmk_overview.md) 5* [QMK Overview](qmk_overview.md)
6* [How Keyboards Work](basic_how_keyboards_work.md) 6* [How Keyboards Work](how_keyboards_work.md)
7* [FAQ](faq.md) 7* [FAQ](faq.md)
8 8
9## Startup 9## Startup