aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2017-06-10 14:58:55 -0400
committerJack Humbert <jack.humb@gmail.com>2017-06-10 14:58:55 -0400
commit995c3141a674a0311786cc713ea96d39330a9b48 (patch)
treee6a207ce23bc2bcb1b20c4e43a8b963c0ccf8769
parentca01d94005f67ec4fa9528353481faa622d949ae (diff)
downloadqmk_firmware-995c3141a674a0311786cc713ea96d39330a9b48.tar.gz
qmk_firmware-995c3141a674a0311786cc713ea96d39330a9b48.zip
convert docs to lowercase and underscores
-rw-r--r--docs/_summary.md28
-rw-r--r--docs/pcb_guide.md151
-rw-r--r--docs/porting_your_keyboard_to_qmk.md59
-rw-r--r--docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md70
-rw-r--r--docs/power.txt62
-rw-r--r--docs/previously_asked_questions.asciidoc14
-rw-r--r--docs/qmk_overview.md75
-rw-r--r--docs/report_descriptor.md1
-rw-r--r--docs/space_cadet_shift.md24
-rw-r--r--docs/tap_dance.md144
-rw-r--r--docs/test_for_asciidoc.asciidoc17
-rw-r--r--docs/tmk_based_projects.md34
-rw-r--r--docs/tmk_own_projects.md69
-rw-r--r--docs/tmk_readme.md243
-rw-r--r--docs/unicode_and_additional_language_support.md54
-rw-r--r--docs/unit_testing.md68
-rw-r--r--docs/usb_hid.md11
-rw-r--r--docs/usb_nkro.txt160
-rw-r--r--docs/vagrant_guide.md27
19 files changed, 1311 insertions, 0 deletions
diff --git a/docs/_summary.md b/docs/_summary.md
new file mode 100644
index 000000000..420003996
--- /dev/null
+++ b/docs/_summary.md
@@ -0,0 +1,28 @@
1
2### Getting started
3* [Introduction](home.md)
4* [QMK Overview](qmk_overview.md)
5* [Build Environment Setup](build_environment_setup.md)
6
7### Making a keymap
8* [Keymap overview](keymap.md)
9* [Custom Quantum Functions](custom_quantum_functions.md)
10* [Keycodes](keycodes.md)
11* [Layer switching](key_functions.md)
12* [Leader Key](leader_key.md)
13* [Macros](macros.md)
14* [Dynamic Macros](dynamic_macros.md)
15* [Space Cadet](space_cadet_shift.md)
16* [Tap Dance](tap_dance.md)
17* [Mouse keys](mouse_keys.md)
18* [FAQ: Creating a Keymap](faq_keymap.md)
19* [FAQ: Compiling QMK](faq_build.md)
20
21### For hardware makers and modders
22* [Modding your keyboard](modding_your_keyboard.md)
23* [Porting your keyboard to QMK](porting_your_keyboard_to_qmk.md)
24* [Adding features to QMK](adding_features_to_qmk.md)
25
26### Other topics
27* [General FAQ](faq.md)
28* [Differences from TMK](differences_from_tmk.md)
diff --git a/docs/pcb_guide.md b/docs/pcb_guide.md
new file mode 100644
index 000000000..e07a11488
--- /dev/null
+++ b/docs/pcb_guide.md
@@ -0,0 +1,151 @@
1# Planck Firmware Guide
2
3## Setting up the environment
4
5### Windows
61. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**.
72. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location.
83. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/qmk/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer.
94. Right-click on the 1-setup-path-win batch script, select "Run as administrator", and accept the User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up.
105. Right-click on the 2-setup-environment-win batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete!
11
12
13### Mac
14
15If you're using homebrew, you can use the following commands:
16
17 brew tap osx-cross/avr
18 brew install avr-libc
19 brew install dfu-programmer
20
21Otherwise, these instructions will work:
22
231. Install Xcode from the App Store.
242. Install the Command Line Tools from `Xcode->Preferences->Downloads`.
253. Install [DFU-Programmer][dfu-prog].
26
27### Linux
281. Install AVR GCC with your favorite package manager.
292. Install [DFU-Programmer][dfu-prog].
30
31Note that, since it will be directly accessing USB hardware, the
32`dfu-programmer` program needs to be run as root.
33
34## Verify Your Installation
351. Clone the following repository: https://github.com/qmk/qmk_firmware
362. Open a Terminal and `cd` into `qmk_firmware/keyboards/planck`
373. Run `make`. This should output a lot of information about the build process.
38
39## Using the built-in functions
40
41Here is a list of some of the functions available from the command line:
42
43* `make clean`: clean the environment - may be required in-between builds
44* `make`: compile the code
45* `make KEYMAP=<keymap>`: compile with the extended keymap file `extended_keymaps/extended_keymap_<keymap>.c`
46* `make dfu`: build and flash the layout to the PCB
47* `make dfu-force`: build and force-flash the layout to the PCB (may be require for first flash)
48
49Generally, the instructions to flash the PCB are as follows:
50
511. Make changes to the appropriate keymap file
522. Save the file
533. `make clean`
544. Press the reset button on the PCB/press the key with the `RESET` keycode
555. `make <arguments> dfu` - use the necessary `KEYMAP=<keymap>` and/or `COMMON=true` arguments here.
56
57## Troubleshooting
58If you see something like this
59
60 0 [main] sh 13384 sync_with_child: child 9716(0x178) died before initialization with status code 0xC0000142
61 440 [main] sh 13384 sync_with_child: *** child state waiting for longjmp
62 /usr/bin/sh: fork: Resource temporarily unavailable
63
64after running 'make' on Windows than you are encountering a very popular issue with WinAVR on Windows 8.1 and 10.
65You can easily fix this problem by replacing msys-1.0.dll in WinAVR/utils/bin with [this one](http://www.madwizard.org/download/electronics/msys-1.0-vista64.zip).
66Restart your system and everything should work fine!
67
68
69If you see this
70
71 dfu-programmer atmega32u4 erase
72 process_begin: CreateProcess(NULL, dfu-programmer atmega32u4 erase, ...) failed.
73 make (e=2): The system cannot find the file specified.
74 make: *** [dfu] Error 2
75
76when trying to 'make dfu' on Windows you need to copy the dfu-programmer.exe to qmk_firmware/keyboards/planck.
77
78
79## Quantum MK Firmware
80
81### Keymap
82
83Unlike the other keymaps, prefixing the keycodes with `KC_` is required. A full list of the keycodes is available [here](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keycode.txt). For the keycodes available only in the extended keymap, see this [header file](https://github.com/qmk/qmk_firmware/blob/master/quantum/keymap_common.h).
84
85You can use modifiers with keycodes like this:
86
87 LCTL(KC_C)
88
89Which will generate Ctrl+c. These are daisy-chainable, meaning you can do things like:
90
91 LCTL(LALT(KC_C))
92
93That will generate Ctrl+Alt+c. The entire list of these functions is here:
94
95* `LCTL()`: Left control
96* `LSFT()` / `S()`: Left shift
97* `LALT()`: Left alt/opt
98* `LGUI()`: Left win/cmd
99* `RCTL()`: Right control
100* `RSFT()`: Right shift
101* `RALT()`: Right alt/opt
102* `RGUI()`: Right win/cmd
103
104`S(KC_1)`-like entries are useful in writing keymaps for the Planck.
105
106### Other keycodes
107
108A number of other keycodes have been added that you may find useful:
109
110* `CM_<key>`: the Colemak equivalent of a key (in place of `KC_<key>`), when using Colemak in software (`CM_O` generates `KC_SCLN`)
111* `RESET`: jump to bootloader for flashing (same as press the reset button)
112* `BL_STEP`: step through the backlight brightnesses
113* `BL_<0-15>`: set backlight brightness to 0-15
114* `BL_DEC`: lower the backlight brightness
115* `BL_INC`: raise the backlight brightness
116* `BL_TOGG`: toggle the backlight on/off
117
118### Function layers
119
120The extended keymap extends the number of function layers from 32 to the near-infinite value of 256. Rather than using `FN<num>` notation (still available, but limited to `FN0`-`FN31`), you can use the `FUNC(<num>)` notation. `F(<num>)` is a shortcut for this.
121
122The function actions are unchanged, and you can see the full list of them [here](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_code.h). They are explained in detail [here](keymap.md#2-action).
123
124### Macros
125
126Macros have been setup in the `keymaps/keymap_default.c` file so that you can use `M(<num>)` to access a macro in the `action_get_macro` section on your keymap. The switch/case structure you see here is required, and is setup for `M(0)` - you'll need to copy and paste the code to look like this (e.g. to support `M(3)`):
127
128 switch(id) {
129 case 0:
130 return MACRODOWN(TYPE(KC_A), END);
131 break;
132 case 1:
133 return MACRODOWN(TYPE(KC_B), END);
134 break;
135 case 2:
136 return MACRODOWN(TYPE(KC_C), END);
137 break;
138 case 3:
139 return MACRODOWN(TYPE(KC_D), END);
140 break;
141 }
142 return MACRO_NONE;
143
144`MACRODOWN()` is a shortcut for `(record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE)` which tells the macro to execute when the key is pressed. Without this, the macro will be executed on both the down and up stroke.
145
146[cygwin]: https://www.cygwin.com/
147[mingw]: http://www.mingw.org/
148[mhv]: https://infernoembedded.com/products/avr-tools
149[winavr]: http://winavr.sourceforge.net/
150[crosspack]: http://www.obdev.at/products/crosspack/index.html
151[dfu-prog]: http://dfu-programmer.sourceforge.net/
diff --git a/docs/porting_your_keyboard_to_qmk.md b/docs/porting_your_keyboard_to_qmk.md
new file mode 100644
index 000000000..6f291a432
--- /dev/null
+++ b/docs/porting_your_keyboard_to_qmk.md
@@ -0,0 +1,59 @@
1If your keyboard is running an Atmega chip (atmega32u4 and others), it's pretty easy to get things setup for compiling your own firmware to flash onto your board. There is a `/util/new_project.sh <keyboard>` script to help get you started - you can simply pass your keyboard's name into the script, and all of the necessary files will be created. The components of each are described below.
2
3## `/keyboards/<keyboard>/config.h`
4
5The `USB Device descriptor parameter` block contains parameters are used to uniquely identify your keyboard, but they don't really matter to the machine.
6
7Your `MATRIX_ROWS` and `MATRIX_COLS` are the numbers of rows and cols in your keyboard matrix - this may be different than the number of actual rows and columns on your keyboard. There are some tricks you can pull to increase the number of keys in a given matrix, but most keyboards are pretty straight-forward.
8
9The `MATRIX_ROW_PINS` and `MATRIX_COL_PINS` are the pins your MCU uses on each row/column. Your schematic (if you have one) will have this information on it, and the values will vary depending on your setup. This is one of the most important things to double-check in getting your keyboard setup correctly.
10
11For the `DIODE_DIRECTION`, most hand-wiring guides will instruct you to wire the diodes in the `COL2ROW` position, but it's possible that they are in the other - people coming from EasyAVR often use `ROW2COL`. Nothing will function if this is incorrect.
12
13`BACKLIGHT_PIN` is the pin that your PWM-controlled backlight (if one exists) is hooked-up to. Currently only B5, B6, and B7 are supported.
14
15`BACKLIGHT_BREATHING` is a fancier backlight feature that adds breathing/pulsing/fading effects to the backlight. It uses the same timer as the normal backlight. These breathing effects must be called by code in your keymap.
16
17`BACKLIGHT_LEVELS` is how many levels exist for your backlight - max is 15, and they are computed automatically from this number.
18
19## `/keyboards/<keyboard>/Makefile`
20
21The values at the top likely won't need to be changed, since most boards use the `atmega32u4` chip. The `BOOTLOADER_SIZE` will need to be adjusted based on your MCU type. It's defaulted to the Teensy, since that's the most common controller. Below is quoted from the `Makefile`.
22
23```
24# Boot Section Size in *bytes*
25# Teensy halfKay 512
26# Teensy++ halfKay 1024
27# Atmel DFU loader 4096
28# LUFA bootloader 4096
29# USBaspLoader 2048
30OPT_DEFS += -DBOOTLOADER_SIZE=512
31```
32
33At 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).
34
35## `/keyboards/<keyboard>/readme.md`
36
37This is where you'll describe your keyboard - please write as much as you can about it! Talking about default functionality/features is useful here. Feel free to link to external pages/sites if necessary. Images can be included here as well. This file will be rendered into a webpage at qmk.fm/keyboards/<keyboard>/.
38
39## `/keyboards/<keyboard>/<keyboard>.c`
40
41This 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)
42
43## `/keyboards/<keyboard>/<keyboard>.h`
44
45Here is where you can (optionally) define your `KEYMAP` function to remap your matrix into a more readable format. With ortholinear boards, this isn't always necessary, but it can help to accomodate the dead spots on your matrix, where there are keys that take up more than one space (2u, staggering, 6.25u, etc). The example shows the difference between the physical keys, and the matrix design:
46
47```
48#define KEYMAP( \
49 k00, k01, k02, \
50 k10, k11 \
51) \
52{ \
53 { k00, k01, k02 }, \
54 { k10, KC_NO, k11 }, \
55}
56```
57
58Each of the `kxx` variables needs to be unique, and usually follows the format `k<row><col>`. You can place `KC_NO` where your dead keys are in your matrix.
59
diff --git a/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md b/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md
new file mode 100644
index 000000000..436c73cb7
--- /dev/null
+++ b/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md
@@ -0,0 +1,70 @@
1Setting up your ARM based PCB is a little more involved than an Atmel MCU, but is easy enough. Start by using `util/new_project.sh <keyboard>` to create a new project:
2
3```
4$ util/new_project.sh simontester
5######################################################
6# /keyboards/simontester project created. To start
7# working on things, cd into keyboards/simontester
8######################################################
9```
10
11
12
13# END OF NEW ARM DOC, OLD ATMEL DOC FOLLOWS
14
15## `/keyboards/<keyboard>/config.h`
16
17The `USB Device descriptor parameter` block contains parameters are used to uniquely identify your keyboard, but they don't really matter to the machine.
18
19Your `MATRIX_ROWS` and `MATRIX_COLS` are the numbers of rows and cols in your keyboard matrix - this may be different than the number of actual rows and columns on your keyboard. There are some tricks you can pull to increase the number of keys in a given matrix, but most keyboards are pretty straight-forward.
20
21The `MATRIX_ROW_PINS` and `MATRIX_COL_PINS` are the pins your MCU uses on each row/column. Your schematic (if you have one) will have this information on it, and the values will vary depending on your setup. This is one of the most important things to double-check in getting your keyboard setup correctly.
22
23For the `DIODE_DIRECTION`, most hand-wiring guides will instruct you to wire the diodes in the `COL2ROW` position, but it's possible that they are in the other - people coming from EasyAVR often use `ROW2COL`. Nothing will function if this is incorrect.
24
25`BACKLIGHT_PIN` is the pin that your PWM-controlled backlight (if one exists) is hooked-up to. Currently only B5, B6, and B7 are supported.
26
27`BACKLIGHT_BREATHING` is a fancier backlight feature that adds breathing/pulsing/fading effects to the backlight. It uses the same timer as the normal backlight. These breathing effects must be called by code in your keymap.
28
29`BACKLIGHT_LEVELS` is how many levels exist for your backlight - max is 15, and they are computed automatically from this number.
30
31## `/keyboards/<keyboard>/Makefile`
32
33The values at the top likely won't need to be changed, since most boards use the `atmega32u4` chip. The `BOOTLOADER_SIZE` will need to be adjusted based on your MCU type. It's defaulted to the Teensy, since that's the most common controller. Below is quoted from the `Makefile`.
34
35```
36# Boot Section Size in *bytes*
37# Teensy halfKay 512
38# Teensy++ halfKay 1024
39# Atmel DFU loader 4096
40# LUFA bootloader 4096
41# USBaspLoader 2048
42OPT_DEFS += -DBOOTLOADER_SIZE=512
43```
44
45At 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).
46
47## `/keyboards/<keyboard>/readme.md`
48
49This is where you'll describe your keyboard - please write as much as you can about it! Talking about default functionality/features is useful here. Feel free to link to external pages/sites if necessary. Images can be included here as well. This file will be rendered into a webpage at qmk.fm/keyboards/<keyboard>/.
50
51## `/keyboards/<keyboard>/<keyboard>.c`
52
53This 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)
54
55## `/keyboards/<keyboard>/<keyboard>.h`
56
57Here is where you can (optionally) define your `KEYMAP` function to remap your matrix into a more readable format. With ortholinear boards, this isn't always necessary, but it can help to accomodate the dead spots on your matrix, where there are keys that take up more than one space (2u, staggering, 6.25u, etc). The example shows the difference between the physical keys, and the matrix design:
58
59```
60#define KEYMAP( \
61 k00, k01, k02, \
62 k10, k11 \
63) \
64{ \
65 { k00, k01, k02 }, \
66 { k10, KC_NO, k11 }, \
67}
68```
69
70Each of the `kxx` variables needs to be unique, and usually follows the format `k<row><col>`. You can place `KC_NO` where your dead keys are in your matrix.
diff --git a/docs/power.txt b/docs/power.txt
new file mode 100644
index 000000000..0abbbe48e
--- /dev/null
+++ b/docs/power.txt
@@ -0,0 +1,62 @@
1Time to Sleep
2=============
3USB suspend no activity on USB line for 3ms
4No Interaction no user interaction
5 matrix has no change
6 matrix has no switch on
7
8
9AVR Power Management
10====================
11
12V-USB suspend
13 USB suspend
14 http://vusb.wikidot.com/examples
15
16MCUSR MCU Status Register
17 WDRF Watchdog Reset Flag
18 BORF
19 EXTRF
20 PORF Power-on Reset Flag
21
22SMCR Sleep Mode Control Register
23 SE Sleep Enable
24 SM2:0
25 #define set_sleep_mode(mode) \
26 #define SLEEP_MODE_IDLE (0)
27 #define SLEEP_MODE_ADC _BV(SM0)
28 #define SLEEP_MODE_PWR_DOWN _BV(SM1)
29 #define SLEEP_MODE_PWR_SAVE (_BV(SM0) | _BV(SM1))
30 #define SLEEP_MODE_STANDBY (_BV(SM1) | _BV(SM2))
31 #define SLEEP_MODE_EXT_STANDBY (_BV(SM0) | _BV(SM1) | _BV(SM2))
32
33
34ACSR Analog Comparator Control and Status Register
35 To disable Analog Comparator
36 ACSR = 0x80;
37 or
38 ACSR &= ~_BV(ACIE);
39 ACSR |= _BV(ACD);
40
41 ACD: Analog Comparator Disable
42 When this bit is written logic one, the power to the Analog Comparator is
43 switched off. This bit can be set at any time to turn off the Analog
44 Comparator. This will reduce power consumption in Active and Idle mode.
45 When changing the ACD bit, the Analog Comparator Interrupt must be disabled
46 by clearing the ACIE bit in ACSR. Otherwise an interrupt can occur when
47 the bit is changed.
48
49DIDR1 Digital Input Disable Register 1
50 AIN1D
51 AIN0D
52 When this bit is written logic one, the digital input buffer on the AIN1/0 pin is disabled. The corresponding PIN Register bit will always read as zero when this bit is set. When an analog signal is applied to the AIN1/0 pin and the digital input from this pin is not needed, this bit should be written logic one to reduce power consumption in the digital input buffer.
53
54
55PRR Power Reduction Register
56 PRTWI
57 PRTIM2
58 PRTIM0
59 PRTIM1
60 PRSPI
61 PRUSART0
62 PRADC
diff --git a/docs/previously_asked_questions.asciidoc b/docs/previously_asked_questions.asciidoc
new file mode 100644
index 000000000..36af1f203
--- /dev/null
+++ b/docs/previously_asked_questions.asciidoc
@@ -0,0 +1,14 @@
1= Previously Asked Questions
2:toc:
3:toc-placement: preamble
4
5toc::[]
6
7= Question thread
8http://deskthority.net/workshop-f7/how-to-build-your-very-own-keyboard-firmware-t7177-270.html
9
10= Questions
11== Columns beyond 16(uint16_t) cannot be read
12* https://github.com/tmk/tmk_keyboard/wiki/FAQ#cant-read-comlumn-of-matrix-beyond-16
13* http://deskthority.net/workshop-f7/how-to-build-your-very-own-keyboard-firmware-t7177-270.html#p247051
14* http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279
diff --git a/docs/qmk_overview.md b/docs/qmk_overview.md
new file mode 100644
index 000000000..6fdb68c49
--- /dev/null
+++ b/docs/qmk_overview.md
@@ -0,0 +1,75 @@
1# QMK Overview
2
3This page attempts to explain the basic information you need to know to work with the QMK project. It assumes that you are familiar with navigating a UNIX shell, but does not assume you are familiar with C or with compiling using make.
4
5# Basic QMK structure
6
7QMK is a fork of @tmk's [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders.
8
9## Keyboard project structure
10
11Within the `handwired` and `keyboard` folders is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within you'll find the following structure:
12
13* `keymaps/`: Different keymaps that can be built
14* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `Makefile`.
15* `config.h`: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific `config.h`.
16
17### Keymap structure
18
19In every keymap folder, the following files may be found. Only `keymap.c` is required, if the rest of the files are not found the default options will be chosen.
20
21* `config.h`: the options to configure your keymap
22* `keymap.c`: all of your keymap code, required
23* `Makefile`: the features of QMK that are enabled, required to run `make` in your keymap folder
24* `readme.md`: a description of your keymap, how others might use it, and explanations of features
25* Other files: Some people choose to include an image depicting the layout, and other files that help people to use or understand a particular keymap.
26
27# The `make` command
28
29The `make` command is how you compile the firmware into a .hex file, which can be loaded by a dfu programmer (like dfu-progammer via `make dfu`) or the [Teensy loader](https://www.pjrc.com/teensy/loader.html) (only used with Teensys). It it recommended that you always run make from within the `root` folder.
30
31**NOTE:** To abort a make command press `Ctrl-c`
32
33For more details on the QMK build process see [Make Instructions](make_instructions.md).
34
35### Simple instructions for building and uploading a keyboard
36
37**Most keyboards have more specific instructions in the keyboard specific readme.md file, so please check that first**
38
391. Enter the `root` folder
402. Run `make <keyboard>-<subproject>-<keymap>-<programmer>`
41
42In the above commands, replace:
43
44* `<keyboard>` with the name of your keyboard
45* `<keymap>` with the name of your keymap
46* `<subproject>` with the name of the subproject (revision or sub-model of your keyboard). For example, for Ergodox it can be `ez` or `infinity`, and for Planck `rev3` or `rev4`.
47 * If the keyboard doesn't have a subproject, or if you are happy with the default (defined in `rules.mk` file of the `keyboard` folder), you can leave it out. But remember to also remove the dash (`-`) from the command.
48* `<programmer>` The programmer to use. Most keyboards use `dfu`, but some use `teensy`. Infinity keyboards use `dfu-util`. Check the readme file in the keyboard folder to find out which programmer to use.
49 * If you don't add `-<programmer` to the command line, the firmware will be still be compiled into a hex file, but the upload will be skipped.
50
51**NOTE:** Some operating systems will refuse to program unless you run the make command as root for example `sudo make clueboard-default-dfu`
52
53## Make Examples
54
55* Build all Clueboard keymaps: `make clueboard`
56* Build the default Planck keymap: `make planck-rev4-default`
57* Build and flash your ergodox-ez: `make ergodox-ez-default-teensy`
58
59# The `config.h` file
60
61There are 2 `config.h` locations:
62
63* keyboard (`/keyboards/<keyboard>/`)
64* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/`)
65
66The keyboard `config.h` is included only if the keymap one doesn't exist. The format to use for your custom one [is here](https://github.com/qmk/qmk_firmware/blob/master/doc/keymap_config_h_example.h). If you want to override a setting from the parent `config.h` file, you need to do this:
67
68```c
69#undef MY_SETTING
70#define MY_SETTING 4
71```
72
73For a value of `4` for this imaginary setting. So we `undef` it first, then `define` it.
74
75You can then override any settings, rather than having to copy and paste the whole thing. \ No newline at end of file
diff --git a/docs/report_descriptor.md b/docs/report_descriptor.md
new file mode 100644
index 000000000..fd5e96c67
--- /dev/null
+++ b/docs/report_descriptor.md
@@ -0,0 +1 @@
# Get Report Descriptor with lsusb \ No newline at end of file
diff --git a/docs/space_cadet_shift.md b/docs/space_cadet_shift.md
new file mode 100644
index 000000000..a1ec256de
--- /dev/null
+++ b/docs/space_cadet_shift.md
@@ -0,0 +1,24 @@
1## Space Cadet Shift: The future, built in
2
3Steve Losh [described](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/) the Space Cadet Shift quite well. Essentially, you hit the left Shift on its own, and you get an opening parenthesis; hit the right Shift on its own, and you get the closing one. When hit with other keys, the Shift key keeps working as it always does. Yes, it's as cool as it sounds.
4
5To use it, use `KC_LSPO` (Left Shift, Parens Open) for your left Shift on your keymap, and `KC_RSPC` (Right Shift, Parens Close) for your right Shift.
6
7It's defaulted to work on US keyboards, but if your layout uses different keys for parenthesis, you can define those in your `config.h` like this:
8
9 #define LSPO_KEY KC_9
10 #define RSPC_KEY KC_0
11
12You can also choose between different rollover behaviors of the shift keys by defining:
13
14 #define DISABLE_SPACE_CADET_ROLLOVER
15
16in your `config.h`. Disabling rollover allows you to use the opposite shift key to cancel the space cadet state in the event of an erroneous press instead of emitting a pair of parentheses when the keys are released.
17
18The only other thing you're going to want to do is create a `Makefile` in your keymap directory and set the following:
19
20```
21COMMAND_ENABLE = no # Commands for debug and configuration
22```
23
24This is just to keep the keyboard from going into command mode when you hold both Shift keys at the same time.
diff --git a/docs/tap_dance.md b/docs/tap_dance.md
new file mode 100644
index 000000000..25827a648
--- /dev/null
+++ b/docs/tap_dance.md
@@ -0,0 +1,144 @@
1# Tap Dance: A single key can do 3, 5, or 100 different things
2
3Hit the semicolon key once, send a semicolon. Hit it twice, rapidly -- send a colon. Hit it three times, and your keyboard's LEDs do a wild dance. That's just one example of what Tap Dance can do. It's one of the nicest community-contributed features in the firmware, conceived and created by [algernon](https://github.com/algernon) in [#451](https://github.com/qmk/qmk_firmware/pull/451). Here's how algernon describes the feature:
4
5With this feature one can specify keys that behave differently, based on the amount of times they have been tapped, and when interrupted, they get handled before the interrupter.
6
7To make it clear how this is different from `ACTION_FUNCTION_TAP`, lets explore a certain setup! We want one key to send `Space` on single tap, but `Enter` on double-tap.
8
9With `ACTION_FUNCTION_TAP`, it is quite a rain-dance to set this up, and has the problem that when the sequence is interrupted, the interrupting key will be send first. Thus, `SPC a` will result in `a SPC` being sent, if they are typed within `TAPPING_TERM`. With the tap dance feature, that'll come out as `SPC a`, correctly.
10
11The implementation hooks into two parts of the system, to achieve this: into `process_record_quantum()`, and the matrix scan. We need the latter to be able to time out a tap sequence even when a key is not being pressed, so `SPC` alone will time out and register after `TAPPING_TERM` time.
12
13But lets start with how to use it, first!
14
15First, you will need `TAP_DANCE_ENABLE=yes` in your `Makefile`, because the feature is disabled by default. This adds a little less than 1k to the firmware size. Next, you will want to define some tap-dance keys, which is easiest to do with the `TD()` macro, that - similar to `F()`, takes a number, which will later be used as an index into the `tap_dance_actions` array.
16
17This array specifies what actions shall be taken when a tap-dance key is in action. Currently, there are three possible options:
18
19* `ACTION_TAP_DANCE_DOUBLE(kc1, kc2)`: Sends the `kc1` keycode when tapped once, `kc2` otherwise. When the key is held, the appropriate keycode is registered: `kc1` when pressed and held, `kc2` when tapped once, then pressed and held.
20* `ACTION_TAP_DANCE_FN(fn)`: Calls the specified function - defined in the user keymap - with the final tap count of the tap dance action.
21* `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn)`: Calls the first specified function - defined in the user keymap - on every tap, the second function on when the dance action finishes (like the previous option), and the last function when the tap dance action resets.
22
23The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise.
24
25And that's the bulk of it!
26
27And now, on to the explanation of how it works!
28
29The main entry point is `process_tap_dance()`, called from `process_record_quantum()`, which is run for every keypress, and our handler gets to run early. This function checks whether the key pressed is a tap-dance key. If it is not, and a tap-dance was in action, we handle that first, and enqueue the newly pressed key. If it is a tap-dance key, then we check if it is the same as the already active one (if there's one active, that is). If it is not, we fire off the old one first, then register the new one. If it was the same, we increment the counter and the timer.
30
31This means that you have `TAPPING_TERM` time to tap the key again, you do not have to input all the taps within that timeframe. This allows for longer tap counts, with minimal impact on responsiveness.
32
33Our next stop is `matrix_scan_tap_dance()`. This handles the timeout of tap-dance keys.
34
35For the sake of flexibility, tap-dance actions can be either a pair of keycodes, or a user function. The latter allows one to handle higher tap counts, or do extra things, like blink the LEDs, fiddle with the backlighting, and so on. This is accomplished by using an union, and some clever macros.
36
37### Examples
38
39Here's a simple example for a single definition:
40
411. In your `makefile`, add `TAP_DANCE_ENABLE = yes`
422. In your `config.h` (which you can copy from `qmk_firmware/keyboards/planck/config.h` to your keymap directory), add `#define TAPPING_TERM 200`
433. In your `keymap.c` file, define the variables and definitions, then add to your keymap:
44
45```c
46//Tap Dance Declarations
47enum {
48 TD_ESC_CAPS = 0
49};
50
51//Tap Dance Definitions
52qk_tap_dance_action_t tap_dance_actions[] = {
53 //Tap once for Esc, twice for Caps Lock
54 [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS)
55// Other declarations would go here, separated by commas, if you have them
56};
57
58//In Layer declaration, add tap dance item in place of a key code
59TD(TD_ESC_CAPS)
60```
61
62Here's a more complex example involving custom actions:
63
64```c
65enum {
66 CT_SE = 0,
67 CT_CLN,
68 CT_EGG,
69 CT_FLSH,
70};
71
72/* Have the above three on the keymap, TD(CT_SE), etc... */
73
74void dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) {
75 if (state->count == 1) {
76 register_code (KC_RSFT);
77 register_code (KC_SCLN);
78 } else {
79 register_code (KC_SCLN);
80 }
81}
82
83void dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) {
84 if (state->count == 1) {
85 unregister_code (KC_RSFT);
86 unregister_code (KC_SCLN);
87 } else {
88 unregister_code (KC_SCLN);
89 }
90}
91
92void dance_egg (qk_tap_dance_state_t *state, void *user_data) {
93 if (state->count >= 100) {
94 SEND_STRING ("Safety dance!");
95 reset_tap_dance (state);
96 }
97}
98
99// on each tap, light up one led, from right to left
100// on the forth tap, turn them off from right to left
101void dance_flsh_each(qk_tap_dance_state_t *state, void *user_data) {
102 switch (state->count) {
103 case 1:
104 ergodox_right_led_3_on();
105 break;
106 case 2:
107 ergodox_right_led_2_on();
108 break;
109 case 3:
110 ergodox_right_led_1_on();
111 break;
112 case 4:
113 ergodox_right_led_3_off();
114 _delay_ms(50);
115 ergodox_right_led_2_off();
116 _delay_ms(50);
117 ergodox_right_led_1_off();
118 }
119}
120
121// on the fourth tap, set the keyboard on flash state
122void dance_flsh_finished(qk_tap_dance_state_t *state, void *user_data) {
123 if (state->count >= 4) {
124 reset_keyboard();
125 reset_tap_dance(state);
126 }
127}
128
129// if the flash state didnt happen, then turn off leds, left to right
130void dance_flsh_reset(qk_tap_dance_state_t *state, void *user_data) {
131 ergodox_right_led_1_off();
132 _delay_ms(50);
133 ergodox_right_led_2_off();
134 _delay_ms(50);
135 ergodox_right_led_3_off();
136}
137
138qk_tap_dance_action_t tap_dance_actions[] = {
139 [CT_SE] = ACTION_TAP_DANCE_DOUBLE (KC_SPC, KC_ENT)
140 ,[CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset)
141 ,[CT_EGG] = ACTION_TAP_DANCE_FN (dance_egg)
142 ,[CT_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED (dance_flsh_each, dance_flsh_finished, dance_flsh_reset)
143};
144```
diff --git a/docs/test_for_asciidoc.asciidoc b/docs/test_for_asciidoc.asciidoc
new file mode 100644
index 000000000..ce57d2781
--- /dev/null
+++ b/docs/test_for_asciidoc.asciidoc
@@ -0,0 +1,17 @@
1
2
3
4.Makefile
5[source,Makefile]
6----
7# Build Options
8# comment out to disable the options.
9#
10BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
11MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
12EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
13CONSOLE_ENABLE = yes # Console for debug(+400)
14COMMAND_ENABLE = yes # Commands for debug and configuration
15#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
16NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
17---- \ No newline at end of file
diff --git a/docs/tmk_based_projects.md b/docs/tmk_based_projects.md
new file mode 100644
index 000000000..0597b04c3
--- /dev/null
+++ b/docs/tmk_based_projects.md
@@ -0,0 +1,34 @@
1## TMK based projects
2Add your project here!
3See https://github.com/tmk/tmk_keyboard/issues/173
4
5### keyboards
6**S60-X**: [DIY 60% keyboard](https://www.massdrop.com/buy/sentraq-60-diy-keyboard-kit?mode=guest_open) designed by [VinnyCordeiro](https://github.com/VinnyCordeiro) for Sentraq:
7- https://github.com/VinnyCordeiro/tmk_keyboard
8
9**Octagon V1**: Korean custom keyboard designed by Duck.
10- https://github.com/xauser/tmk_keyboard/tree/xauser
11
12**Compact L3**: Custom keyboard designed by LifeZone and LeeKu.
13- https://github.com/xauser/tmk_keyboard/tree/xauser
14
15**KMAC, 1,2 and Happy**: Custom keyboard designed by kbdmania.
16- https://github.com/ageaenes/tmk_keyboard
17
18**P60**: [DIY wired 60% keyboard](https://imgur.com/a/zwsDN) by [p3lim](https://github.com/p3lim).
19- https://github.com/p3lim/keyboard_firmware
20
21**Nerd, Kitten Paw, Lightsaber, Phantom, Lightpad, Ergodox** on [xauser](https://github.com/xauser)'s repository
22- https://github.com/xauser/tmk_keyboard/tree/xauser
23
24**ErgoDox** on [cub-unanic](https://github.com/cub-uanic)'s repository
25- https://github.com/cub-uanic/tmk_keyboard/tree/master/keyboard/ergodox
26
27**Atreus** by [technomancy](https://atreus.technomancy.us)
28- https://github.com/technomancy/tmk_keyboard/tree/atreus/keyboard/atreus
29
30**[mcdox](https://github.com/DavidMcEwan/mcdox)**
31- https://github.com/DavidMcEwan/tmk_keyboard/tree/master/keyboard/mcdox
32
33
34### converters \ No newline at end of file
diff --git a/docs/tmk_own_projects.md b/docs/tmk_own_projects.md
new file mode 100644
index 000000000..fb5b2c990
--- /dev/null
+++ b/docs/tmk_own_projects.md
@@ -0,0 +1,69 @@
1## TMK own projects by hasu
2Located in [tmk_keyboard](https://github.com/tmk/tmk_keyboard/tree/master/) repository.
3
4### converter
5* [ps2_usb] - [PS/2 keyboard to USB][GH_ps2]
6* [adb_usb] - [ADB keyboard to USB][GH_adb]
7* [m0110_usb] - [Macintosh 128K/512K/Plus keyboard to USB][GH_m0110]
8* [terminal_usb] - [IBM Model M terminal keyboard(PS/2 scancode set3) to USB][GH_terminal]
9* [news_usb] - [Sony NEWS keyboard to USB][GH_news]
10* [x68k_usb] - [Sharp X68000 keyboard to USB][GH_x68k]
11* [sun_usb] - [Sun] to USB(type4, 5 and 3?)
12* [pc98_usb] - [PC98] to USB
13* [usb_usb] - USB to USB(experimental)
14* [ascii_usb] - ASCII(Serial console terminal) to USB
15* [ibm4704_usb] - [IBM 4704 keyboard Converter][GH_ibm4704]
16
17### keyboard
18* [hhkb] - [Happy Hacking Keyboard pro][GH_hhkb]
19* [gh60] - [GH60][GH60_diy] DIY 60% keyboard [prototype][GH60_proto]
20* [hbkb] - [Happy Buckling spring keyboard][GH_hbkb](IBM Model M 60% mod)
21* [hid_liber] - [HID liberation][HID_liber] controller (by alaricljs)
22* [phantom] - [Phantom] keyboard (by Tranquilite)
23* [IIgs_Standard] - Apple [IIGS] keyboard mod(by JeffreySung)
24* [macway] - [Compact keyboard mod][GH_macway] [retired]
25* [KMAC] - Korean custom keyboard
26* [Lightsaber] - Korean custom keyboard
27
28[ps2_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/ps2_usb/
29[adb_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/adb_usb/
30[m0110_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/m0110_usb
31[terminal_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/terminal_usb/
32[news_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/news_usb/
33[x68k_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/x68k_usb/
34[sun_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/sun_usb/
35[pc98_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/pc98_usb/
36[usb_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/usb_usb/
37[ascii_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/ascii_usb/
38[ibm4704_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/ibm4704_usb
39[hhkb]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/hhkb/
40[gh60]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/gh60/
41[hbkb]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/hbkb/
42[hid_liber]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/hid_liber/
43[phantom]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/phantom/
44[IIgs_Standard]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/IIgs/
45[macway]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/macway/
46[KMAC]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/kmac/
47[Lightsaber]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/lightsaber/
48
49[GH_macway]: http://geekhack.org/showwiki.php?title=Island:11930
50[GH_hhkb]: http://geekhack.org/showwiki.php?title=Island:12047
51[GH_ps2]: http://geekhack.org/showwiki.php?title=Island:14618
52[GH_adb]: http://geekhack.org/showwiki.php?title=Island:14290
53[GH_hhkb_bt]: http://geekhack.org/showwiki.php?title=Island:20851
54[GH_m0110]: http://geekhack.org/showwiki.php?title=Island:24965
55[GH_news]: http://geekhack.org/showwiki.php?title=Island:25759
56[GH_terminal]: http://geekhack.org/showwiki.php?title=Island:27272
57[GH_x68k]: http://geekhack.org/showwiki.php?title=Island:29060
58[GH_hbkb]: http://geekhack.org/showwiki.php?title=Island:29483
59[GH_ibm4704]: http://geekhack.org/index.php?topic=54706.0
60[HID_liber]: http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions
61[Phantom]: http://geekhack.org/index.php?topic=26742
62[GH60_diy]: http://geekhack.org/index.php?topic=34959
63[GH60_proto]: http://geekhack.org/index.php?topic=37570.0
64[PC98]: http://en.wikipedia.org/wiki/NEC_PC-9801
65[Sun]: http://en.wikipedia.org/wiki/Sun-3
66[IIGS]: http://en.wikipedia.org/wiki/Apple_IIGS
67
68
69See other [[TMK Based Projects]] \ No newline at end of file
diff --git a/docs/tmk_readme.md b/docs/tmk_readme.md
new file mode 100644
index 000000000..85cf68d57
--- /dev/null
+++ b/docs/tmk_readme.md
@@ -0,0 +1,243 @@
1# TMK Documenation
2
3Features
4--------
5These features can be used in your keyboard.
6
7* Multi-layer Keymap - Multiple keyboard layouts with layer switching
8* Mouse key - Mouse control with keyboard
9* System Control Key - Power Down, Sleep, Wake Up and USB Remote Wake up
10* Media Control Key - Volume Down/Up, Mute, Next/Prev track, Play, Stop and etc
11* USB NKRO - 120 keys(+ 8 modifiers) simultaneously
12* PS/2 mouse support - PS/2 mouse(TrackPoint) as composite device
13* Keyboard protocols - PS/2, ADB, M0110, Sun and other old keyboard protocols
14* User Function - Customizable function of key with writing code
15* Macro - Very primitive at this time
16* Keyboard Tricks - Oneshot modifier and modifier with tapping feature
17* Debug Console - Messages for debug and interaction with firmware
18* Virtual DIP Switch - Configurations stored EEPROM(Boot Magic)
19* Locking CapsLock - Mechanical switch support for CapsLock
20* Breathing Sleep LED - Sleep indicator with charm during USB suspend
21* Backlight - Control backlight levels
22
23
24
25Projects
26--------
27You can find some keyboard specific projects under `converter` and `keyboard` directory.
28
29## Main projects
30
31### OLKB products
32* [planck](keyboards/planck/) - [Planck] Ortholinear 40% keyboard
33* [preonic](keyboards/preonic/) - [Preonic] Ortholinear 50% keyboard
34* [atomic](keyboards/atomic/) - [Atomic] Ortholinear 60% keyboard
35
36### Ergodox EZ
37* [ergodox_ez](keyboards/ergodox/ez) - [Ergodox_EZ] Assembled split keyboard
38
39## Other projects
40
41### converter
42* [ps2_usb](converter/ps2_usb/) - [PS/2 keyboard to USB][GH_ps2]
43* [adb_usb](converter/adb_usb/) - [ADB keyboard to USB][GH_adb]
44* [m0110_usb](converter/m0110_usb) - [Macintosh 128K/512K/Plus keyboard to USB][GH_m0110]
45* [terminal_usb](converter/terminal_usb/) - [IBM Model M terminal keyboard(PS/2 scancode set3) to USB][GH_terminal]
46* [news_usb](converter/news_usb/) - [Sony NEWS keyboard to USB][GH_news]
47* [x68k_usb](converter/x68k_usb/) - [Sharp X68000 keyboard to USB][GH_x68k]
48* [sun_usb](converter/sun_usb/) - [Sun] to USB(type4, 5 and 3?)
49* [pc98_usb](converter/pc98_usb/) - [PC98] to USB
50* [usb_usb](converter/usb_usb/) - USB to USB(experimental)
51* [ascii_usb](converter/ascii_usb/) - ASCII(Serial console terminal) to USB
52* [ibm4704_usb](converter/ibm4704_usb) - [IBM 4704 keyboard Converter][GH_ibm4704]
53
54### keyboard
55* [hhkb](keyboards/hhkb/) - [Happy Hacking Keyboard pro][GH_hhkb] hasu's main board
56* [gh60](keyboards/gh60/) - [GH60] DIY 60% keyboard [prototype][GH60_proto] hasu's second board
57* [hbkb](keyboards/hbkb/) - [Happy Buckling spring keyboard][GH_hbkb](IBM Model M 60% mod)
58* [hid_liber](keyboards/hid_liber/) - [HID liberation][HID_liber] controller (by alaricljs)
59* [phantom](keyboards/phantom/) - [Phantom] keyboard (by Tranquilite)
60* [IIgs_Standard](keyboards/IIgs/) - Apple [IIGS] keyboard mod(by JeffreySung)
61* [macway](keyboards/macway/) - [Compact keyboard mod][GH_macway] [retired]
62* [KMAC](keyboards/kmac/) - Korean custom keyboard
63* [Lightsaber](keyboards/lightsaber/) - Korean custom keyboard
64* [Infinity](keyboards/infinity/) - Massdrop [Infinity keyboard][Infinity]
65* [NerD](keyboards/nerd/) - Korean custom keyboard
66* [KittenPaw](keyboards/kitten_paw) - Custom Majestouch controller
67* [Lightpad](keyboards/lightpad) - Korean custom keypad
68* [ghost_squid](keyboards/ghost_squid/) - [The Ghost Squid][ghost_squid] controller for [Cooler Master QuickFire XT][cmxt]
69
70### Extenal projects using tmk_keyboard
71* [ErgoDox_cub-uanic][cub-uanic] - Split Ergonomic Keyboard [ErgoDox][ergodox_org]
72* [mcdox][mcdox_tmk] - [mcdox][mcdox]
73
74
75[GH_macway]: http://geekhack.org/showwiki.php?title=Island:11930
76[GH_hhkb]: http://geekhack.org/showwiki.php?title=Island:12047
77[GH_ps2]: http://geekhack.org/showwiki.php?title=Island:14618
78[GH_adb]: http://geekhack.org/showwiki.php?title=Island:14290
79[GH_hhkb_bt]: http://geekhack.org/showwiki.php?title=Island:20851
80[GH_m0110]: http://geekhack.org/showwiki.php?title=Island:24965
81[GH_news]: http://geekhack.org/showwiki.php?title=Island:25759
82[GH_terminal]: http://geekhack.org/showwiki.php?title=Island:27272
83[GH_x68k]: http://geekhack.org/showwiki.php?title=Island:29060
84[GH_hbkb]: http://geekhack.org/showwiki.php?title=Island:29483
85[GH_ibm4704]: http://geekhack.org/index.php?topic=54706.0
86[HID_liber]: http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions
87[Phantom]: http://geekhack.org/index.php?topic=26742
88[GH60]: http://geekhack.org/index.php?topic=34959
89[GH60_proto]: http://geekhack.org/index.php?topic=37570.0
90[PC98]: http://en.wikipedia.org/wiki/NEC_PC-9801
91[Sun]: http://en.wikipedia.org/wiki/Sun-3
92[IIGS]: http://en.wikipedia.org/wiki/Apple_IIGS
93[Infinity]: https://www.massdrop.com/buy/infinity-keyboard-kit
94[ghost_squid]: http://deskthority.net/wiki/Costar_replacement_controllers#The_Ghost_Squid
95[cmxt]: http://gaming.coolermaster.com/en/products/keyboard/quickfirext/
96[ergodox_org]: http://ergodox.org/
97[cub-uanic]: https://github.com/cub-uanic/tmk_keyboard/tree/master/keyboard/ergodox
98[mcdox]: https://github.com/DavidMcEwan/mcdox
99[mcdox_tmk]: https://github.com/DavidMcEwan/tmk_keyboard/tree/master/keyboard/mcdox
100[Planck]: http://olkb.co/planck
101[Preonic]: http://olkb.co/preonic
102[Atomic]: http://olkb.co/atomic
103[Ergodox_EZ]: https://www.indiegogo.com/projects/ergodox-ez-an-incredible-mechanical-keyboard
104
105
106License
107-------
108**GPLv2** or later. Some protocol files are under **Modified BSD License**.
109
110Third party libraries like LUFA, PJRC and V-USB have their own license respectively.
111
112
113
114Build Firmware and Program Controller
115-------------------------------------
116See [build environment setup](build_environment_setup.md), or the readme in the particular keyboards/* folder.
117
118
119
120Change your keymap
121------------------
122See [keymap.md](keymap.md).
123
124
125
126Magic Commands
127--------------
128To see help press `Magic` + `H`.
129
130`Magic` key combination is `LShift` + `RShift` in many project, but `Power` key on ADB converter.
131`Magic` keybind can be vary on each project, check `config.h` in project directory.
132
133Following commands can be also executed with `Magic` + key. In console mode `Magic` keybind is not needed.
134
135 ----- Command Help -----
136 c: enter console mode
137 d: toggle debug enable
138 x: toggle matrix debug
139 k: toggle keyboard debug
140 m: toggle mouse debug
141 v: print device version & info
142 t: print timer count
143 s: print status
144 e: print eeprom config
145 n: toggle NKRO
146 0/F10: switch to Layer0
147 1/F1: switch to Layer1
148 2/F2: switch to Layer2
149 3/F3: switch to Layer3
150 4/F4: switch to Layer4
151 PScr: power down/remote wake-up
152 Caps: Lock Keyboard(Child Proof)
153 Paus: jump to bootloader
154
155
156
157Boot Magic Configuration - Virtual DIP Switch
158---------------------------------------------
159Boot Magic are executed during boot up time. Press Magic key below then plug in keyboard cable.
160Note that you must use keys of **Layer 0** as Magic keys. These settings are stored in EEPROM so that retain your configure over power cycles.
161
162To avoid configuring accidentally additive salt key `KC_SPACE` also needs to be pressed along with the following configuration keys. The salt key is configurable in `config.h`. See [tmk_core/common/bootmagic.h](/tmk_core/common/bootmagic.h).
163
164#### General
165- Skip reading EEPROM to start with default configuration(`ESC`)
166- Clear configuration stored in EEPROM to reset configuration(`Backspace`)
167
168#### Bootloader
169- Kick up Bootloader(`B`)
170
171#### Debug
172- Debug enable(`D`)
173- Debug matrix enable(`D`+`X`)
174- Debug keyboard enable(`D`+`K`)
175- Debug mouse enable(`D`+`M`)
176
177#### Keymap
178- Swap Control and CapsLock(`Left Control`)
179- Change CapsLock to Control(`Caps Lock`)
180- Swap LeftAlt and Gui(`Left Alt`)
181- Swap RightAlt and Gui(`Right Alt`)
182- Disable Gui(`Left Gui`)
183- Swap Grave and Escape(`Grave`)
184- Swap BackSlash and BackSpace(`Back Slash`)
185- Enable NKRO on boot(`N`)
186
187#### Default Layer
188- Set Default Layer to 0(`0`)
189- Set Default Layer to 1(`1`)
190- Set Default Layer to 2(`2`)
191- Set Default Layer to 3(`3`)
192- Set Default Layer to 4(`4`)
193- Set Default Layer to 5(`5`)
194- Set Default Layer to 6(`6`)
195- Set Default Layer to 7(`7`)
196
197
198
199Mechanical Locking support
200--------------------------
201This feature makes it possible for you to use mechanical locking switch for `CapsLock`, `NumLock`
202or `ScrollLock`. To enable this feature define these macros in `config.h` and use `KC_LCAP`, `KC_LN
203UM` or `KC_LSCR` in keymap for locking key instead of normal `KC_CAPS`, `KC_NLCK` or `KC_SLCK`. Res
204ync option tries to keep switch state consistent with keyboard LED state.
205
206 #define LOCKING_SUPPORT_ENABLE
207 #define LOCKING_RESYNC_ENABLE
208
209
210
211Start Your Own Project
212-----------------------
213**TBD**
214
215
216
217Debugging
218--------
219Use PJRC's `hid_listen` to see debug messages. You can use the tool for debug even if firmware use LUFA stack.
220
221You can use xprintf() to display debug info on `hid_listen`, see `tmk_core/common/xprintf.h`.
222
223
224
225Files and Directories
226-------------------
227### Top
228* tmk_core/ - core library
229* keyboards/ - keyboard projects
230* converter/ - protocol converter projects
231* doc/ - documents
232
233
234
235Coding Style
236-------------
237- Doesn't use Tab to indent, use 4-spaces instead.
238
239
240
241Other Keyboard Firmware Projects
242------------------
243You can learn a lot about keyboard firmware from these. See [docs/other_projects.md](other_projects.md).
diff --git a/docs/unicode_and_additional_language_support.md b/docs/unicode_and_additional_language_support.md
new file mode 100644
index 000000000..562dae4b5
--- /dev/null
+++ b/docs/unicode_and_additional_language_support.md
@@ -0,0 +1,54 @@
1## Unicode support
2
3There are three Unicode keymap definition method available in QMK:
4
5### UNICODE_ENABLE
6
7Supports Unicode input up to 0xFFFF. The keycode function is `UC(n)` in
8keymap file, where *n* is a 4 digit hexadecimal.
9
10### UNICODEMAP_ENABLE
11
12Supports Unicode up to 0xFFFFFFFF. You need to maintain a separate mapping
13table `const uint32_t PROGMEM unicode_map[] = {...}` in your keymap file.
14The keycode function is `X(n)` where *n* is the array index of the mapping
15table.
16
17### UCIS_ENABLE
18
19TBD
20
21Unicode input in QMK works by inputing a sequence of characters to the OS,
22sort of like macro. Unfortunately, each OS has different ideas on how Unicode is inputted.
23
24This is the current list of Unicode input method in QMK:
25
26* UC_OSX: MacOS Unicode Hex Input support. Works only up to 0xFFFF. Disabled by default. To enable: go to System Preferences -> Keyboard -> Input Sources, and enable Unicode Hex.
27* UC_LNX: Unicode input method under Linux. Works up to 0xFFFFF. Should work almost anywhere on ibus enabled distros. Without ibus, this works under GTK apps, but rarely anywhere else.
28* UC_WIN: (not recommended) Windows built-in Unicode input. To enable: create registry key under `HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad` of type `REG_SZ` called `EnableHexNumpad`, set its value to 1, and reboot. This method is not recommended because of reliability and compatibility issue, use WinCompose method below instead.
29* UC_WINC: Windows Unicode input using WinCompose. Requires [WinCompose](https://github.com/samhocevar/wincompose). Works reliably under many (all?) variations of Windows.
30
31## Additional language support
32
33In `quantum/keymap_extras/`, you'll see various language files - these work the same way as the alternative layout ones do. Most are defined by their two letter country/language code followed by an underscore and a 4-letter abbreviation of its name. `FR_UGRV` which will result in a `ù` when using a software-implemented AZERTY layout. It's currently difficult to send such characters in just the firmware.
34
35## International Characters on Windows
36
37[AutoHotkey](https://autohotkey.com) allows Windows users to create custom hotkeys among others.
38
39The method does not require Unicode support in the keyboard itself but depends instead of AutoHotkey running in the background.
40
41First you need to select a modifier combination that is not in use by any of your programs.
42CtrlAltWin is not used very widely and should therefore be perfect for this.
43There is a macro defined for a mod-tab combo `LCAG_T`.
44Add this mod-tab combo to a key on your keyboard, e.g.: `LCAG_T(KC_TAB)`.
45This makes the key behave like a tab key if pressed and released immediately but changes it to the modifier if used with another key.
46
47In the default script of AutoHotkey you can define custom hotkeys.
48
49 <^<!<#a::Send, ä
50 <^<!<#<+a::Send, Ä
51
52The hotkeys above are for the combination CtrlAltGui and CtrlAltGuiShift plus the letter a.
53AutoHotkey inserts the Text right of `Send, ` when this combination is pressed.
54
diff --git a/docs/unit_testing.md b/docs/unit_testing.md
new file mode 100644
index 000000000..3eac62509
--- /dev/null
+++ b/docs/unit_testing.md
@@ -0,0 +1,68 @@
1# Unit Testing
2
3If you are new to unit testing, then you can find many good resources on internet. However most of it is scattered around in small pieces here and there, and there's also many different opinions, so I won't give any recommendations.
4
5Instead I recommend these two books, explaining two different styles of Unit Testing in detail.
6
7* "Test Driven Development: By Example: Kent Beck"
8* "Growing Object-Oriented Software, Guided By Tests: Steve Freeman, Nat Pryce"
9
10If you prefer videos there are Uncle Bob's [Clean Coders Videos](https://cleancoders.com/), which unfortunately cost quite a bit, especially if you want to watch many of them. But James Shore has a free [Let's Play](http://www.jamesshore.com/Blog/Lets-Play) video series.
11
12## Google Test and Google Mock
13It's possible to Unit Test your code using [Google Test](https://github.com/google/googletest). The Google Test framework also includes another component for writing testing mocks and stubs, called "Google Mock". For information how to write the actual tests, please refer to the documentation on that site.
14
15## Use of C++
16
17Note that Google Test and therefore any test has to be written in C++, even if the rest of the QMK codebases is written in C. This should hopefully not be a problem even if you don't know any C++, since there's quite clear documentation and examples of the required C++ features, and you can write the rest of the test code almost as you would write normal C. Note that some compiler errors which you might get can look quite scary, but just read carefully what it says, and you should be ok.
18
19One thing to remember, is that you have to append `extern "C"` around all of your C file includes.
20
21## Adding tests for new or existing features
22
23If you want to unit test some feature, then take a look at the existing serial_link tests, in the `quantum/serial_link/tests folder`, and follow the steps below to create a similar structure.
24
251. If it doesn't already exist, add a test subfolder to the folder containing the feature.
262. Create a `testlist.mk` and a `rules.mk` file in that folder.
273. Include those files from the root folder `testlist.mk`and `build_test.mk` respectively.
284. Add a new name for your testgroup to the `testlist.mk` file. Each group defined there will be a separate executable. And that's how you can support mocking out different parts. Note that it's worth adding some common prefix, just like it's done for the serial_link tests. The reason for that is that the make command allows substring filtering, so this way you can easily run a subset of the tests.
295. Define the source files and required options in the `rules.mk` file.
30 * `_SRC` for source files
31 * `_DEFS` for additional defines
32 * `_INC` for additional include folders
336. Write the tests in a new cpp file inside the test folder you created. That file has to be one of the files included from the `rules.mk` file.
34
35Note how there's several different tests, each mocking out a separate part. Also note that each of them only compiles the very minimum that's needed for the tests. It's recommend that you try to do the same. For a relevant video check out [Matt Hargett "Advanced Unit Testing in C & C++](https://www.youtube.com/watch?v=Wmy6g-aVgZI)
36
37## Running the tests
38
39To run all the tests in the codebase, type `make test`. You can also run test matching a substring by typing `make test-matchingsubstring` Note that the tests are always compiled with the native compiler of your platform, so they are also run like any other program on your computer.
40
41## Debugging the tests
42
43If there are problems with the tests, you can find the executable in the `./build/test` folder. You should be able to run those with GDB or a similar debugger.
44
45## Full Integration tests
46
47It's not yet possible to do a full integration test, where you would compile the whole firmware and define a keymap that you are going to test. However there are plans for doing that, because writing tests that way would probably be easier, at least for people that are not used to unit testing.
48
49In that model you would emulate the input, and expect a certain output from the emulated keyboard.
50
51# Tracing variables
52
53Sometimes you might wonder why a variable gets changed and where, and this can be quite tricky to track down without having a debugger. It's of course possible to manually add print statements to track it, but you can also enable the variable trace feature. This works for both for variables that are changed by the code, and when the variable is changed by some memory corruption.
54
55To take the feature into use add `VARIABLE_TRACE=x` to the end of you make command. `x` represents the number of variables you want to trace, which is usually 1.
56
57Then at a suitable place in the code, call `ADD_TRACED_VARIABLE`, to begin the tracing. For example to trace all the layer changes, you can do this
58```c
59void matrix_init_user(void) {
60 ADD_TRACED_VARIABLE("layer", &layer_state, sizeof(layer_state));
61}
62```
63
64This will add a traced variable named "layer" (the name is just for your information), which tracks the memory location of `layer_state`. It tracks 4 bytes (the size of `layer_state`), so any modification to the variable will be reported. By default you can not specify a size bigger than 4, but you can change it by adding `MAX_VARIABLE_TRACE_SIZE=x` to the end of the make command line.
65
66In order to actually detect changes to the variables you should call `VERIFY_TRACED_VARIABLES` around the code that you think that modifies the variable. If a variable is modified it will tell you between which two `VERIFY_TRACED_VARIABLES` calls the modification happened. You can then add more calls to track it down further. I don't recommend spamming the codebase with calls. It's better to start with a few, and then keep adding them in a binary search fashion. You can also delete the ones you don't need, as each call need to store the file name and line number in the ROM, so you can run out of memory if you add too many calls.
67
68Also remember to delete all the tracing code once you have found the bug, as you wouldn't want to create a pull request with tracing code. \ No newline at end of file
diff --git a/docs/usb_hid.md b/docs/usb_hid.md
new file mode 100644
index 000000000..1d0c45869
--- /dev/null
+++ b/docs/usb_hid.md
@@ -0,0 +1,11 @@
1# Getting Report Descriptor
2```
3 $ cd /sys/bus/usb/drivers/usbhid
4 $ ls
5 1-1.3.4:1.0 1-1.3.4:1.2 bind new_id uevent
6 1-1.3.4:1.1 1-1.3.4:1.3 module remove_id unbind
7 $ echo -n 1-1.4\:1.0 | sudo tee unbind
8 $ sudo lsusb -vvv -d 046d:c01d
9 $ echo -n 1-1.4\:1.0 | sudo tee bind
10```
11
diff --git a/docs/usb_nkro.txt b/docs/usb_nkro.txt
new file mode 100644
index 000000000..d9f1d1229
--- /dev/null
+++ b/docs/usb_nkro.txt
@@ -0,0 +1,160 @@
1USB NKRO MEMO
2=============
32010/12/09
4
5
6References
7----------
8USB - boot mode, NKRO, compatibility, etc...
9 http://geekhack.org/showthread.php?t=13162
10NKey Rollover - Overview, Testing Methodology, and Results
11 http://geekhack.org/showwiki.php?title=NKey+Rollover+-+Overview+Testing+Methodology+and+Results
12dfj's NKRO(2010/06)
13 http://geekhack.org/showpost.php?p=191195&postcount=251
14 http://geekhack.org/showthread.php?p=204389#post204389
15
16
17Terminology
18---------
19NKRO
20ghost
21matrix
22mechanical with diodes
23membrane
24
25
26OS Support Status
27-----------------
28USB NKRO is possible *without* a custom driver.
29At least following OS's supports.
30 Windows7 64bit
31 WindowsXP
32 Windows2000 SP4
33 Ubuntu10.4(Linux 2.6)
34 MacOSX(To be tested)
35
36
37Custom Driver for USB NKRO
38--------------------------
39NOT NEEDED
40at least when using following report formats on Windows, Linux or MacOSX.
41
42
43USB NKRO methods
44----------------
451. Virtual keyboards
46 Keyboard can increase its KRO by using virtual keyboards with Standard or Extended report.
47 If the keyboard has 2 virtual keyboard with Standard report(6KRO), it gets 12KRO.
48 Using this method means the keyboard is a composite device.
49
502. Extended report
51 It needs large report size for this method to achieve NKRO.
52 If a keyboard has 101keys, it needs 103byte report. It seems to be inefficient.
53
543. Bitmap report
55 If the keyboard has less than 128keys, 16byte report will be enough for NKRO.
56 The 16byte report seems to be reasonable cost to get NKRO.
57
58
59Report Format
60-------------
61Other report formats than followings are possible, though these format are typical one.
62
631. Standard 8bytes
64 modifiers(bitmap) 1byte
65 reserved 1byte(not used)
66 keys(array) 1byte*6
67Standard report can send 6keys plus 8modifiers simultaneously.
68Standard report is used by most keyboards in the marketplace.
69Standard report is identical to boot protocol report.
70Standard report is hard to suffer from compatibility problems.
71
722. Extended standard 16,32,64bytes
73 modifiers(bitmap) 1byte
74 reserved 1byte(not used)
75 keys(array) 1byte*(14,32,62)
76Extended report can send N-keys by using N+2bytes.
77Extended report is expected to be compatible with boot protocol.
78
793. Bitmap 16,32,64bytes
80 keys(bitmap) (16,32)bytes
81Bitmap report can send at most 128keys by 16bytes and 256keys by 32bytes.
82Bitmap report can achieve USB NKRO efficiently in terms of report size.
83Bitmap report needs a deliberation for boot protocol implementation.
84Bitmap report descriptor sample:
85 0x05, 0x01, // Usage Page (Generic Desktop),
86 0x09, 0x06, // Usage (Keyboard),
87 0xA1, 0x01, // Collection (Application),
88 // bitmap of modifiers
89 0x75, 0x01, // Report Size (1),
90 0x95, 0x08, // Report Count (8),
91 0x05, 0x07, // Usage Page (Key Codes),
92 0x19, 0xE0, // Usage Minimum (224),
93 0x29, 0xE7, // Usage Maximum (231),
94 0x15, 0x00, // Logical Minimum (0),
95 0x25, 0x01, // Logical Maximum (1),
96 0x81, 0x02, // Input (Data, Variable, Absolute), ;Modifier byte
97 // LED output report
98 0x95, 0x05, // Report Count (5),
99 0x75, 0x01, // Report Size (1),
100 0x05, 0x08, // Usage Page (LEDs),
101 0x19, 0x01, // Usage Minimum (1),
102 0x29, 0x05, // Usage Maximum (5),
103 0x91, 0x02, // Output (Data, Variable, Absolute),
104 0x95, 0x01, // Report Count (1),
105 0x75, 0x03, // Report Size (3),
106 0x91, 0x03, // Output (Constant),
107 // bitmap of keys
108 0x95, (REPORT_BYTES-1)*8, // Report Count (),
109 0x75, 0x01, // Report Size (1),
110 0x15, 0x00, // Logical Minimum (0),
111 0x25, 0x01, // Logical Maximum(1),
112 0x05, 0x07, // Usage Page (Key Codes),
113 0x19, 0x00, // Usage Minimum (0),
114 0x29, (REPORT_BYTES-1)*8-1, // Usage Maximum (),
115 0x81, 0x02, // Input (Data, Variable, Absolute),
116 0xc0 // End Collection
117where REPORT_BYTES is a report size in bytes.
118
119
120Considerations
121--------------
122Compatibility
123 boot protocol
124 minor/old system
125 Some BIOS doesn't send SET_PROTOCOL request, a keyboard can't switch to boot protocol mode.
126 This may cause a problem on a keyboard which uses other report than Standard.
127Reactivity
128 USB polling time
129 OS/Driver processing time
130
131
132Windows Problem
133---------------
1341. Windows accepts only 6keys in case of Standard report.
135 It should be able to send 6keys plus 8modifiers.
1362. Windows accepts only 10keys in case of 16bytes Extended report.
137 It should be able to send 14keys plus 8modifiers.
1383. Windows accepts only 18keys in case of 32bytes Extended report.
139 It should be able to send 30keys plus 8modifiers.
140If keys are pressed in excess of the number, wrong keys are registered on Windows.
141
142This problem will be reportedly fixed soon.(2010/12/05)
143 http://forums.anandtech.com/showpost.php?p=30873364&postcount=17
144
145
146Tools for testing NKRO
147----------------------
148Browser App:
149http://www.microsoft.com/appliedsciences/content/projects/KeyboardGhostingDemo.aspx
150http://random.xem.us/rollover.html
151
152Windows:
153AquaKeyTest.exe http://geekhack.org/showthread.php?t=6643
154
155Linux:
156xkeycaps
157xev
158showkeys
159
160EOF
diff --git a/docs/vagrant_guide.md b/docs/vagrant_guide.md
new file mode 100644
index 000000000..61cd0815b
--- /dev/null
+++ b/docs/vagrant_guide.md
@@ -0,0 +1,27 @@
1# Quick Start Directions
2
3This project includes a Vagrantfile that will allow you to build a new firmware for your keyboard very easily without major changes to your primary operating system. This also ensures that when you clone the project and perform a build, you have the exact same environment as anyone else using the Vagrantfile to build. This makes it much easier for people to help you troubleshoot any issues you encounter.
4
5## Requirements
6
7Using the `/Vagrantfile` in this repository requires you have [Vagrant](http://www.vagrantup.com/) as well as [VirtualBox](https://www.virtualbox.org/) (or [VMware Workstation](https://www.vmware.com/products/workstation) and [Vagrant VMware plugin](http://www.vagrantup.com/vmware) but the (paid) VMware plugin requires a licensed copy of VMware Workstation/Fusion).
8
9*COMPATIBILITY NOTICE* Certain versions of Virtualbox 5 appear to have an incompatibility with the Virtualbox extensions installed in the boxes in this Vagrantfile. If you encounter any issues with the /vagrant mount not succeeding, please upgrade your version of Virtualbox to at least 5.0.12. **Alternately, you can try running the following command:** `vagrant plugin install vagrant-vbguest`
10
11
12Other than having Vagrant and Virtualbox installed and possibly a restart of your computer afterwards, you can simple run a 'vagrant up' anywhere inside the folder where you checked out this project and it will start a Linux virtual machine that contains all the tools required to build this project. There is a post Vagrant startup hint that will get you off on the right foot, otherwise you can also reference the build documentation below.
13
14Build Firmware and Program Controller
15-------------------------------------
16See [build_guide.md](build_guide.md), or the readme in the particular keyboards/* folder.
17
18Change your keymap
19------------------
20See [keymap.md](keymap.md).
21
22## Flashing the firmware
23
24The "easy" way to flash the firmware is using a tool from your host OS like the Teensy programming app. [ErgoDox EZ](/keyboards/ergodox/readme.md) gives a great example.
25
26If you want to program via the command line you can uncomment the ['modifyvm'] lines in the Vagrantfile to enable the USB passthrough into Linux and then program using the command line tools like dfu-util/dfu-programmer or you can install the Teensy CLI version.
27