aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/README.md22
-rw-r--r--docs/_summary.md4
-rw-r--r--docs/faq_debug.md189
-rw-r--r--docs/faq_misc.md118
-rw-r--r--docs/newbs.md14
-rw-r--r--docs/newbs_building_firmware_configurator.md2
-rw-r--r--docs/newbs_flashing.md15
-rw-r--r--docs/newbs_getting_started.md36
-rw-r--r--docs/newbs_learn_more_resources.md17
-rw-r--r--docs/newbs_testing_debugging.md91
-rw-r--r--docs/qmk_custom_dark.css11
-rw-r--r--docs/qmk_custom_light.css25
12 files changed, 269 insertions, 275 deletions
diff --git a/docs/README.md b/docs/README.md
index d6cde53c9..9330f0fac 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1,26 +1,20 @@
1# Quantum Mechanical Keyboard Firmware 1# Quantum Mechanical Keyboard Firmware
2 2
3[![Current Version](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags)
4[![Build Status](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware)
5[![Discord](https://img.shields.io/discord/440868230475677696.svg)](https://discord.gg/Uq7gcHh)
6[![Docs Status](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm)
7[![GitHub contributors](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly)
8[![GitHub forks](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/)
9
10## What is QMK Firmware? 3## What is QMK Firmware?
11 4
12QMK (*Quantum Mechanical Keyboard*) is an open source community centered around developing computer input devices. The community encompasses all sorts of input devices, such as keyboards, mice, and MIDI devices. A core group of collaborators maintains [QMK Firmware](https://github.com/qmk/qmk_firmware), [QMK Configurator](https://config.qmk.fm), [QMK Toolbox](https://github.com/qmk/qmk_toolbox), [qmk.fm](https://qmk.fm), and this documentation with the help of community members like you. 5QMK (*Quantum Mechanical Keyboard*) is an open source community centered around developing computer input devices. The community encompasses all sorts of input devices, such as keyboards, mice, and MIDI devices. A core group of collaborators maintains [QMK Firmware](https://github.com/qmk/qmk_firmware), [QMK Configurator](https://config.qmk.fm), [QMK Toolbox](https://github.com/qmk/qmk_toolbox), [qmk.fm](https://qmk.fm), and this documentation with the help of community members like you.
13 6
14## Get Started 7## Get Started
15 8
16Totally new to QMK? There are two ways to get started: 9<div class="flex-container">
10
11?> **Basic** [QMK Configurator](newbs_building_firmware_configurator.md) <br>
12User friendly graphical interfaces, no programming knowledge required.
13
14?> **Advanced** [Use The Source](newbs.md) <br>
15More powerful, but harder to use.
17 16
18* Basic: [QMK Configurator](https://config.qmk.fm) 17</div>
19 * Just select your keyboard from the dropdown and program your keyboard.
20 * We have an [introductory video](https://www.youtube.com/watch?v=-imgglzDMdY) you can watch.
21 * There is also an overview [document you can read](newbs_building_firmware_configurator.md).
22* Advanced: [Use The Source](newbs.md)
23 * More powerful, but harder to use
24 18
25## Make It Yours 19## Make It Yours
26 20
diff --git a/docs/_summary.md b/docs/_summary.md
index 19498f6a2..5af0046ab 100644
--- a/docs/_summary.md
+++ b/docs/_summary.md
@@ -3,7 +3,6 @@
3 * [Setup](newbs_getting_started.md) 3 * [Setup](newbs_getting_started.md)
4 * [Building Your First Firmware](newbs_building_firmware.md) 4 * [Building Your First Firmware](newbs_building_firmware.md)
5 * [Flashing Firmware](newbs_flashing.md) 5 * [Flashing Firmware](newbs_flashing.md)
6 * [Testing and Debugging](newbs_testing_debugging.md)
7 * [Getting Help/Support](support.md) 6 * [Getting Help/Support](support.md)
8 * [Other Resources](newbs_learn_more_resources.md) 7 * [Other Resources](newbs_learn_more_resources.md)
9 * [Syllabus](syllabus.md) 8 * [Syllabus](syllabus.md)
@@ -11,7 +10,8 @@
11* FAQs 10* FAQs
12 * [General FAQ](faq_general.md) 11 * [General FAQ](faq_general.md)
13 * [Build/Compile QMK](faq_build.md) 12 * [Build/Compile QMK](faq_build.md)
14 * [Debugging/Troubleshooting QMK](faq_debug.md) 13 * [Troubleshooting QMK](faq_misc.md)
14 * [Debugging QMK](faq_debug.md)
15 * [Keymap FAQ](faq_keymap.md) 15 * [Keymap FAQ](faq_keymap.md)
16 * [Glossary](reference_glossary.md) 16 * [Glossary](reference_glossary.md)
17 17
diff --git a/docs/faq_debug.md b/docs/faq_debug.md
index 7d5473678..b2d09605b 100644
--- a/docs/faq_debug.md
+++ b/docs/faq_debug.md
@@ -2,147 +2,118 @@
2 2
3This page details various common questions people have about troubleshooting their keyboards. 3This page details various common questions people have about troubleshooting their keyboards.
4 4
5# Debug Console 5## Debugging :id=debugging
6 6
7## `hid_listen` Can't Recognize Device 7Your keyboard will output debug information if you have `CONSOLE_ENABLE = yes` in your `rules.mk`. By default the output is very limited, but you can turn on debug mode to increase the amount of debug output. Use the `DEBUG` keycode in your keymap, use the [Command](feature_command.md) feature to enable debug mode, or add the following code to your keymap.
8When debug console of your device is not ready you will see like this:
9
10```
11Waiting for device:.........
12```
13
14once the device is plugged in then *hid_listen* finds it you will get this message:
15 8
16``` 9```c
17Waiting for new device:......................... 10void keyboard_post_init_user(void) {
18Listening: 11 // Customise these values to desired behaviour
12 debug_enable=true;
13 debug_matrix=true;
14 //debug_keyboard=true;
15 //debug_mouse=true;
16}
19``` 17```
20 18
21If you can't get this 'Listening:' message try building with `CONSOLE_ENABLE=yes` in [Makefile] 19## Debugging Tools
22 20
23You may need privilege to access the device on OS like Linux. 21There are two different tools you can use to debug your keyboard.
24- try `sudo hid_listen`
25 22
26## Can't Get Message on Console 23### Debugging With QMK Toolbox
27Check:
28- *hid_listen* finds your device. See above.
29- Enable debug with pressing **Magic**+d. See [Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands).
30- set `debug_enable=true`. See [Testing and Debugging](newbs_testing_debugging.md#debugging)
31- try using 'print' function instead of debug print. See **common/print.h**.
32- disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97).
33 24
34*** 25For compatible platforms, [QMK Toolbox](https://github.com/qmk/qmk_toolbox) can be used to display debug messages from your keyboard.
35 26
36# Miscellaneous 27### Debugging With hid_listen
37## Safety Considerations
38 28
39You probably don't want to "brick" your keyboard, making it impossible 29Prefer a terminal based solution? [hid_listen](https://www.pjrc.com/teensy/hid_listen.html), provided by PJRC, can also be used to display debug messages. Prebuilt binaries for Windows,Linux,and MacOS are available.
40to rewrite firmware onto it. Here are some of the parameters to show
41what things are (and likely aren't) too risky.
42 30
43- If your keyboard map does not include RESET, then, to get into DFU 31## Sending Your Own Debug Messages
44 mode, you will need to press the reset button on the PCB, which
45 requires unscrewing the bottom.
46- Messing with tmk_core / common files might make the keyboard
47 inoperable
48- Too large a .hex file is trouble; `make dfu` will erase the block,
49 test the size (oops, wrong order!), which errors out, failing to
50 flash the keyboard, leaving it in DFU mode.
51 - To this end, note that the maximum .hex file size on Planck is
52 7000h (28672 decimal)
53 32
54``` 33Sometimes it's useful to print debug messages from within your [custom code](custom_quantum_functions.md). Doing so is pretty simple. Start by including `print.h` at the top of your file:
55Linking: .build/planck_rev4_cbbrowne.elf [OK]
56Creating load file for Flash: .build/planck_rev4_cbbrowne.hex [OK]
57 34
58Size after: 35```c
59 text data bss dec hex filename 36#include "print.h"
60 0 22396 0 22396 577c planck_rev4_cbbrowne.hex
61``` 37```
62 38
63 - The above file is of size 22396/577ch, which is less than 39After that you can use a few different print functions:
64 28672/7000h
65 - As long as you have a suitable alternative .hex file around, you
66 can retry, loading that one
67 - Some of the options you might specify in your keyboard's Makefile
68 consume extra memory; watch out for BOOTMAGIC_ENABLE,
69 MOUSEKEY_ENABLE, EXTRAKEY_ENABLE, CONSOLE_ENABLE, API_SYSEX_ENABLE
70- DFU tools do /not/ allow you to write into the bootloader (unless
71 you throw in extra fruit salad of options), so there is little risk
72 there.
73- EEPROM has around a 100000 write cycle. You shouldn't rewrite the
74 firmware repeatedly and continually; that'll burn the EEPROM
75 eventually.
76 40
77## NKRO Doesn't work 41* `print("string")`: Print a simple string.
78First you have to compile firmware with this build option `NKRO_ENABLE` in **Makefile**. 42* `uprintf("%s string", var)`: Print a formatted string
43* `dprint("string")` Print a simple string, but only when debug mode is enabled
44* `dprintf("%s string", var)`: Print a formatted string, but only when debug mode is enabled
79 45
80Try `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. 46## Debug Examples
81 47
82If your firmware 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 kept over power cycles. 48Below is a collection of real world debugging examples. For additional information, refer to [Debugging/Troubleshooting QMK](faq_debug.md).
83 49
84https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch 50### Which matrix position is this keypress?
85 51
52When porting, or when attempting to diagnose pcb issues, it can be useful to know if a keypress is scanned correctly. To enable logging for this scenario, add the following code to your keymaps `keymap.c`
86 53
87## TrackPoint Needs Reset Circuit (PS/2 Mouse Support) 54```c
88Without reset circuit you will have inconsistent result due to improper initialize of the hardware. See circuit schematic of TPM754. 55bool process_record_user(uint16_t keycode, keyrecord_t *record) {
56 // If console is enabled, it will print the matrix position and status of each key pressed
57#ifdef CONSOLE_ENABLE
58 uprintf("KL: kc: 0x%04X, col: %u, row: %u, pressed: %b, time: %u, interrupt: %b, count: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.time, record->tap.interrupted, record->tap.count);
59#endif
60 return true;
61}
62```
89 63
90- http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447 64Example output
91- http://www.mikrocontroller.net/attachment/52583/tpm754.pdf 65```text
66Waiting for device:.......
67Listening:
68KL: kc: 169, col: 0, row: 0, pressed: 1
69KL: kc: 169, col: 0, row: 0, pressed: 0
70KL: kc: 174, col: 1, row: 0, pressed: 1
71KL: kc: 174, col: 1, row: 0, pressed: 0
72KL: kc: 172, col: 2, row: 0, pressed: 1
73KL: kc: 172, col: 2, row: 0, pressed: 0
74```
92 75
76### How long did it take to scan for a keypress?
93 77
94## Can't Read Column of Matrix Beyond 16 78When testing performance issues, it can be useful to know the frequency at which the switch matrix is being scanned. To enable logging for this scenario, add the following code to your keymaps `config.h`
95Use `1UL<<16` instead of `1<<16` in `read_cols()` in [matrix.h] when your columns goes beyond 16.
96 79
97In C `1` means one of [int] type which is [16 bit] 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`. 80```c
81#define DEBUG_MATRIX_SCAN_RATE
82```
98 83
99http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279 84Example output
85```text
86 > matrix scan frequency: 315
87 > matrix scan frequency: 313
88 > matrix scan frequency: 316
89 > matrix scan frequency: 316
90 > matrix scan frequency: 316
91 > matrix scan frequency: 316
92```
100 93
101## Special Extra Key Doesn't Work (System, Audio Control Keys) 94## `hid_listen` Can't Recognize Device
102You need to define `EXTRAKEY_ENABLE` in `rules.mk` to use them in QMK. 95When debug console of your device is not ready you will see like this:
103 96
104``` 97```
105EXTRAKEY_ENABLE = yes # Audio control and System control 98Waiting for device:.........
106``` 99```
107 100
108## Wakeup from Sleep Doesn't Work 101once the device is plugged in then *hid_listen* finds it you will get this message:
109
110In Windows check `Allow this device to wake the computer` setting in Power **Management property** tab of **Device Manager**. Also check BIOS setting.
111
112Pressing any key during sleep should wake host.
113
114## Using Arduino?
115
116**Note that Arduino pin naming is different from actual chip.** For example, Arduino pin `D0` is not `PD0`. Check circuit with its schematics yourself.
117
118- http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf
119- http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf
120
121Arduino Leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem.
122
123## Enabling JTAG
124
125By default, the JTAG debugging interface is disabled as soon as the keyboard starts up. JTAG-capable MCUs come from the factory with the `JTAGEN` fuse set, and it takes over certain pins of the MCU that the board may be using for the switch matrix, LEDs, etc.
126
127If you would like to keep JTAG enabled, just add the following to your `config.h`:
128 102
129```c 103```
130#define NO_JTAG_DISABLE 104Waiting for new device:.........................
105Listening:
131``` 106```
132 107
133## USB 3 Compatibility 108If you can't get this 'Listening:' message try building with `CONSOLE_ENABLE=yes` in [Makefile]
134I heard some people have a problem with USB 3 port, try USB 2 port.
135
136
137## Mac Compatibility
138### OS X 10.11 and Hub
139https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034
140
141
142## Problem on BIOS (UEFI)/Resume (Sleep & Wake)/Power Cycles
143Some people reported their keyboard stops working on BIOS and/or after resume(power cycles).
144 109
145As 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. 110You may need privilege to access the device on OS like Linux.
111- try `sudo hid_listen`
146 112
147https://github.com/tmk/tmk_keyboard/issues/266 113## Can't Get Message on Console
148https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778 114Check:
115- *hid_listen* finds your device. See above.
116- Enable debug with pressing **Magic**+d. See [Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands).
117- set `debug_enable=true`. See [Debugging](#debugging)
118- try using 'print' function instead of debug print. See **common/print.h**.
119- disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97).
diff --git a/docs/faq_misc.md b/docs/faq_misc.md
new file mode 100644
index 000000000..10961fb9f
--- /dev/null
+++ b/docs/faq_misc.md
@@ -0,0 +1,118 @@
1# Miscellaneous FAQ
2
3## How do I test my keyboard? :id=testing
4
5Testing your keyboard is usually pretty straightforward. Press every single key and make sure it sends the keys you expect. You can use [QMK Configurator](https://config.qmk.fm/#/test/)'s test mode to check your keyboard, even if it doesn't run QMK.
6
7## Safety Considerations
8
9You probably don't want to "brick" your keyboard, making it impossible
10to rewrite firmware onto it. Here are some of the parameters to show
11what things are (and likely aren't) too risky.
12
13- If your keyboard map does not include RESET, then, to get into DFU
14 mode, you will need to press the reset button on the PCB, which
15 requires unscrewing the bottom.
16- Messing with tmk_core / common files might make the keyboard
17 inoperable
18- Too large a .hex file is trouble; `make dfu` will erase the block,
19 test the size (oops, wrong order!), which errors out, failing to
20 flash the keyboard, leaving it in DFU mode.
21 - To this end, note that the maximum .hex file size on Planck is
22 7000h (28672 decimal)
23
24```
25Linking: .build/planck_rev4_cbbrowne.elf [OK]
26Creating load file for Flash: .build/planck_rev4_cbbrowne.hex [OK]
27
28Size after:
29 text data bss dec hex filename
30 0 22396 0 22396 577c planck_rev4_cbbrowne.hex
31```
32
33 - The above file is of size 22396/577ch, which is less than
34 28672/7000h
35 - As long as you have a suitable alternative .hex file around, you
36 can retry, loading that one
37 - Some of the options you might specify in your keyboard's Makefile
38 consume extra memory; watch out for BOOTMAGIC_ENABLE,
39 MOUSEKEY_ENABLE, EXTRAKEY_ENABLE, CONSOLE_ENABLE, API_SYSEX_ENABLE
40- DFU tools do /not/ allow you to write into the bootloader (unless
41 you throw in extra fruit salad of options), so there is little risk
42 there.
43- EEPROM has around a 100000 write cycle. You shouldn't rewrite the
44 firmware repeatedly and continually; that'll burn the EEPROM
45 eventually.
46
47## NKRO Doesn't work
48First you have to compile firmware with this build option `NKRO_ENABLE` in **Makefile**.
49
50Try `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.
51
52If your firmware 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 kept over power cycles.
53
54https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch
55
56
57## TrackPoint Needs Reset Circuit (PS/2 Mouse Support)
58Without reset circuit you will have inconsistent result due to improper initialize of the hardware. See circuit schematic of TPM754.
59
60- http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447
61- http://www.mikrocontroller.net/attachment/52583/tpm754.pdf
62
63
64## Can't Read Column of Matrix Beyond 16
65Use `1UL<<16` instead of `1<<16` in `read_cols()` in [matrix.h] when your columns goes beyond 16.
66
67In C `1` means one of [int] type which is [16 bit] 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`.
68
69http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279
70
71## Special Extra Key Doesn't Work (System, Audio Control Keys)
72You need to define `EXTRAKEY_ENABLE` in `rules.mk` to use them in QMK.
73
74```
75EXTRAKEY_ENABLE = yes # Audio control and System control
76```
77
78## Wakeup from Sleep Doesn't Work
79
80In Windows check `Allow this device to wake the computer` setting in Power **Management property** tab of **Device Manager**. Also check BIOS setting.
81
82Pressing any key during sleep should wake host.
83
84## Using Arduino?
85
86**Note that Arduino pin naming is different from actual chip.** For example, Arduino pin `D0` is not `PD0`. Check circuit with its schematics yourself.
87
88- http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf
89- http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf
90
91Arduino Leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem.
92
93## Enabling JTAG
94
95By default, the JTAG debugging interface is disabled as soon as the keyboard starts up. JTAG-capable MCUs come from the factory with the `JTAGEN` fuse set, and it takes over certain pins of the MCU that the board may be using for the switch matrix, LEDs, etc.
96
97If you would like to keep JTAG enabled, just add the following to your `config.h`:
98
99```c
100#define NO_JTAG_DISABLE
101```
102
103## USB 3 Compatibility
104I heard some people have a problem with USB 3 port, try USB 2 port.
105
106
107## Mac Compatibility
108### OS X 10.11 and Hub
109https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034
110
111
112## Problem on BIOS (UEFI)/Resume (Sleep & Wake)/Power Cycles
113Some people reported their keyboard stops working on BIOS and/or after resume(power cycles).
114
115As 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.
116
117https://github.com/tmk/tmk_keyboard/issues/266
118https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
diff --git a/docs/newbs.md b/docs/newbs.md
index 02b0a070f..4bf518026 100644
--- a/docs/newbs.md
+++ b/docs/newbs.md
@@ -6,25 +6,19 @@ QMK tries to put a lot of power into your hands by making easy things easy, and
6 6
7Not sure if your keyboard can run QMK? If it's a mechanical keyboard you built yourself chances are good it can. We support a [large number of hobbyist boards](http://qmk.fm/keyboards/). If your current keyboard can't run QMK there are a lot of choices out there for boards that do. 7Not sure if your keyboard can run QMK? If it's a mechanical keyboard you built yourself chances are good it can. We support a [large number of hobbyist boards](http://qmk.fm/keyboards/). If your current keyboard can't run QMK there are a lot of choices out there for boards that do.
8 8
9## Is This Guide For Me? 9?> **Is This Guide For Me?**<br>
10 10If the thought of programming intimidates you, please [take a look at our online GUI](newbs_building_firmware_configurator.md) instead.</div>
11This guide is suitable for everyone who wants to build a keyboard firmware using the source code. If you are already a programmer you will find the process very familiar and easier to follow. If the thought of programming intimidates you please [take a look at our online GUI](newbs_building_firmware_configurator.md) instead.
12 11
13## Overview 12## Overview
14 13
15There are 4 main sections to this guide: 14This guide is suitable for everyone who wants to build a keyboard firmware using the source code. If you are already a programmer you will find the process very familiar and easier to follow. There are 3 main sections to this guide:
16 15
171. [Setup Your Environment](newbs_getting_started.md) 161. [Setup Your Environment](newbs_getting_started.md)
182. [Building Your First Firmware](newbs_building_firmware.md) 172. [Building Your First Firmware](newbs_building_firmware.md)
193. [Flashing Firmware](newbs_flashing.md) 183. [Flashing Firmware](newbs_flashing.md)
204. [Testing and Debugging](newbs_testing_debugging.md)
21 19
22This guide is focused on helping someone who has never compiled software before. It makes choices and recommendations based on that viewpoint. There are alternative methods for many of these procedures, and we support most of those alternatives. If you have any doubt about how to accomplish a task you can [ask us for guidance](getting_started_getting_help.md). 20This guide is focused on helping someone who has never compiled software before. It makes choices and recommendations based on that viewpoint. There are alternative methods for many of these procedures, and we support most of those alternatives. If you have any doubt about how to accomplish a task you can [ask us for guidance](getting_started_getting_help.md).
23 21
24## Additional Resources 22## Additional Resources
25 23
26Beyond this guide there are several resources you may find helpful while you learn QMK. We've collected them on the [Learning Resources](newbs_learn_more_resources.md) page. 24Beyond this guide there are several resources you may find helpful while you learn QMK. We've collected them on the [Syllabus](syllabus.md) and [Learning Resources](newbs_learn_more_resources.md) pages.
27
28## Open Source
29
30QMK is Open Source Software released under the GNU General Public License.
diff --git a/docs/newbs_building_firmware_configurator.md b/docs/newbs_building_firmware_configurator.md
index ac702f391..eae0cef2c 100644
--- a/docs/newbs_building_firmware_configurator.md
+++ b/docs/newbs_building_firmware_configurator.md
@@ -2,7 +2,7 @@
2 2
3[![QMK Configurator Screenshot](https://i.imgur.com/anw9cOL.png)](https://config.qmk.fm/) 3[![QMK Configurator Screenshot](https://i.imgur.com/anw9cOL.png)](https://config.qmk.fm/)
4 4
5The [QMK Configurator](https://config.qmk.fm) is an online graphical user interface that generates QMK Firmware hex files. 5The [QMK Configurator](https://config.qmk.fm) is an online graphical user interface that generates QMK Firmware `.hex` or `.bin` files.
6 6
7Watch the [Video Tutorial](https://www.youtube.com/watch?v=-imgglzDMdY). Many people find that is enough information to start programming their own keyboard. 7Watch the [Video Tutorial](https://www.youtube.com/watch?v=-imgglzDMdY). Many people find that is enough information to start programming their own keyboard.
8 8
diff --git a/docs/newbs_flashing.md b/docs/newbs_flashing.md
index 04c7c55ae..7ce1f8493 100644
--- a/docs/newbs_flashing.md
+++ b/docs/newbs_flashing.md
@@ -37,18 +37,22 @@ Begin by opening the QMK Toolbox application. You'll want to locate the firmware
37 37
38If you are on Windows or macOS, there are commands you can use to easily open the current folder in Explorer or Finder. 38If you are on Windows or macOS, there are commands you can use to easily open the current folder in Explorer or Finder.
39 39
40#### Windows 40<!-- tabs:start -->
41
42#### ** Windows **
41 43
42``` 44```
43start . 45start .
44``` 46```
45 47
46#### macOS 48#### ** macOS **
47 49
48``` 50```
49open . 51open .
50``` 52```
51 53
54<!-- tabs:end -->
55
52The firmware file always follows this naming format: 56The firmware file always follows this naming format:
53 57
54``` 58```
@@ -106,6 +110,9 @@ In this case, you'll have to fall back on specifying the bootloader. See the [Fl
106 110
107## Test It Out! 111## Test It Out!
108 112
109Congrats! Your custom firmware has been programmed to your keyboard! 113Congrats! Your custom firmware has been programmed to your keyboard and you're ready to test it out!
114
115With a little bit of luck everything will work perfectly, but if not there are steps that will help you figure out what's wrong.
116Testing your keyboard is usually pretty straightforward. Press every single key and make sure it sends the keys you expect. You can use [QMK Configurator](https://config.qmk.fm/#/test/)'s test mode to check your keyboard, even if it doesn't run QMK.
110 117
111Give it a try and make sure everything works the way you want it to. We've written [Testing and Debugging](newbs_testing_debugging.md) to round out this guide, so head over there to learn about validating your firmware and how to troubleshoot your custom functionality. 118Still not working? Browse the FAQ topics for more information, or [chat with us on Discord](https://discord.gg/Uq7gcHh).
diff --git a/docs/newbs_getting_started.md b/docs/newbs_getting_started.md
index 10a513050..1c72911d9 100644
--- a/docs/newbs_getting_started.md
+++ b/docs/newbs_getting_started.md
@@ -2,41 +2,21 @@
2 2
3Before you can build keymaps, you need to install some software and set up your build environment. This only has to be done once no matter how many keyboards you plan to compile firmware for. 3Before you can build keymaps, you need to install some software and set up your build environment. This only has to be done once no matter how many keyboards you plan to compile firmware for.
4 4
5## 1. Download Software 5## 1. Prerequisites
6 6
7There are a few pieces of software you'll need to get started. 7There are a few pieces of software you'll need to get started.
8 8
9### Text Editor 9* [Text editor](newbs_learn_more_resources.md#text-editor-resources)
10 * You’ll need a program that can edit and save plain text files. The default editor that comes with many OS's does not save plain text files, so you'll need to make sure that whatever editor you chose does.
11* [Toolbox (optional)](https://github.com/qmk/qmk_toolbox)
12 * A graphical program for Windows and macOS that allows you to both program and debug your custom keyboard
10 13
11You'll need a program that can edit and save **plain text** files. If you're on Windows you can make do with Notepad, and on Linux you can use gedit. Both of these are simple but functional text editors. On macOS, be careful with the default TextEdit app: it will not save plain text files unless you explicitly select _Make Plain Text_ from the _Format_ menu. 14?> If you haven't worked with the Linux/Unix command line before, there are a few basic concepts and commands you should learn. [These resources](newbs_learn_more_resources.md#command-line-resources) will teach you enough to be able to work with QMK.
12
13You can also download and install a dedicated text editor like [Sublime Text](https://www.sublimetext.com/) or [VS Code](https://code.visualstudio.com/). This is probably the best way to go regardless of platform, as these programs are specifically made for editing code.
14
15?> Not sure which text editor to use? Laurence Bradford wrote [a great introduction](https://learntocodewith.me/programming/basics/text-editors/) to the subject.
16
17### QMK Toolbox
18
19QMK Toolbox is an optional graphical program for Windows and macOS that allows you to both program and debug your custom keyboard. You will likely find it invaluable for easily flashing your keyboard and viewing debug messages that it prints.
20
21[Download the latest release here.](https://github.com/qmk/qmk_toolbox/releases/latest)
22
23* For Windows: `qmk_toolbox.exe` (portable) or `qmk_toolbox_install.exe` (installer)
24* For macOS: `QMK.Toolbox.app.zip` (portable) or `QMK.Toolbox.pkg` (installer)
25
26### A Unix-like Environment
27
28Linux and macOS come with unix shells you can execute already. You will only need to setup your build environment.
29
30On Windows you will need to install MSYS2 or WSL and use those environments. Instructions for setting up MSYS2 are provided below.
31 15
32## 2. Prepare Your Build Environment :id=set-up-your-environment 16## 2. Prepare Your Build Environment :id=set-up-your-environment
33 17
34We've tried to make QMK as easy to set up as possible. You only have to prepare your Linux or Unix environment, then let QMK install the rest. 18We've tried to make QMK as easy to set up as possible. You only have to prepare your Linux or Unix environment, then let QMK install the rest.
35 19
36?> If you haven't worked with the Linux/Unix command line before, there are a few basic concepts and commands you should learn. These resources will teach you enough to be able to work with QMK:<br>
37[Must Know Linux Commands](https://www.guru99.com/must-know-linux-commands.html)<br>
38[Some Basic Unix Commands](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html)
39
40<!-- tabs:start --> 20<!-- tabs:start -->
41 21
42### ** Windows ** 22### ** Windows **
@@ -45,9 +25,9 @@ QMK maintains a Bundle of MSYS2, the CLI and all necessary dependencies. It also
45 25
46#### Prerequisites 26#### Prerequisites
47 27
48You will need to install `QMK MSYS`. The latest release is available at https://msys.qmk.fm/. 28You will need to install [QMK MSYS](https://msys.qmk.fm/). The latest release is available [here](https://github.com/qmk/qmk_distro_msys/releases/latest).
49 29
50Alternatively, if you'd like to manually install msys2, the following section will walk you through the process. 30Alternatively, if you'd like to manually install MSYS2, the following section will walk you through the process.
51 31
52<details> 32<details>
53 <summary>Manual Install</summary> 33 <summary>Manual Install</summary>
diff --git a/docs/newbs_learn_more_resources.md b/docs/newbs_learn_more_resources.md
index 8f1ddec1e..1afdc206b 100644
--- a/docs/newbs_learn_more_resources.md
+++ b/docs/newbs_learn_more_resources.md
@@ -2,15 +2,26 @@
2 2
3These resources are aimed at giving new members in the QMK community more understanding to the information provided in the Newbs docs. 3These resources are aimed at giving new members in the QMK community more understanding to the information provided in the Newbs docs.
4 4
5**QMK resources**: 5### QMK resources
6 6
7* [Thomas Baart's QMK Basics Blog](https://thomasbaart.nl/category/mechanical-keyboards/firmware/qmk/qmk-basics/) – A user-created blog covering the basics of how to use QMK Firmware, as seen from a new user's perspective. 7* [Thomas Baart's QMK Basics Blog](https://thomasbaart.nl/category/mechanical-keyboards/firmware/qmk/qmk-basics/) – A user-created blog covering the basics of how to use QMK Firmware, as seen from a new user's perspective.
8 8
9**Command Line resources**: 9### Command Line resources
10 10
11* [Good General Tutorial on Command Line](https://www.codecademy.com/learn/learn-the-command-line) 11* [Good General Tutorial on Command Line](https://www.codecademy.com/learn/learn-the-command-line)
12* [Must Know Linux Commands](https://www.guru99.com/must-know-linux-commands.html)<br>
13* [Some Basic Unix Commands](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html)
12 14
13**Git resources**: 15### Text Editor resources
16
17Not sure which text editor to use?
18* [a great introduction to the subject](https://learntocodewith.me/programming/basics/text-editors/)
19
20Editors specifically made for code:
21* [Sublime Text](https://www.sublimetext.com/)
22* [VS Code](https://code.visualstudio.com/)
23
24### Git resources
14 25
15* [Great General Tutorial](https://www.codecademy.com/learn/learn-git) 26* [Great General Tutorial](https://www.codecademy.com/learn/learn-git)
16* [Flight Rules For Git](https://github.com/k88hudson/git-flight-rules) 27* [Flight Rules For Git](https://github.com/k88hudson/git-flight-rules)
diff --git a/docs/newbs_testing_debugging.md b/docs/newbs_testing_debugging.md
index 834fed716..c3550489e 100644
--- a/docs/newbs_testing_debugging.md
+++ b/docs/newbs_testing_debugging.md
@@ -1,96 +1,9 @@
1# Testing and Debugging 1# Testing and Debugging
2 2
3Once you've flashed your keyboard with a custom firmware you're ready to test it out. With a little bit of luck everything will work perfectly, but if not this document will help you figure out what's wrong.
4
5## Testing 3## Testing
6 4
7Testing your keyboard is usually pretty straightforward. Press every single key and make sure it sends the keys you expect. You can use [QMK Configurator](https://config.qmk.fm/#/test/)'s test mode to check your keyboard, even if it doesn't run QMK. 5[Moved here](faq_misc.md#testing)
8 6
9## Debugging :id=debugging 7## Debugging :id=debugging
10 8
11Your keyboard will output debug information if you have `CONSOLE_ENABLE = yes` in your `rules.mk`. By default the output is very limited, but you can turn on debug mode to increase the amount of debug output. Use the `DEBUG` keycode in your keymap, use the [Command](feature_command.md) feature to enable debug mode, or add the following code to your keymap. 9[Moved here](faq_debug.md#debugging)
12
13```c
14void keyboard_post_init_user(void) {
15 // Customise these values to desired behaviour
16 debug_enable=true;
17 debug_matrix=true;
18 //debug_keyboard=true;
19 //debug_mouse=true;
20}
21```
22
23## Debugging Tools
24
25There are two different tools you can use to debug your keyboard.
26
27### Debugging With QMK Toolbox
28
29For compatible platforms, [QMK Toolbox](https://github.com/qmk/qmk_toolbox) can be used to display debug messages from your keyboard.
30
31### Debugging With hid_listen
32
33Prefer a terminal based solution? [hid_listen](https://www.pjrc.com/teensy/hid_listen.html), provided by PJRC, can also be used to display debug messages. Prebuilt binaries for Windows,Linux,and MacOS are available.
34
35## Sending Your Own Debug Messages
36
37Sometimes it's useful to print debug messages from within your [custom code](custom_quantum_functions.md). Doing so is pretty simple. Start by including `print.h` at the top of your file:
38
39```c
40#include "print.h"
41```
42
43After that you can use a few different print functions:
44
45* `print("string")`: Print a simple string.
46* `uprintf("%s string", var)`: Print a formatted string
47* `dprint("string")` Print a simple string, but only when debug mode is enabled
48* `dprintf("%s string", var)`: Print a formatted string, but only when debug mode is enabled
49
50## Debug Examples
51
52Below is a collection of real world debugging examples. For additional information, refer to [Debugging/Troubleshooting QMK](faq_debug.md).
53
54### Which matrix position is this keypress?
55
56When porting, or when attempting to diagnose pcb issues, it can be useful to know if a keypress is scanned correctly. To enable logging for this scenario, add the following code to your keymaps `keymap.c`
57
58```c
59bool process_record_user(uint16_t keycode, keyrecord_t *record) {
60 // If console is enabled, it will print the matrix position and status of each key pressed
61#ifdef CONSOLE_ENABLE
62 uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed);
63#endif
64 return true;
65}
66```
67
68Example output
69```text
70Waiting for device:.......
71Listening:
72KL: kc: 169, col: 0, row: 0, pressed: 1
73KL: kc: 169, col: 0, row: 0, pressed: 0
74KL: kc: 174, col: 1, row: 0, pressed: 1
75KL: kc: 174, col: 1, row: 0, pressed: 0
76KL: kc: 172, col: 2, row: 0, pressed: 1
77KL: kc: 172, col: 2, row: 0, pressed: 0
78```
79
80### How long did it take to scan for a keypress?
81
82When testing performance issues, it can be useful to know the frequency at which the switch matrix is being scanned. To enable logging for this scenario, add the following code to your keymaps `config.h`
83
84```c
85#define DEBUG_MATRIX_SCAN_RATE
86```
87
88Example output
89```text
90 > matrix scan frequency: 315
91 > matrix scan frequency: 313
92 > matrix scan frequency: 316
93 > matrix scan frequency: 316
94 > matrix scan frequency: 316
95 > matrix scan frequency: 316
96```
diff --git a/docs/qmk_custom_dark.css b/docs/qmk_custom_dark.css
index c7fe7b7da..35498fbd8 100644
--- a/docs/qmk_custom_dark.css
+++ b/docs/qmk_custom_dark.css
@@ -28,6 +28,9 @@
28 border-bottom: 1px solid #777 !important; 28 border-bottom: 1px solid #777 !important;
29} 29}
30 30
31.markdown-section p.warn > strong {
32 color: #c8c8c8;
33}
31 34
32:root { 35:root {
33 --docsifytabs-border-color: #555; 36 --docsifytabs-border-color: #555;
@@ -36,11 +39,3 @@
36 --docsifytabs-tab-background: #444; 39 --docsifytabs-tab-background: #444;
37 --docsifytabs-tab-background-active: #3f3f3f; 40 --docsifytabs-tab-background-active: #3f3f3f;
38} 41}
39
40.docsify-tabs__tab:focus {
41 outline: none !important;
42}
43
44.docsify-tabs__content .anchor {
45 transition: none;
46}
diff --git a/docs/qmk_custom_light.css b/docs/qmk_custom_light.css
index c5d36cf6f..c65e54396 100644
--- a/docs/qmk_custom_light.css
+++ b/docs/qmk_custom_light.css
@@ -29,13 +29,16 @@
29 padding: 0; 29 padding: 0;
30} 30}
31 31
32 32@media only screen and (min-width: 768px) {
33:root { 33 .flex-container {
34 --docsifytabs-border-color: #ddd; 34 display:flex;
35 --docsifytabs-tab-highlight-color: var(--theme-color, #0074d9); 35 flex-flow:row;
36 36 }
37 --docsifytabs-tab-background: #f8f8f8; 37 .flex-container > p {
38 --docsifytabs-tab-background-active: transparent; 38 flex-basis: 100%;
39 flex: 1;
40 margin: 1em 2em 1em 2em;
41 }
39} 42}
40 43
41.docsify-tabs__tab:focus { 44.docsify-tabs__tab:focus {
@@ -45,3 +48,11 @@
45.docsify-tabs__content .anchor { 48.docsify-tabs__content .anchor {
46 transition: none; 49 transition: none;
47} 50}
51
52:root {
53 --docsifytabs-border-color: #ddd;
54 --docsifytabs-tab-highlight-color: var(--theme-color, #0074d9);
55
56 --docsifytabs-tab-background: #f8f8f8;
57 --docsifytabs-tab-background-active: transparent;
58}