Compare commits
139 Commits
0.5.137
...
subvendor_
Author | SHA1 | Date | |
---|---|---|---|
|
522876dc5a | ||
|
f2991c639d | ||
|
c31070dd3f | ||
|
392121b10e | ||
|
0533362e82 | ||
|
4df4fa7c26 | ||
|
66f13e4972 | ||
|
bb11df6b7a | ||
|
e236f1eba1 | ||
|
847ade44fc | ||
|
7044dafe59 | ||
|
fd1a0d6753 | ||
|
c2c9d9b386 | ||
|
05f15b789f | ||
|
7e2223f822 | ||
|
3b5381d689 | ||
|
aee6785476 | ||
|
363aa8aa2e | ||
|
ef2961798c | ||
|
3e861c2fd5 | ||
|
f113f1927f | ||
|
27ee425892 | ||
|
89357b96d4 | ||
|
16843bc8c9 | ||
|
7854746704 | ||
|
245b3376d6 | ||
|
2c703b1528 | ||
|
90a6fea4e8 | ||
|
e45290a62e | ||
|
1d3a19757c | ||
|
cf9f6bbd91 | ||
|
41df0dc9a7 | ||
|
30dc34d529 | ||
|
e899cb8940 | ||
|
80e489e122 | ||
|
29d1abff07 | ||
|
b546da0a19 | ||
|
f357bd0ccc | ||
|
685d4c2f97 | ||
|
535c2f60a9 | ||
|
65eaab8a1a | ||
|
18f3cd1123 | ||
|
e45ce2dcb3 | ||
|
137456e5b1 | ||
|
ec59147507 | ||
|
074b78700a | ||
|
432674781a | ||
|
4e41beeaa6 | ||
|
00733f4b87 | ||
|
19753788c1 | ||
|
54a8abd785 | ||
|
d6ad9787a0 | ||
|
e2e387f8f8 | ||
|
039cc8c932 | ||
|
004826e1b8 | ||
|
f445a7f971 | ||
|
13e1388f2d | ||
|
fe56fffe7d | ||
|
d069a42c07 | ||
|
029234f1f1 | ||
|
ddf49e8b21 | ||
|
371922ad61 | ||
|
f868a3bb86 | ||
|
5329a80f6c | ||
|
32bb8f6b8a | ||
|
1683d3a559 | ||
|
b79a4cfeba | ||
|
44d9ad95b7 | ||
|
fad967af4c | ||
|
20e18d15e3 | ||
|
83af62322c | ||
|
2d77f9cbb9 | ||
|
c9a0436422 | ||
|
fca03e15b9 | ||
|
bc98b0d9eb | ||
|
38261920a9 | ||
|
f9881793e3 | ||
|
04b9b62bdc | ||
|
b2bbbc2dfc | ||
|
6169cd52ba | ||
|
101b998ac2 | ||
|
7b65b7e948 | ||
|
4c1164c469 | ||
|
e555e42aae | ||
|
38da7795f4 | ||
|
8c10b60c5f | ||
|
c8fca10f0d | ||
|
1f6002db3f | ||
|
07017871e5 | ||
|
f4949fdd32 | ||
|
750f8ec94e | ||
|
49c32021db | ||
|
76d807fe7d | ||
|
bf1fedc05e | ||
|
5960d0349c | ||
|
0afaed8535 | ||
|
688343f218 | ||
|
4d421ee31c | ||
|
91683d56fa | ||
|
9ee207acac | ||
|
0bb457e573 | ||
|
364aeeec53 | ||
|
2e3b99f7f1 | ||
|
bcfba27101 | ||
|
b45b223389 | ||
|
7b754e1a5a | ||
|
a3f53aeaa1 | ||
|
6c4639bfac | ||
|
67cc5cebc0 | ||
|
8892c50336 | ||
|
9128ed50c2 | ||
|
1f43495922 | ||
|
21dfa29c28 | ||
|
4c960ad7c4 | ||
|
a08287b0a0 | ||
|
af83c6a4cb | ||
|
e54c8df453 | ||
|
c2b8a47604 | ||
|
07ec609fad | ||
|
a66e75609e | ||
|
f3534f999f | ||
|
22564d8ee7 | ||
|
736140439d | ||
|
725aa5b820 | ||
|
06f196c589 | ||
|
9bb259b660 | ||
|
ab3dbd8daa | ||
|
1954ad1fd8 | ||
|
3276c4c56a | ||
|
3a1ce56aed | ||
|
2f24ed1046 | ||
|
50a4b3510b | ||
|
57bf00f28f | ||
|
b25338a809 | ||
|
78923cb884 | ||
|
a860d9d628 | ||
|
b5464cf20a | ||
|
383e508bc5 | ||
|
3f3fa07918 |
18
.editorconfig
Normal file
18
.editorconfig
Normal file
@ -0,0 +1,18 @@
|
||||
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
|
||||
# editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
# We recommend you to keep these unchanged
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
indent_size = 4
|
10
.gitignore
vendored
10
.gitignore
vendored
@ -4,6 +4,7 @@
|
||||
*.eep
|
||||
*.elf
|
||||
*.hex
|
||||
*.qmk
|
||||
!util/bootloader.hex
|
||||
!quantum/tools/eeprom_reset.hex
|
||||
*.log
|
||||
@ -21,12 +22,20 @@ build/
|
||||
quantum/version.h
|
||||
.idea/
|
||||
CMakeLists.txt
|
||||
cmake-build-debug
|
||||
.DS_STORE
|
||||
/util/wsl_downloaded
|
||||
/util/win_downloaded
|
||||
/keyboards/*/Makefile
|
||||
/keyboards/*/*/Makefile
|
||||
/keyboards/*/*/*/Makefile
|
||||
/keyboards/*/*/*/*/Makefile
|
||||
/keyboards/*/*/*/*/*/Makefile
|
||||
/keyboards/*/keymaps/Makefile
|
||||
/keyboards/*/*/keymaps/Makefile
|
||||
/keyboards/*/*/*/keymaps/Makefile
|
||||
/keyboards/*/*/*/*/keymaps/Makefile
|
||||
/keyboards/*/*/*/*/*/keymaps/Makefile
|
||||
|
||||
# Eclipse/PyCharm/Other IDE Settings
|
||||
.cproject
|
||||
@ -37,6 +46,7 @@ CMakeLists.txt
|
||||
*.stackdump
|
||||
util/Win_Check_Output.txt
|
||||
# Let these ones be user specific, since we have so many different configurations
|
||||
.vscode/c_cpp_properties.json
|
||||
.vscode/launch.json
|
||||
.vscode/tasks.json
|
||||
.vscode/last.sql
|
||||
|
6
.vscode/extensions.json
vendored
Normal file
6
.vscode/extensions.json
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
// Suggested extensions
|
||||
{
|
||||
"recommendations": [
|
||||
"EditorConfig.EditorConfig"
|
||||
]
|
||||
}
|
@ -183,6 +183,10 @@ else
|
||||
# this state should never be reached
|
||||
endif
|
||||
|
||||
# User space stuff
|
||||
USER_PATH := users/$(KEYMAP)
|
||||
-include $(USER_PATH)/rules.mk
|
||||
|
||||
# Object files directory
|
||||
# To put object files in current directory, use a dot (.), do NOT make
|
||||
# this an empty or blank macro!
|
||||
@ -204,6 +208,7 @@ SRC += $(KEYBOARD_SRC) \
|
||||
VPATH += $(KEYMAP_PATH)
|
||||
VPATH += $(KEYBOARD_PATHS)
|
||||
VPATH += $(COMMON_VPATH)
|
||||
VPATH += $(USER_PATH)
|
||||
|
||||
include common_features.mk
|
||||
include $(TMK_PATH)/protocol.mk
|
||||
|
@ -70,6 +70,8 @@ ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
|
||||
OPT_DEFS += -DPOINTING_DEVICE_ENABLE
|
||||
OPT_DEFS += -DMOUSE_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/pointing_device.c
|
||||
endif
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
* [Install Build Tools](getting_started_build_tools.md)
|
||||
* Alternative: [Vagrant Guide](getting_started_vagrant_guide.md)
|
||||
* [Build/Compile instructions](getting_started_make_guide.md)
|
||||
* [Flashing instructions](flashing.md)
|
||||
* [Contributing to QMK](contributing.md)
|
||||
* [How to Use Github](getting_started_github.md)
|
||||
|
||||
@ -12,56 +13,64 @@
|
||||
* [Debugging/Troubleshooting QMK](faq_debug.md)
|
||||
* [Keymap](faq_keymap.md)
|
||||
|
||||
* [Hardware](hardware.md)
|
||||
* [Keyboard Guidelines](hardware_keyboard_guidelines.md)
|
||||
* [AVR Processors](hardware_avr.md)
|
||||
* ARM Processors (TBD)
|
||||
* [Drivers](hardware_drivers.md)
|
||||
|
||||
* [Features](features.md)
|
||||
* [Layouts](feature_layouts.md)
|
||||
* [Common Shortcuts](feature_common_shortcuts.md)
|
||||
* [Advanced Keycodes](feature_advanced_keycodes.md)
|
||||
* [Audio](feature_audio.md)
|
||||
* [Auto Shift](feature_auto_shift.md)
|
||||
* [Backlight](feature_backlight.md)
|
||||
* [Bootmagic](feature_bootmagic.md)
|
||||
* [Dynamic Macros](dynamic_macros.md)
|
||||
* [Key Lock](key_lock.md)
|
||||
* [Dynamic Macros](feature_dynamic_macros.md)
|
||||
* [Key Lock](feature_key_lock.md)
|
||||
* [Layouts](feature_layouts.md)
|
||||
* [Leader Key](feature_leader_key.md)
|
||||
* [Macros](macros.md)
|
||||
* [Mouse keys](mouse_keys.md)
|
||||
* [Macros](feature_macros.md)
|
||||
* [Mouse keys](feature_mouse_keys.md)
|
||||
* [Pointing Device](feature_pointing_device.md)
|
||||
* [PS2 Mouse](feature_ps2_mouse.md)
|
||||
* [Space Cadet](space_cadet_shift.md)
|
||||
* [Tap Dance](tap_dance.md)
|
||||
* [Audio](feature_audio.md)
|
||||
* [Thermal Printer](feature_thermal_printer.md)
|
||||
* [Stenography](stenography.md)
|
||||
* [Unicode](unicode.md)
|
||||
* [RGB Lighting](feature_rgblight.md)
|
||||
* [Space Cadet](feature_space_cadet.md)
|
||||
* [Stenography](feature_stenography.md)
|
||||
* [Tap Dance](feature_tap_dance.md)
|
||||
* [Terminal](feature_terminal.md)
|
||||
* [Thermal Printer](feature_thermal_printer.md)
|
||||
* [Unicode](feature_unicode.md)
|
||||
* [Userspace](feature_userspace.md)
|
||||
|
||||
* [Keycodes](keycodes.md)
|
||||
* [Backlight](feature_backlight.md#backlight-keycodes)
|
||||
* [Basic](keycodes_basic.md)
|
||||
* [Bluetooth](feature_bluetooth.md#bluetooth-keycodes)
|
||||
* [Bootmagic](feature_bootmagic.md#bootmagic-keycodes)
|
||||
* [Layer Switching](feature_advanced_keycodes.md#switching-and-toggling-layers)
|
||||
* [Mod+Key](feature_advanced_keycodes.md#modifier-keys)
|
||||
* [Mod Tap](feature_advanced_keycodes.md#mod-tap)
|
||||
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys)
|
||||
* [Quantum](quantum_keycodes.md)
|
||||
* [RGB Light](feature_rgblight.md#rgblight-keycodes)
|
||||
* [Shifted Keys](feature_advanced_keycodes.md#shifted-keycodes)
|
||||
* [Stenography](feature_stenography.md#keycode-reference)
|
||||
* [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes)
|
||||
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
||||
|
||||
* Reference
|
||||
* [Glossary](glossary.md)
|
||||
* [Keymap overview](keymap.md)
|
||||
* [Keycodes](keycodes.md)
|
||||
* [Basic](keycodes_basic.md)
|
||||
* [Quantum](quantum_keycodes.md)
|
||||
* [Backlight](feature_backlight.md#backlight-keycodes)
|
||||
* [Bluetooth](feature_bluetooth.md#bluetooth-keycodes)
|
||||
* [Bootmagic](feature_bootmagic.md#bootmagic-keycodes)
|
||||
* [Layer Switching](feature_common_shortcuts.md#switching-and-toggling-layers)
|
||||
* [Mod+Key](feature_common_shortcuts.md#modifier-keys)
|
||||
* [Mod Tap](feature_common_shortcuts.md#mod-tap)
|
||||
* [One Shot Keys](feature_common_shortcuts.md#one-shot-keys)
|
||||
* [Shifted Keys](feature_common_shortcuts.md#shifted-keycodes)
|
||||
* [Stenography](stenography.md#keycode-reference)
|
||||
* [RGB Light](feature_rgblight.md#rgblight-keycodes)
|
||||
* [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes)
|
||||
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
||||
* [The `config.h` File](config_options.md)
|
||||
* [Config Options](config_options.md)
|
||||
* [Customizing Functionality](custom_quantum_functions.md)
|
||||
* [Documentation Best Practices](documentation_best_practices.md)
|
||||
* [Documentation Templates](documentation_templates.md)
|
||||
* [Glossary](glossary.md)
|
||||
* [Keymap overview](keymap.md)
|
||||
* [Unit Testing](unit_testing.md)
|
||||
|
||||
* For Makers and Modders
|
||||
* [Adding a keyboard to QMK](adding_a_keyboard_to_qmk.md)
|
||||
* [Hand Wiring Guide](hand_wiring.md)
|
||||
* [Hand Wiring Guide](hand_wire.md)
|
||||
* [ISP flashing guide](isp_flashing_guide.md)
|
||||
* [Modding your keyboard](modding_your_keyboard.md)
|
||||
* [Porting your keyboard to QMK](porting_your_keyboard_to_qmk.md)
|
||||
|
||||
* For a Deeper Understanding
|
||||
* [How Keyboards Work](how_keyboards_work.md)
|
||||
|
@ -1,35 +0,0 @@
|
||||
# Adding your keyboard to QMK
|
||||
|
||||
We welcome all keyboard projects into QMK, but ask that you try to stick to a couple guidelines that help us keep things organised and consistent.
|
||||
|
||||
## Naming your directory/project
|
||||
|
||||
All names should be lowercase alphanumeric, and separated by an underscore (`_`), but not begin with one. Your directory and your `.h` and `.c` files should have exactly the same name. All folders should follow the same format.
|
||||
|
||||
## `readme.md`
|
||||
|
||||
All projects need to have a `readme.md` file that explains what the keyboard is, who made it, where it is available, and links to move information (template coming).
|
||||
|
||||
## Image/Hardware files
|
||||
|
||||
In an effort to keep the repo size down, we're no longer accepting images of any format in the repo, with few exceptions. Hosting them elsewhere (imgur) and linking them in the readme.md is the preferred method.
|
||||
|
||||
Any sort of hardware file (plate, case, pcb) can't be stored in qmk_firmware, but we have the [qmk.fm repo](https://github.com/qmk/qmk.fm) where such files (as well as in-depth info) can be store, and viewed on [qmk.fm](http://qmk.fm). Downloadable files are stored in `/<keyboard>/` (name follows the same format as above) which are served at `http://qmk.fm/<keyboard>/`, and pages are generated from `/_pages/<keyboard>/` which are served at the same location (.md files are generated into .html files through Jekyll). Check out the `lets_split` directory for an example.
|
||||
|
||||
## Non-production/handwired projects
|
||||
|
||||
We're happy to accept any project that uses QMK, including prototypes and handwired ones, but we have a separate `/keyboards/handwired/` folder for them, so the main `/keyboards/` folder doesn't get overcrowded. If a prototype project becomes a production project at some point in the future, we'd be happy to move it to the main `/keyboards/` folder!
|
||||
|
||||
## Warnings as errors
|
||||
|
||||
When developing your keyboard, keep in mind that all warnings will be treated as errors - these small warnings can build-up and cause larger errors down the road (and keeping them is generally a bad practice).
|
||||
|
||||
## Licenses
|
||||
|
||||
If you're adapting your keyboard's setup from another project, but not using the same code, but sure to update the copyright header at the top of the files to show your name, in this format:
|
||||
|
||||
Copyright 2017 Your Name <your@email.com>
|
||||
|
||||
## Technical details
|
||||
|
||||
If you're looking for more information on making your keyboard work with QMK, [check out this guide](porting_your_keyboard_to_qmk.md)!
|
@ -1,129 +1,200 @@
|
||||
# The `config.h` file
|
||||
# Configuring QMK
|
||||
|
||||
This is a c header file that is one of the first things included, and will persist over the whole project (if included). Lots of variables can be set here and accessed elsewhere (namely keymaps). This file can exist at a couple different levels:
|
||||
QMK is nearly infinitely configurable. Wherever possible we err on the side of allowing users to customize their keyboard, even at the expense of code size. That level of flexibility makes for a daunting configuration experience, however.
|
||||
|
||||
There are two main types of configuration files in QMK- `config.h` and `rules.mk`. These files exist at various levels in QMK and all files of the same type are combined to build the final configuration. The levels, from lowest priority to highest priority, are:
|
||||
|
||||
* QMK Default
|
||||
* Keyboard
|
||||
* Folders (Up to 5 levels deep)
|
||||
* Keymap
|
||||
|
||||
## QMK Default
|
||||
|
||||
Every available setting in QMK has a default. If that setting is not set at the Keyboard, Folder, or Keymap level this is the setting that will be used.
|
||||
|
||||
## Keyboard
|
||||
|
||||
```c
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
This level contains config options that should apply to the whole keyboard. Some settings won't change in revisions, or most keymaps. Other settings are merely defaults for this keyboard and can be overridden by folders and/or keymaps.
|
||||
|
||||
#include "config_common.h"
|
||||
## Folders
|
||||
|
||||
// config options
|
||||
|
||||
#endif
|
||||
```
|
||||
|
||||
This file contains config options that should apply to the whole keyboard, and won't change in revisions, or most keymaps. The revision block here only applies to keyboards with revisions.
|
||||
|
||||
## Revisions
|
||||
|
||||
```c
|
||||
#ifndef <revision>_CONFIG_H
|
||||
#define <revision>_CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
// config options
|
||||
|
||||
#endif
|
||||
```
|
||||
|
||||
For keyboards that have revisions, this file contains config options that should apply to only that revisions, and won't change in most keymaps.
|
||||
Some keyboards have folders and sub-folders to allow for different hardware configurations. Most keyboards only go 1 folder deep, but QMK supports structures up to 5 folders deep. Each folder can have its own `config.h` and `rules.mk` files that are incorporated into the final configuration.
|
||||
|
||||
## Keymap
|
||||
|
||||
```c
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
This level contains all of the options for that particular keymap. If you wish to override a previous declaration, you can use `#undef <variable>` to undefine it, where you can then redefine it without an error.
|
||||
|
||||
#include "config_common.h"
|
||||
# The `config.h` file
|
||||
|
||||
// config options
|
||||
This is a C header file that is one of the first things included, and will persist over the whole project (if included). Lots of variables can be set here and accessed elsewhere.
|
||||
|
||||
#endif
|
||||
```
|
||||
## `config.h` Options
|
||||
|
||||
This file contains all of the options for that particular keymap. If you wish to override a previous declaration, you can use `#undef <variable>` to undefine it, where you can then redefine it without an error.
|
||||
### Hardware Options
|
||||
* `#define VENDOR_ID 0x1234`
|
||||
* defines your VID, and for most DIY projects, can be whatever you want
|
||||
* `#define PRODUCT_ID 0x5678`
|
||||
* defines your PID, and for most DIY projects, can be whatever you want
|
||||
* `#define DEVICE_VER 0`
|
||||
* defines the device version (often used for revisions)
|
||||
* `#define MANUFACTURER Me`
|
||||
* generally who/whatever brand produced the board
|
||||
* `#define PRODUCT Board`
|
||||
* the name of the keyboard
|
||||
* `#define DESCRIPTION a keyboard`
|
||||
* a short description of what the keyboard is
|
||||
* `#define MATRIX_ROWS 5`
|
||||
* the number of rows in your keyboard's matrix
|
||||
* `#define MATRIX_COLS 15`
|
||||
* the number of columns in your keyboard's matrix
|
||||
* `#define MATRIX_ROW_PINS { D0, D5, B5, B6 }`
|
||||
* pins of the rows, from top to bottom
|
||||
* `#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }`
|
||||
* pins of the columns, from left to right
|
||||
* `#define UNUSED_PINS { D1, D2, D3, B1, B2, B3 }`
|
||||
* pins unused by the keyboard for reference
|
||||
* `#define MATRIX_HAS_GHOST`
|
||||
* define is matrix has ghost (unlikely)
|
||||
* `#define DIODE_DIRECTION COL2ROW`
|
||||
* COL2ROW or ROW2COL - how your matrix is configured. COL2ROW means the black mark on your diode is facing to the rows, and between the switch and the rows.
|
||||
* `#define AUDIO_VOICES`
|
||||
* turns on the alternate audio voices (to cycle through)
|
||||
* `#define C6_AUDIO`
|
||||
* enables audio on pin C6
|
||||
* `#define B5_AUDIO`
|
||||
* enables audio on pin B5 (duophony is enable if both are enabled)
|
||||
* `#define BACKLIGHT_PIN B7`
|
||||
* pin of the backlight - B5, B6, B7 use PWM, others use softPWM
|
||||
* `#define BACKLIGHT_LEVELS 3`
|
||||
* number of levels your backlight will have (not including off)
|
||||
* `#define DEBOUNCING_DELAY 5`
|
||||
* the delay when reading the value of the pin (5 is default)
|
||||
* `#define LOCKING_SUPPORT_ENABLE`
|
||||
* mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
|
||||
* `#define LOCKING_RESYNC_ENABLE`
|
||||
* tries to keep switch state consistent with keyboard LED state
|
||||
* `#define IS_COMMAND() ( keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) )`
|
||||
* key combination that allows the use of magic commands (useful for debugging)
|
||||
|
||||
# Config Options
|
||||
### Features That Can Be Disabled
|
||||
|
||||
```c
|
||||
#define VENDOR_ID 0x1234 // defines your VID, and for most DIY projects, can be whatever you want
|
||||
#define PRODUCT_ID 0x5678 // defines your PID, and for most DIY projects, can be whatever you want
|
||||
#define DEVICE_VER 0 // defines the device version (often used for revisions)
|
||||
If you define these options you will disable the associated feature, which can save on code size.
|
||||
|
||||
#define MANUFACTURER Me // generally who/whatever brand produced the board
|
||||
#define PRODUCT Board // the name of the keyboard
|
||||
#define DESCRIPTION a keyboard // a short description of what the keyboard is
|
||||
* `#define NO_DEBUG`
|
||||
* disable debuging
|
||||
* `#define NO_PRINT`
|
||||
* disable printing/debugging using hid_listen
|
||||
* `#define NO_ACTION_LAYER`
|
||||
* disable layers
|
||||
* `#define NO_ACTION_TAPPING`
|
||||
* disable tap dance and other tapping features
|
||||
* `#define NO_ACTION_ONESHOT`
|
||||
* disable one-shot modifiers
|
||||
* `#define NO_ACTION_MACRO`
|
||||
* disable all macro handling
|
||||
* `#define NO_ACTION_FUNCTION`
|
||||
* disable the action function (deprecated)
|
||||
|
||||
#define MATRIX_ROWS 5 // the number of rows in your keyboard's matrix
|
||||
#define MATRIX_COLS 15 // the number of columns in your keyboard's matrix
|
||||
### Features That Can Be Enabled
|
||||
|
||||
#define MATRIX_ROW_PINS { D0, D5, B5, B6 } // pins of the rows, from top to bottom
|
||||
#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } // pins of the columns, from left to right
|
||||
#define UNUSED_PINS { D1, D2, D3, B1, B2, B3 } // pins unused by the keyboard for reference
|
||||
#define MATRIX_HAS_GHOST // define is matrix has ghost (unlikely)
|
||||
#define DIODE_DIRECTION COL2ROW // COL2ROW or ROW2COL - how your matrix is configured
|
||||
// COL2ROW means the black mark on your diode is facing to the rows, and between the switch and the rows
|
||||
If you define these options you will enable the associated feature, which may increase your code size.
|
||||
|
||||
#define AUDIO_VOICES // turns on the alternate audio voices (to cycle through)
|
||||
#define C6_AUDIO // enables audio on pin C6
|
||||
#define B5_AUDIO // enables audio on pin B5 (duophony is enable if both are enabled)
|
||||
* `#define FORCE_NKRO`
|
||||
* NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of eeprom setting. NKRO can still be turned off but will be turned on again if the keyboard reboots.
|
||||
* `#define PREVENT_STUCK_MODIFIERS`
|
||||
* when switching layers, this will release all mods
|
||||
|
||||
#define BACKLIGHT_PIN B7 // pin of the backlight - B5, B6, B7 use PWM, others use softPWM
|
||||
#define BACKLIGHT_LEVELS 3 // number of levels your backlight will have (not including off)
|
||||
### Behaviors That Can Be Configured
|
||||
|
||||
#define DEBOUNCING_DELAY 5 // the delay when reading the value of the pin (5 is default)
|
||||
* `#define TAPPING_TERM 200`
|
||||
* how long before a tap becomes a hold
|
||||
* `#define RETRO_TAPPING`
|
||||
* tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release
|
||||
* `#define TAPPING_TOGGLE 2`
|
||||
* how many taps before triggering the toggle
|
||||
* `#define PERMISSIVE_HOLD`
|
||||
* makes tap and hold keys work better for fast typers who don't want tapping term set above 500
|
||||
* `#define LEADER_TIMEOUT 300`
|
||||
* how long before the leader key times out
|
||||
* `#define ONESHOT_TIMEOUT 300`
|
||||
* how long before oneshot times out
|
||||
* `#define ONESHOT_TAP_TOGGLE 2`
|
||||
* how many taps before oneshot toggle is triggered
|
||||
* `#define IGNORE_MOD_TAP_INTERRUPT`
|
||||
* makes it possible to do rolling combos (zx) with keys that convert to other keys on hold
|
||||
|
||||
#define LOCKING_SUPPORT_ENABLE // mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
|
||||
#define LOCKING_RESYNC_ENABLE // tries to keep switch state consistent with keyboard LED state
|
||||
### RGB Light Configuration
|
||||
|
||||
#define IS_COMMAND() ( \ // key combination that allows the use of magic commands (useful for debugging)
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
* `#define RGB_DI_PIN D7`
|
||||
* pin the DI on the ws2812 is hooked-up to
|
||||
* `#define RGBLIGHT_ANIMATIONS`
|
||||
* run RGB animations
|
||||
* `#define RGBLED_NUM 15`
|
||||
* number of LEDs
|
||||
* `#define RGBLIGHT_HUE_STEP 12`
|
||||
* units to step when in/decreasing hue
|
||||
* `#define RGBLIGHT_SAT_STEP 25`
|
||||
* units to step when in/decresing saturation
|
||||
* `#define RGBLIGHT_VAL_STEP 12`
|
||||
* units to step when in/decreasing value (brightness)
|
||||
* `#define RGBW_BB_TWI`
|
||||
* bit-bangs twi to EZ RGBW LEDs (only required for Ergodox EZ)
|
||||
|
||||
// the following options can save on file size at the expense of that feature
|
||||
#define NO_DEBUG // disable debuging (saves on file size)
|
||||
#define NO_PRINT // disable printing (saves of file size)
|
||||
#define NO_ACTION_LAYER // no layers
|
||||
#define NO_ACTION_TAPPING // no tapping for layers/mods
|
||||
#define NO_ACTION_ONESHOT // no oneshot for layers/mods
|
||||
#define NO_ACTION_MACRO // no macros
|
||||
#define NO_ACTION_FUNCTION // no functions
|
||||
### Mouse Key Options
|
||||
|
||||
#define FORCE_NKRO // NKRO by default requires to be turned on, this forces it to be on always
|
||||
* `#define MOUSEKEY_INTERVAL 20`
|
||||
* `#define MOUSEKEY_DELAY 0`
|
||||
* `#define MOUSEKEY_TIME_TO_MAX 60`
|
||||
* `#define MOUSEKEY_MAX_SPEED 7`
|
||||
* `#define MOUSEKEY_WHEEL_DELAY 0`
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS // when switching layers, this will release all mods
|
||||
# The `rules.mk` File
|
||||
|
||||
#define TAPPING_TERM 200 // how long before a tap becomes a hold
|
||||
#define TAPPING_TOGGLE 2 // how many taps before triggering the toggle
|
||||
This is a [make](https://www.gnu.org/software/make/manual/make.html) file that is included by the top-level `Makefile`. It is used to set some information about the MCU that we will be compiling for as well as enabling and disabling certain features.
|
||||
|
||||
#define PERMISSIVE_HOLD // makes tap and hold keys work better for fast typers who don't want tapping term set above 500
|
||||
## `rules.mk` options
|
||||
|
||||
#define LEADER_TIMEOUT 300 // how long before the leader key times out
|
||||
### Build Options
|
||||
|
||||
#define ONESHOT_TIMEOUT 300 // how long before oneshot times out
|
||||
#define ONESHOT_TAP_TOGGLE 2 // how many taps before oneshot toggle is triggered
|
||||
* `DEFAULT_FOLDER`
|
||||
* Used to specify a default folder when a keyboard has more than one sub-folder.
|
||||
* `SRC`
|
||||
* Used to add files to the compilation/linking list.
|
||||
* `LAYOUTS`
|
||||
* A list of [layouts](feature_layouts.md) this keyboard supports.
|
||||
|
||||
#define IGNORE_MOD_TAP_INTERRUPT // makes it possible to do rolling combos (zx) with keys that convert to other keys on hold
|
||||
### AVR MCU Options
|
||||
* `MCU = atmega32u4`
|
||||
* `F_CPU = 16000000`
|
||||
* `ARCH = AVR8`
|
||||
* `F_USB = $(F_CPU)`
|
||||
* `OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT`
|
||||
* `OPT_DEFS += -DBOOTLOADER_SIZE=4096`
|
||||
|
||||
// ws2812 options
|
||||
#define RGB_DI_PIN D7 // pin the DI on the ws2812 is hooked-up to
|
||||
#define RGBLIGHT_ANIMATIONS // run RGB animations
|
||||
#define RGBLED_NUM 15 // number of LEDs
|
||||
#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue
|
||||
#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation
|
||||
#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness)
|
||||
### Feature Options
|
||||
|
||||
#define RGBW_BB_TWI // bit-bangs twi to EZ RGBW LEDs (only required for Ergodox EZ)
|
||||
Use these to enable or disable building certain features. The more you have enabled the bigger your firmware will be, and you run the risk of building a firmware too large for your MCU.
|
||||
|
||||
// mousekey options (self-describing)
|
||||
#define MOUSEKEY_INTERVAL 20
|
||||
#define MOUSEKEY_DELAY 0
|
||||
#define MOUSEKEY_TIME_TO_MAX 60
|
||||
#define MOUSEKEY_MAX_SPEED 7
|
||||
#define MOUSEKEY_WHEEL_DELAY 0
|
||||
|
||||
```
|
||||
* `BOOTMAGIC_ENABLE`
|
||||
* Virtual DIP switch configuration(+1000)
|
||||
* `MOUSEKEY_ENABLE`
|
||||
* Mouse keys(+4700)
|
||||
* `EXTRAKEY_ENABLE`
|
||||
* Audio control and System control(+450)
|
||||
* `CONSOLE_ENABLE`
|
||||
* Console for debug(+400)
|
||||
* `COMMAND_ENABLE`
|
||||
* Commands for debug and configuration
|
||||
* `NKRO_ENABLE`
|
||||
* USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
* `AUDIO_ENABLE`
|
||||
* Enable the audio subsystem.
|
||||
* `RGBLIGHT_ENABLE`
|
||||
* Enable keyboard underlight functionality
|
||||
* `MIDI_ENABLE`
|
||||
* MIDI controls
|
||||
* `UNICODE_ENABLE`
|
||||
* Unicode
|
||||
* `BLUETOOTH_ENABLE`
|
||||
* Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
|
@ -80,7 +80,7 @@ We have a few different types of changes in QMK, each requiring a different leve
|
||||
* Make sure your code change actually compiles.
|
||||
* Keymaps: Make sure that `make keyboard:your_new_keymap` does not return an error
|
||||
* Keyboards: Make sure that `make keyboard:all` does not return any errors
|
||||
* Core: Make sure that `make allkb` does not return any errors.
|
||||
* Core: Make sure that `make all` does not return any errors.
|
||||
* Make sure commit messages are understandable on their own. You should put a short description (no more than 70 characters) on the first line, the second line should be empty, and on the 3rd and later lines you should describe your commit in detail, if required. Example:
|
||||
|
||||
```
|
||||
@ -104,6 +104,8 @@ Most first-time QMK contributors start with their personal keymaps. We try to ke
|
||||
* Write a `readme.md` using [the template](https://docs.qmk.fm/documentation_templates.html#).
|
||||
* All Keymap PR's are squashed, so if you care about how your commits are squashed you should do it yourself
|
||||
* Do not lump features in with keymap PR's. Submit the feature first and then a second PR for the keymap.
|
||||
* Do not include `Makefile`s in your keymap folder (they're no longer used)
|
||||
* Update copyrights in file headers (look for `REPLACE_WITH_YOUR_NAME `)
|
||||
|
||||
## Keyboards
|
||||
|
||||
@ -114,6 +116,9 @@ We also ask that you follow these guidelines:
|
||||
* Write a `readme.md` using [the template](https://docs.qmk.fm/documentation_templates.html#).
|
||||
* Keep the number of commits reasonable or we will squash your PR
|
||||
* Do not lump core features in with new keyboards. Submit the feature first and then submit a separate PR for the keyboard.
|
||||
* Name `.c`/`.h` file after the immediate parent folder, eg `/keyboards/<kb1>/<kb2>/<kb2>.[ch]`
|
||||
* Do not include `Makefile`s in your keyboard folder (they're no longer used)
|
||||
* Update copyrights in file headers (look for `REPLACE_WITH_YOUR_NAME `)
|
||||
|
||||
## Quantum/TMK Core
|
||||
|
||||
@ -144,4 +149,4 @@ To maintain a clear vision of how things are laid out in QMK we try to plan out
|
||||
|
||||
# What does the Code of Conduct mean for me?
|
||||
|
||||
Our Code of Conduct means that you are responsible for treating everyone on the project with respect and courtesy regardless of their identity. If you are the victim of any inappropriate behavior or comments as described in our Code of Conduct, we are here for you and will do the best to ensure that the abuser is reprimanded appropriately, per our code.
|
||||
Our [Code of Conduct](https://github.com/qmk/qmk_firmware/blob/master/CODE_OF_CONDUCT.md) means that you are responsible for treating everyone on the project with respect and courtesy regardless of their identity. If you are the victim of any inappropriate behavior or comments as described in our Code of Conduct, we are here for you and will do the best to ensure that the abuser is reprimanded appropriately, per our code.
|
||||
|
@ -62,7 +62,7 @@ https://github.com/tmk/tmk_keyboard/wiki/mbed-cortex-porting#compile-error-cstdd
|
||||
https://developer.mbed.org/forum/mbed/topic/5205/
|
||||
|
||||
|
||||
## 'clock_prescale_set' and 'clock_div_1' not available
|
||||
## `clock_prescale_set` and `clock_div_1` not available
|
||||
Your toolchain is too old to support the MCU. For example WinAVR 20100110 doesn't support ATMega32u2.
|
||||
|
||||
```
|
||||
|
@ -159,6 +159,7 @@ byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286)
|
||||
And see this discussion for further reference.
|
||||
https://github.com/tmk/tmk_keyboard/issues/179
|
||||
|
||||
If you are using a TeensyUSB, there is a [known bug](https://github.com/qmk/qmk_firmware/issues/164) in which the hardware reset button prevents the RESET key from working. Unplugging the keyboard and plugging it back in should resolve the problem.
|
||||
|
||||
## Special Extra key doesn't work(System, Audio control keys)
|
||||
You need to define `EXTRAKEY_ENABLE` in `rules.mk` to use them in QMK.
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
## What Differences Are There Between QMK and TMK?
|
||||
|
||||
TMK was originally designed and implemented by [Jun Wako](https://github.com/tmk). QMK started as [Jack Humbert's](https://github.com/jackhumbert) fork of TMK for the Planck. After a while Jack's fork had diverged quite a bit from TMK, and in 2015 Jack decided to rename his fork to QMK.
|
||||
TMK was originally designed and implemented by [Jun Wako](https://github.com/tmk). QMK started as [Jack Humbert](https://github.com/jackhumbert)'s fork of TMK for the Planck. After a while Jack's fork had diverged quite a bit from TMK, and in 2015 Jack decided to rename his fork to QMK.
|
||||
|
||||
From a technical standpoint QMK builds upon TMK by adding several new features. Most notably QMK has expanded the number of available keycodes and uses these to implement advanced features like `S()`, `LCTL()`, and `MO()`. You can see a complete list of these keycodes in [Keycodes](keycodes.md).
|
||||
|
||||
|
@ -7,6 +7,17 @@ See [Keycodes](keycodes.md) for an index of keycodes available to you. These lin
|
||||
|
||||
Keycodes are actually defined in [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h).
|
||||
|
||||
## What Are The Default Keycodes?
|
||||
|
||||
There are 3 standard keyboard layouts in use around the world- ANSI, ISO, and JIS. North America primarily uses ANSI, Europe and Africa primarily use ISO, and Japan uses JIS. Regions not mentioned typically use either ANSI or ISO. The keycodes corresponding to these layouts are shown here:
|
||||
|
||||
<!-- Source for this image: http://www.keyboard-layout-editor.com/#/gists/9ce023dc6caadc0cf11c88c782350a8c -->
|
||||
![Keyboard Layout Image](https://i.imgur.com/45m4mRf.png)
|
||||
|
||||
## The Menu Key Isn't Working
|
||||
|
||||
The key found on most modern keyboards that is located between `KC_RGUI` and `KC_RCTL` is actually called `KC_APP`. This is because when that key was invented there was already a key named `MENU` in the relevant standards, so MS chose to call that the `APP` key.
|
||||
|
||||
## `KC_SYSREQ` isn't working
|
||||
Use keycode for Print Screen(`KC_PSCREEN` or `KC_PSCR`) instead of `KC_SYSREQ`. Key combination of 'Alt + Print Screen' is recognized as 'System request'.
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
# Common Keymap Shortcuts
|
||||
# Advanced Keycodes
|
||||
|
||||
Your keymap can include shortcuts to common operations, for example shifted keys. This page documents the functions that are available to you.
|
||||
Your keymap can include keycodes that are more advanced than normal, for example shifted keys. This page documents the functions that are available to you.
|
||||
|
||||
### Assigning Custom Names
|
||||
|
||||
People often define custom names using `#define`. For example:
|
||||
|
||||
@ -15,7 +17,7 @@ This will allow you to use `FN_CAPS` and `ALT_TAB` in your `KEYMAP()`, keeping i
|
||||
|
||||
Currently, the keycodes able to used with these functions are limited to the [Basic Keycodes](keycodes_basic.html), meaning you can't use keycodes like `KC_TILD`, or anything greater than 0xFF. For a full list of the keycodes able to be used see [Basic Keycodes](keycodes_basic.html).
|
||||
|
||||
## Switching and toggling layers
|
||||
# Switching and toggling layers
|
||||
|
||||
These functions allow you to activate layers in various ways.
|
||||
|
||||
@ -25,7 +27,7 @@ These functions allow you to activate layers in various ways.
|
||||
* `TO(layer)` - Goes to a layer. This code is special, because it lets you go either up or down the stack -- just goes directly to the layer you want. So while other codes only let you go _up_ the stack (from layer 0 to layer 3, for example), `TO(2)` is going to get you to layer 2, no matter where you activate it from -- even if you're currently on layer 5. This gets activated on keydown (as soon as the key is pressed).
|
||||
* `TT(layer)` - Layer Tap-Toggle. If you hold the key down, the layer becomes active, and then deactivates when you let go. And if you tap it, the layer simply becomes active (toggles on). It needs 5 taps by default, but you can set it by defining `TAPPING_TOGGLE`, for example, `#define TAPPING_TOGGLE 2` for just two taps.
|
||||
|
||||
## Working With Layers
|
||||
# Working With Layers
|
||||
|
||||
Care must be taken when switching layers, it's possible to lock yourself into a layer with no way to deactivate that layer (without unplugging your keyboard.) We've created some guidelines to help users avoid the most common problems.
|
||||
|
||||
@ -47,7 +49,9 @@ Once you have a good feel for how layers work and what you can do, you can get m
|
||||
|
||||
Layers stack on top of each other in numerical order. When determining what a keypress does, QMK scans the layers from the top down, stopping when it reaches the first active layer that is not set to `KC_TRNS`. As a result if you activate a layer that is numerically lower than your current layer, and your current layer (or another layer that is active and higher than your target layer) has something other than `KC_TRNS`, that is the key that will be sent, not the key on the layer you just activated. This is the cause of most people's "why doesn't my layer get switched" problem.
|
||||
|
||||
## Modifier keys
|
||||
Sometimes, you might want to switch between layers in a macro or as part of a tap dance routine. `layer_on` activates a layer, and `layer_off` deactivates it. More layer-related functions can be found in [action_layer.h](../tmk_core/common/action_layer.h).
|
||||
|
||||
# Modifier keys
|
||||
|
||||
These functions allow you to combine a mod with a keycode. When pressed the keydown for the mod will be sent first, and then *kc* will be sent. When released the keyup for *kc* will be sent and then the mod will be sent.
|
||||
|
||||
@ -67,7 +71,7 @@ You can also chain these, like this:
|
||||
|
||||
LALT(LCTL(KC_DEL)) -- this makes a key that sends Alt, Control, and Delete in a single keypress.
|
||||
|
||||
## Shifted Keycodes
|
||||
# Shifted Keycodes
|
||||
|
||||
The following shortcuts automatically add `LSFT()` to keycodes to get commonly used symbols.
|
||||
|
||||
@ -95,7 +99,7 @@ The following shortcuts automatically add `LSFT()` to keycodes to get commonly u
|
||||
| KC_PIPE | | |
|
||||
| KC_COLN | : |
|
||||
|
||||
## Mod Tap
|
||||
# Mod Tap
|
||||
|
||||
`MT(mod, kc)` - is *mod* (modifier key - MOD_LCTL, MOD_LSFT) when held, and *kc* when tapped. In other words, you can have a key that sends Esc (or the letter O or whatever) when you tap it, but works as a Control key or a Shift key when you hold it down.
|
||||
|
||||
@ -125,7 +129,7 @@ We've added shortcuts to make common modifier/tap (mod-tap) mappings more compac
|
||||
* `LCAG_T(kc)` - is CtrlAltGui when held and *kc* when tapped
|
||||
* `MEH_T(kc)` - is like Hyper, but not as cool -- does not include the Cmd/Win key, so just sends Alt+Ctrl+Shift.
|
||||
|
||||
## One Shot Keys
|
||||
# One Shot Keys
|
||||
|
||||
One shot keys are keys that remain active until the next key is pressed, and then are releasd. This allows you to type keyboard combinations without pressing more than one key at a time.
|
||||
|
||||
@ -143,6 +147,8 @@ You can control the behavior of one shot keys by defining these in `config.h`:
|
||||
* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](#mod-tap), not the `KC_*` codes.
|
||||
* `OSL(layer)` - momentary switch to *layer*.
|
||||
|
||||
Sometimes, you want to activate a one-shot layer as part of a macro or tap dance routine. To do this, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `set_oneshot_layer(ONESHOT_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`. For more complicated actions, take a look at the oneshot implementation in [`process_record`](../tmk_core/common/action.c#L429).
|
||||
|
||||
## Permissive Hold
|
||||
|
||||
As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option:
|
@ -42,7 +42,7 @@ Yes, unfortunately.
|
||||
|
||||
Add to your `rules.mk` in the keymap folder:
|
||||
|
||||
AUTO_SHIFT_ENABLE = YES
|
||||
AUTO_SHIFT_ENABLE = yes
|
||||
|
||||
If no `rules.mk` exists, you can create one.
|
||||
|
||||
@ -136,24 +136,22 @@ completely normal and with no intention of shifted keys.
|
||||
|
||||
#### An example run
|
||||
|
||||
'''
|
||||
hello world. my name is john doe. i am a computer programmer playing with
|
||||
keyboards right now.
|
||||
hello world. my name is john doe. i am a computer programmer playing with
|
||||
keyboards right now.
|
||||
|
||||
[PRESS KC_ASDN quite a few times]
|
||||
[PRESS KC_ASDN quite a few times]
|
||||
|
||||
heLLo woRLd. mY nAMe is JOHn dOE. i AM A compUTeR proGRaMMER PlAYiNG witH
|
||||
KEYboArDS RiGHT NOw.
|
||||
heLLo woRLd. mY nAMe is JOHn dOE. i AM A compUTeR proGRaMMER PlAYiNG witH
|
||||
KEYboArDS RiGHT NOw.
|
||||
|
||||
[PRESS KC_ASUP a few times]
|
||||
[PRESS KC_ASUP a few times]
|
||||
|
||||
hello world. my name is john Doe. i am a computer programmer playing with
|
||||
keyboarDs right now.
|
||||
hello world. my name is john Doe. i am a computer programmer playing with
|
||||
keyboarDs right now.
|
||||
|
||||
[PRESS KC_ASRP]
|
||||
[PRESS KC_ASRP]
|
||||
|
||||
115
|
||||
'''
|
||||
115
|
||||
|
||||
The keyboard typed `115` which represents your current `AUTO_SHIFT_TIMEOUT`
|
||||
value. You are now set! Practice on the *D* key a little bit that showed up
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Dynamic macros: record and replay macros in runtime
|
||||
|
||||
QMK supports temporarily macros created on the fly. We call these Dynamic Macros. They are defined by the user from the keyboard and are lost when the keyboard is unplugged or otherwise rebooted.
|
||||
QMK supports temporary macros created on the fly. We call these Dynamic Macros. They are defined by the user from the keyboard and are lost when the keyboard is unplugged or otherwise rebooted.
|
||||
|
||||
You can store one or two macros and they may have a combined total of 128 keypresses. You can increase this size at the cost of RAM.
|
||||
|
||||
@ -22,7 +22,7 @@ enum planck_keycodes {
|
||||
|
||||
It must be the last element because `dynamic_macros.h` will add some more keycodes after it.
|
||||
|
||||
Below it include the `dynamic_macro.h` header:
|
||||
Below it, include the `dynamic_macro.h` header:
|
||||
|
||||
```c
|
||||
#include "dynamic_macro.h"`
|
||||
@ -58,6 +58,6 @@ For users of the earlier versions of dynamic macros: It is still possible to fin
|
||||
}
|
||||
```
|
||||
|
||||
If the LED's start blinking during the recording with each keypress, it means there is no more space for the macro in the macro buffer. To fit the macro in, either make the other macro shorter (they share the same buffer) or increase the buffer size by setting the `DYNAMIC_MACRO_SIZE` preprocessor macro (default value: 128; please read the comments for it in the header).
|
||||
If the LEDs start blinking during the recording with each keypress, it means there is no more space for the macro in the macro buffer. To fit the macro in, either make the other macro shorter (they share the same buffer) or increase the buffer size by setting the `DYNAMIC_MACRO_SIZE` preprocessor macro (default value: 128; please read the comments for it in the header).
|
||||
|
||||
For the details about the internals of the dynamic macros, please read the comments in the `dynamic_macro.h` header.
|
@ -49,8 +49,8 @@ If you have `#define RGBLIGHT_ANIMATIONS` in your `config.h` you will have a num
|
||||
| Option | Default Value | Description |
|
||||
|--------|---------------|-------------|
|
||||
| `RGBLIGHT_ANIMATIONS` | | `#define` this to enable animation modes. |
|
||||
| `RGBLIGHT_EFFECT_BREATHE_CENTER | 1.85 | Used to calculate the curve for the breathing animation. Valid values 1.0-2.7. |
|
||||
| `RGBLIGHT_EFFECT_BREATHE_MAX | 255 | The maximum brightness for the breathing mode. Valid values 1-255. |
|
||||
| `RGBLIGHT_EFFECT_BREATHE_CENTER` | 1.85 | Used to calculate the curve for the breathing animation. Valid values 1.0-2.7. |
|
||||
| `RGBLIGHT_EFFECT_BREATHE_MAX` | 255 | The maximum brightness for the breathing mode. Valid values 1-255. |
|
||||
| `RGBLIGHT_EFFECT_SNAKE_LENGTH` | 4 | The number of LEDs to light up for the "snake" animation. |
|
||||
| `RGBLIGHT_EFFECT_KNIGHT_LENGTH` | 3 | The number of LEDs to light up for the "knight" animation. |
|
||||
| `RGBLIGHT_EFFECT_KNIGHT_OFFSET` | 0 | Start the knight animation this many LEDs from the start of the strip. |
|
||||
@ -88,6 +88,7 @@ These control the RGB Lighting functionality.
|
||||
|-----------|------------|-------------|
|
||||
||`RGB_TOG`|toggle on/off|
|
||||
||`RGB_MOD`|cycle through modes|
|
||||
||`RGB_SMOD`|cycle through modes, use reverse direction when shift is hold|
|
||||
||`RGB_HUI`|hue increase|
|
||||
||`RGB_HUD`|hue decrease|
|
||||
||`RGB_SAI`|saturation increase|
|
||||
|
@ -63,20 +63,23 @@ qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
TD(TD_ESC_CAPS)
|
||||
```
|
||||
|
||||
## Complex Example
|
||||
## Complex Examples
|
||||
|
||||
Here's a more complex example involving custom actions:
|
||||
This section details several complex tap dance examples.
|
||||
All the enums used in the examples are declared like this:
|
||||
|
||||
```c
|
||||
// Enums defined for all examples:
|
||||
enum {
|
||||
CT_SE = 0,
|
||||
CT_CLN,
|
||||
CT_EGG,
|
||||
CT_FLSH,
|
||||
X_TAP_DANCE
|
||||
};
|
||||
|
||||
/* Have the above three on the keymap, TD(CT_SE), etc... */
|
||||
|
||||
```
|
||||
### Example 1: Send `:` on single tap, `;` on double tap
|
||||
```c
|
||||
void dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count == 1) {
|
||||
register_code (KC_RSFT);
|
||||
@ -95,6 +98,13 @@ void dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||
}
|
||||
}
|
||||
|
||||
//All tap dance functions would go here. Only showing this one.
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset)
|
||||
};
|
||||
```
|
||||
### Example 2: Send "Safety Dance!" after 100 taps
|
||||
```c
|
||||
void dance_egg (qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count >= 100) {
|
||||
SEND_STRING ("Safety dance!");
|
||||
@ -102,6 +112,14 @@ void dance_egg (qk_tap_dance_state_t *state, void *user_data) {
|
||||
}
|
||||
}
|
||||
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[CT_EGG] = ACTION_TAP_DANCE_FN (dance_egg)
|
||||
};
|
||||
```
|
||||
|
||||
### Example 3: Turn LED lights on then off, one at a time
|
||||
|
||||
```c
|
||||
// on each tap, light up one led, from right to left
|
||||
// on the forth tap, turn them off from right to left
|
||||
void dance_flsh_each(qk_tap_dance_state_t *state, void *user_data) {
|
||||
@ -141,6 +159,7 @@ void dance_flsh_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
ergodox_right_led_3_off();
|
||||
}
|
||||
|
||||
//All tap dances now put together. Example 3 is "CT_FLASH"
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[CT_SE] = ACTION_TAP_DANCE_DOUBLE (KC_SPC, KC_ENT)
|
||||
,[CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset)
|
||||
@ -148,3 +167,84 @@ qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
,[CT_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED (dance_flsh_each, dance_flsh_finished, dance_flsh_reset)
|
||||
};
|
||||
```
|
||||
|
||||
### Example 4: 'Quad Function Tap-Dance'
|
||||
|
||||
By [DanielGGordon](https://github.com/danielggordon)
|
||||
|
||||
Allow one key to have 4 (or more) functions, depending on number of presses, and if the key is held or tapped.
|
||||
Below is a specific example:
|
||||
* Tap = Send `x`
|
||||
* Hold = Send `Control`
|
||||
* Double Tap = Send `Escape`
|
||||
* Double Tap and Hold = Send `Alt`
|
||||
|
||||
The following example can be easily expanded to more than 4 quite easily:
|
||||
```c
|
||||
//**************** Definitions needed for quad function to work *********************//
|
||||
//Enums used to clearly convey the state of the tap dance
|
||||
enum {
|
||||
SINGLE_TAP = 1,
|
||||
SINGLE_HOLD = 2,
|
||||
DOUBLE_TAP = 3,
|
||||
DOUBLE_HOLD = 4,
|
||||
DOUBLE_SINGLE_TAP = 5 //send SINGLE_TAP twice - NOT DOUBLE_TAP
|
||||
// Add more enums here if you want for triple, quadruple, etc.
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
bool is_press_action;
|
||||
int state;
|
||||
} tap;
|
||||
|
||||
int cur_dance (qk_tap_dance_state_t *state) {
|
||||
if (state->count == 1) {
|
||||
//If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP
|
||||
if (state->interrupted || state->pressed==0) return SINGLE_TAP;
|
||||
else return SINGLE_HOLD;
|
||||
}
|
||||
//If count = 2, and it has been interrupted - assume that user is trying to type the letter associated
|
||||
//with single tap. In example below, that means to send `xx` instead of `Escape`.
|
||||
else if (state->count == 2) {
|
||||
if (state->interrupted) return DOUBLE_SINGLE_TAP;
|
||||
else if (state->pressed) return DOUBLE_HOLD;
|
||||
else return DOUBLE_TAP;
|
||||
}
|
||||
else return 6; //magic number. At some point this method will expand to work for more presses
|
||||
}
|
||||
|
||||
//**************** Definitions needed for quad function to work *********************//
|
||||
|
||||
//instanalize an instance of 'tap' for the 'x' tap dance.
|
||||
static tap xtap_state = {
|
||||
.is_press_action = true,
|
||||
.state = 0
|
||||
};
|
||||
|
||||
void x_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||
xtap_state.state = cur_dance(state);
|
||||
switch (xtap_state.state) {
|
||||
case SINGLE_TAP: register_code(KC_X); break;
|
||||
case SINGLE_HOLD: register_code(KC_LCTRL); break;
|
||||
case DOUBLE_TAP: register_code(KC_ESC); break;
|
||||
case DOUBLE_HOLD: register_code(KC_LALT); break;
|
||||
case DOUBLE_SINGLE_TAP: register_code(KC_X); unregister_code(KC_X); register_code(KC_X);
|
||||
//Last case is for fast typing. Assuming your key is `f`:
|
||||
//For example, when typing the word `buffer`, and you want to make sure that you send `ff` and not `Esc`.
|
||||
//In order to type `ff` when typing fast, the next character will have to be hit within the `TAPPING_TERM`, which by default is 200ms.
|
||||
}
|
||||
}
|
||||
|
||||
void x_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||
switch (xtap_state.state) {
|
||||
case SINGLE_TAP: unregister_code(KC_X); break;
|
||||
case SINGLE_HOLD: unregister_code(KC_LCTRL); break;
|
||||
case DOUBLE_TAP: unregister_code(KC_ESC); break;
|
||||
case DOUBLE_HOLD: unregister_code(KC_LALT);
|
||||
case DOUBLE_SINGLE_TAP: unregister_code(KC_X);
|
||||
}
|
||||
xtap_state.state = 0;
|
||||
}
|
||||
```
|
||||
And then simply add this to your list of tap dance functions:
|
||||
`[X_TAP_DANCE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, x_finished, x_reset)`
|
33
docs/feature_userspace.md
Normal file
33
docs/feature_userspace.md
Normal file
@ -0,0 +1,33 @@
|
||||
# Userspace: sharing code between keymaps
|
||||
|
||||
If you use more than one keyboard with a similar keymap, you might see the benefit in being able to share code between them. Create your own folder in `users/` named the same as your keymap (ideally your github username, `<name>`) with the following structure:
|
||||
|
||||
* `/users/<name>/` (added to the path automatically)
|
||||
* `readme.md`
|
||||
* `rules.mk` (included automatically)
|
||||
* `<name>.h` (optional)
|
||||
* `<name>.c` (optional)
|
||||
|
||||
`<name>.c` will need to be added to the SRC in `rules.mk` like this:
|
||||
|
||||
SRC += <name>.c
|
||||
|
||||
Additional files may be added in the same way - it's recommended you have one named `<name>`.c/.h though.
|
||||
|
||||
All this only happens when you build a keymap named `<name>`, like this:
|
||||
|
||||
make planck:<name>
|
||||
|
||||
For example,
|
||||
|
||||
make planck:jack
|
||||
|
||||
Will include the `/users/jack/` folder in the path, along with `/users/jack/rules.mk`.
|
||||
|
||||
## Readme
|
||||
|
||||
Please include authorship (your name, github username, email), and optionally [a license that's GPL compatible](https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses).
|
||||
|
||||
## Example
|
||||
|
||||
For a brief example, checkout `/users/_example/` until we have more reasonable and useful examples.
|
123
docs/features.md
123
docs/features.md
@ -1,105 +1,26 @@
|
||||
# QMK Features
|
||||
|
||||
QMK has a staggering number of features for building your keyboard. It can take some time to understand all of them and determine which one will acheive your goal.
|
||||
|
||||
## Space Cadet Shift: The future, built in
|
||||
|
||||
Steve 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. Head on over to the [Space Cadet Shift](space_cadet_shift.md) page to read about it.
|
||||
|
||||
## The Leader key: A new kind of modifier
|
||||
|
||||
Most modifiers have to be held or toggled. But what if you had a key that indicated the start of a sequence? You could press that key and then rapidly press 1-3 more keys to trigger a macro, or enter a special layer, or anything else you might want to do. To learn more about it check out the [Leader Key](feature_leader_key.md) page.
|
||||
|
||||
## Tap Dance: A single key can do 3, 5, or 100 different things
|
||||
|
||||
Hit 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. Read more about it on the [Tap Dance](tap_dance.md) page.
|
||||
|
||||
## Temporarily setting the default layer
|
||||
|
||||
`DF(layer)` - sets default layer to _layer_. The default layer is the one at the "bottom" of the layer stack - the ultimate fallback layer. This currently does not persist over power loss. When you plug the keyboard back in, layer 0 will always be the default. It is theoretically possible to work around that, but that's not what `DF` does.
|
||||
|
||||
## Macro shortcuts: Send a whole string when pressing just one key
|
||||
|
||||
How would you like a single keypress to send a whole word, sentence, paragraph, or even document? Head on over to the [Macros](macros.md) page to read up on all aspects of Simple and Dynamic Macros.
|
||||
|
||||
## Additional keycode aliases for software-implemented layouts \(Colemak, Dvorak, etc\)
|
||||
|
||||
Everything is assuming you're in Qwerty \(in software\) by default, but there is built-in support for using a Colemak or Dvorak layout by including this at the top of your keymap:
|
||||
|
||||
```
|
||||
#include <keymap_colemak.h>
|
||||
```
|
||||
|
||||
If you use Dvorak, use `keymap_dvorak.h` instead of `keymap_colemak.h` for this line. After including this line, you will get access to:
|
||||
|
||||
* `CM_*` for all of the Colemak-equivalent characters
|
||||
* `DV_*` for all of the Dvorak-equivalent characters
|
||||
|
||||
These implementations assume you're using Colemak or Dvorak on your OS, not on your keyboard - this is referred to as a software-implemented layout. If your computer is in Qwerty and your keymap is in Colemak or Dvorak, this is referred to as a firmware-implemented layout, and you won't need these features.
|
||||
|
||||
To give an example, if you're using software-implemented Colemak, and want to get an `F`, you would use `CM_F`. Using `KC_F` under these same circumstances would result in `T`.
|
||||
|
||||
## Backlight Breathing
|
||||
|
||||
In order to enable backlight breathing, the following line must be added to your config.h file.
|
||||
|
||||
```
|
||||
#define BACKLIGHT_BREATHING
|
||||
```
|
||||
|
||||
The following function calls are used to control the breathing effect.
|
||||
|
||||
* `breathing_enable()` - Enable the free-running breathing effect.
|
||||
* `breathing_disable()` - Disable the free-running breathing effect immediately.
|
||||
* `breathing_self_disable()` - Disable the free-running breathing effect after the current effect ends.
|
||||
* `breathing_toggle()` - Toggle the free-running breathing effect.
|
||||
* `breathing_defaults()` - Reset the speed and brightness settings of the breathing effect.
|
||||
|
||||
The following function calls are used to control the maximum brightness of the breathing effect.
|
||||
|
||||
* `breathing_intensity_set(value)` - Set the brightness of the breathing effect when it is at its max value.
|
||||
* `breathing_intensity_default()` - Reset the brightness of the breathing effect to the default value based on the current backlight intensity.
|
||||
|
||||
The following function calls are used to control the cycling speed of the breathing effect.
|
||||
|
||||
* `breathing_speed_set(value)` - Set the speed of the breathing effect - how fast it cycles.
|
||||
* `breathing_speed_inc(value)` - Increase the speed of the breathing effect by a fixed value.
|
||||
* `breathing_speed_dec(value)` - Decrease the speed of the breathing effect by a fixed value.
|
||||
* `breathing_speed_default()` - Reset the speed of the breathing effect to the default value.
|
||||
|
||||
The following example shows how to enable the backlight breathing effect when the FUNCTION layer macro button is pressed:
|
||||
|
||||
```
|
||||
case MACRO_FUNCTION:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
breathing_speed_set(3);
|
||||
breathing_enable();
|
||||
layer_on(LAYER_FUNCTION);
|
||||
}
|
||||
else
|
||||
{
|
||||
breathing_speed_set(1);
|
||||
breathing_self_disable();
|
||||
layer_off(LAYER_FUNCTION);
|
||||
}
|
||||
break;
|
||||
```
|
||||
|
||||
The following example shows how to pulse the backlight on-off-on when the RAISED layer macro button is pressed:
|
||||
|
||||
```
|
||||
case MACRO_RAISED:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
layer_on(LAYER_RAISED);
|
||||
breathing_speed_set(2);
|
||||
breathing_pulse();
|
||||
update_tri_layer(LAYER_LOWER, LAYER_RAISED, LAYER_ADJUST);
|
||||
}
|
||||
else
|
||||
{
|
||||
layer_off(LAYER_RAISED);
|
||||
update_tri_layer(LAYER_LOWER, LAYER_RAISED, LAYER_ADJUST);
|
||||
}
|
||||
break;
|
||||
```
|
||||
* [Advanced Keycodes](feature_advanced_keycodes.md) - Change layers, type shifted keys, and more. Go beyond typing simple characters.
|
||||
* [Audio](feature_audio.md) - Connect a speaker to your keyboard for audio feedback, midi support, and music mode.
|
||||
* [Auto Shift](feature_auto_shift.md) - Tap for the normal key, hold slightly longer for its shifted state.
|
||||
* [Backlight](feature_backlight.md) - LED lighting support for your keyboard.
|
||||
* [Bootmagic](feature_bootmagic.md) - Adjust the behavior of your keyboard using hotkeys.
|
||||
* [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself.
|
||||
* [Key Lock](feature_key_lock.md) - Lock a key in the "down" state.
|
||||
* [Layouts](feature_layouts.md) - Use one keymap with any keyboard that supports your layout.
|
||||
* [Leader Key](feature_leader_key.md) - Tap the leader key followed by a sequence to trigger custom behavior.
|
||||
* [Macros](feature_macros.md) - Send multiple key presses when pressing only one physical key.
|
||||
* [Mouse keys](feature_mouse_keys.md) - Control your mouse pointer from your keyboard.
|
||||
* [Pointing Device](feature_pointing_device.md) - Framework for connecting your custom pointing device to your keyboard.
|
||||
* [PS2 Mouse](feature_ps2_mouse.md) - Driver for connecting a ps2 mouse directly to your keyboard.
|
||||
* [RGB Light](feature_rgblight.md) - RGB lighting for your keyboard.
|
||||
* [Space Cadet](feature_space_cadet_shift.md) - Use your left/right shift keys to type parenthesis and brackets.
|
||||
* [Stenography](feature_stenography.md) - Put your keyboard into Plover mode for stenography use.
|
||||
* [Tap Dance](feature_tap_dance.md) - Make a single key do as many things as you want.
|
||||
* [Terminal](feature_terminal.md) - CLI interface to the internals of your keyboard.
|
||||
* [Thermal Printer](feature_thermal_printer.md) - Connect a thermal printer to your keyboard to be able to toggle on a printed log of everything you type.
|
||||
* [Unicode](feature_unicode.md) - Unicode input support.
|
||||
* [Userspace](feature_userspace.md) - Share code between different keymaps and keyboards.
|
||||
|
74
docs/flashing.md
Normal file
74
docs/flashing.md
Normal file
@ -0,0 +1,74 @@
|
||||
# Flashing Intrustructions
|
||||
|
||||
There are quite a few different types of bootloaders that keyboards use, and just about all of the use a different flashing method. Luckily, projects like the [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) aim to be compatible with all the different types without having to think about it much, but this article will describe the different types of bootloaders, and available methods for flashing them.
|
||||
|
||||
## DFU
|
||||
|
||||
Atmel's DFU bootloader comes on all atmega32u4 chips by default, and is used by many keyboards that have their own ICs on their PCBs (Older OLKB boards, Clueboards). Some keyboards may also use LUFA's DFU bootloader (or QMK's fork) (Newer OLKB boards) that adds in additional features specific to that hardware.
|
||||
|
||||
These bootloaders are usually 4096 bytes for the atmega32u4 chip.
|
||||
|
||||
Compatible flashers:
|
||||
|
||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
|
||||
* [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` in QMK (recommended commandline)
|
||||
* [Atmel's Flip](http://www.atmel.com/tools/flip.aspx) (not recommended)
|
||||
|
||||
Flashing sequence:
|
||||
|
||||
1. Press the `RESET` keycode, or tap the RESET button (or short RST to GND).
|
||||
2. Wait for the OS to detect the device
|
||||
3. Erase the memory (may be done automatically)
|
||||
4. Flash a .hex file
|
||||
5. Reset the device into application mode (may be done automatically)
|
||||
|
||||
or:
|
||||
|
||||
make <keyboard>:<keymap>:dfu
|
||||
|
||||
## Caterina
|
||||
|
||||
Arduino boards and their clones use the [Caterina bootloader](https://github.com/arduino/Arduino/tree/master/hardware/arduino/avr/bootloaders/caterina) (any keyboard built with a Pro Micro, or clone), and uses the avr109 protocol to communicate through virtual serial. Bootloaders like [A-Star](https://www.pololu.com/docs/0J61/9) are based on Caterina.
|
||||
|
||||
This block of code allows for Caterina compatibility in QMK:
|
||||
|
||||
#define CATERINA_BOOTLOADER
|
||||
|
||||
These bootloaders are usually 4096 bytes for the atmega32u4 chip.
|
||||
|
||||
Compatible flashers:
|
||||
|
||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
|
||||
* [avrdude](http://www.nongnu.org/avrdude/) with avr109 / `:avrdude` (recommended commandline)
|
||||
* [AVRDUDESS](https://github.com/zkemble/AVRDUDESS)
|
||||
|
||||
Flashing sequence:
|
||||
|
||||
1. Press the `RESET` keycode, or short RST to GND quickly (you only have 7 seconds to flash once it enters)
|
||||
2. Wait for the OS to detect the device
|
||||
4. Flash a .hex file
|
||||
5. Wait for the device to reset automatically
|
||||
|
||||
or
|
||||
|
||||
make <keyboard>:<keymap>:avrdude
|
||||
|
||||
## Halfkay
|
||||
|
||||
Halfkay is a super-slim protocol developed by PJRC that uses HID, and come on all Teensys (namely the 2.0).
|
||||
|
||||
This bootloader is 512 bytes.
|
||||
|
||||
Compatible flashers:
|
||||
|
||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
|
||||
* [Teensy Loader](https://www.pjrc.com/teensy/loader.html)
|
||||
* [Teensy Loader Command Line](https://www.pjrc.com/teensy/loader_cli.html) (recommended commandline)
|
||||
|
||||
Flashing sequence:
|
||||
|
||||
1. Press the `RESET` keycode, or short RST to GND quickly (you only have 7 seconds to flash once it enters)
|
||||
2. Wait for the OS to detect the device
|
||||
4. Flash a .hex file
|
||||
5. Reset the device into application mode (may be done automatically)
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Installing Build Tools
|
||||
|
||||
This page describes setting up the build environment for QMK. These instructions cover AVR processors (such as the atmega32u4.)
|
||||
This page describes setting up the build environment for QMK. These instructions cover AVR processors (such as the atmega32u4).
|
||||
|
||||
<!-- FIXME: We should have ARM instructions somewhere. -->
|
||||
|
||||
@ -44,7 +44,7 @@ By default, this will download compilers for both AVR and ARM. If you don't need
|
||||
|
||||
nix-shell --arg arm false
|
||||
|
||||
## Mac
|
||||
## macOS
|
||||
If you're using [homebrew,](http://brew.sh/) you can use the following commands:
|
||||
|
||||
brew tap osx-cross/avr
|
||||
@ -58,10 +58,10 @@ This is the recommended method. If you don't have homebrew, [install it!](http:/
|
||||
|
||||
## Windows with msys2 (recommended)
|
||||
|
||||
The best environment to use, for Windows Vista through any later version (tested on 7 and 10,) is [msys2](http://www.msys2.org).
|
||||
The best environment to use, for Windows Vista through any later version (tested on 7 and 10), is [msys2](http://www.msys2.org).
|
||||
|
||||
* Install msys2 by downloading and following the instructions here: http://www.msys2.org
|
||||
* Open the "MSYS2 MingGW 64-bit" shortcut
|
||||
* Install msys2 by downloading it and following the instructions here: http://www.msys2.org
|
||||
* Open the ``MSYS2 MingGW 64-bit`` shortcut
|
||||
* Navigate to your qmk checkout. For example, if it's in the root of your c drive:
|
||||
* `$ cd /c/qmk_firmware`
|
||||
* Run `util/msys2_install.sh` and follow the prompts
|
||||
@ -80,7 +80,7 @@ If you already have cloned the repository on your Windows file system you can ig
|
||||
|
||||
You will need to clone the repository to your Windows file system using the normal Git for Windows and **not** the WSL Git. So if you haven't installed Git before, [download](https://git-scm.com/download/win) and install it. Then [set it up](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup), it's important that you setup the e-mail and user name, especially if you are planning to contribute.
|
||||
|
||||
Once Git is installed, open the Git bash command and change the directory to where you want to clone QMK, note that you have to use forward slashes, and that your c drive is accessed like this `/c/path/to/where/you/want/to/go`. Then run `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`, this will create a new folder `qmk_firmware` as a subfolder of the current one.
|
||||
Once Git is installed, open the Git Bash command and change the directory to where you want to clone QMK; note that you have to use forward slashes, and that your c drive is accessed like this `/c/path/to/where/you/want/to/go`. Then run `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`, this will create a new folder `qmk_firmware` as a subfolder of the current one.
|
||||
|
||||
### Toolchain setup
|
||||
The Toolchain setup is done through the Windows Subsystem for Linux, and the process is fully automated. If you want to do everything manually, there are no other instructions than the scripts themselves, but you can always open issues and ask for more information.
|
||||
@ -122,8 +122,11 @@ If this is a bit complex for you, Docker might be the turn-key solution you need
|
||||
# defaults are ergodox/default
|
||||
|
||||
docker run -e keymap=gwen -e keyboard=ergodox_ez --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware
|
||||
```
|
||||
|
||||
# On windows docker seems to have issue with VOLUME tag in Dockerfile, and $('pwd') won't print a windows compliant path, use full path instead like this
|
||||
On Windows Docker seems to have issues with the VOLUME tag in Dockerfile, and `$('pwd')` won't print a Windows compliant path; use full path instead, like this:
|
||||
|
||||
```bash
|
||||
docker run -e keymap=default -e keyboard=ergobox_ez --rm -v D:/Users/Sacapuces/Documents/Repositories/qmk:/qmk:rw edasque/qmk_firmware
|
||||
|
||||
```
|
||||
@ -131,4 +134,4 @@ docker run -e keymap=default -e keyboard=ergobox_ez --rm -v D:/Users/Sacapuces/D
|
||||
This will compile the targeted keyboard/keymap and leave it in your QMK directory for you to flash.
|
||||
|
||||
## Vagrant
|
||||
If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [vagrant guide](vagrant_guide.md).
|
||||
If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [vagrant guide](getting_started_vagrant.md).
|
||||
|
@ -52,7 +52,7 @@ To https://github.com/whoeveryouare/qmk_firmware.git
|
||||
+ 20043e64...7da94ac5 master -> master
|
||||
```
|
||||
|
||||
Your changes now exist on your fork on Github - if you go back there (https://github.com/<whoeveryouare>/qmk_firmware), you can create a "New Pull Request" by clicking this button:
|
||||
Your changes now exist on your fork on Github - if you go back there (`https://github.com/<whoeveryouare>/qmk_firmware`), you can create a "New Pull Request" by clicking this button:
|
||||
|
||||
![New Pull Request](http://i.imgur.com/DxMHpJ8.jpg)
|
||||
|
||||
@ -60,4 +60,4 @@ Here you'll be able to see exactly what you've committed - if it all looks good,
|
||||
|
||||
![Create Pull Request](http://i.imgur.com/Ojydlaj.jpg)
|
||||
|
||||
After submitting, we may talk to you about your changes, ask that you make changes, and eventually accept it! Thanks for contributing to QMK :)
|
||||
After submitting, we may talk to you about your changes, ask that you make changes, and eventually accept it! Thanks for contributing to QMK :)
|
||||
|
@ -1,22 +1,22 @@
|
||||
# Introduction
|
||||
|
||||
This page attempts to explain the basic information you need to know to work with the QMK project. It assumes that you are familiar with navigating a UNIX shell, but does not assume you are familiar with C or with compiling using make.
|
||||
This page attempts to explain the basic information you need to know to work with the QMK project. It assumes that you are familiar with navigating a Unix shell, but does not assume you are familiar with C or with compiling using make.
|
||||
|
||||
## Basic QMK structure
|
||||
|
||||
QMK is a fork of @tmk's [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders.
|
||||
QMK is a fork of [Jun Wako](https://github.com/tmk)'s [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders.
|
||||
|
||||
### Keyboard project structure
|
||||
|
||||
Within the `handwired` and `keyboard` folders is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within you'll find the following structure:
|
||||
Within the folder `keyboards` and its subfolder `handwired` is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within it you'll find the following structure:
|
||||
|
||||
* `keymaps/`: Different keymaps that can be built
|
||||
* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `Makefile`.
|
||||
* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `Makefile`
|
||||
* `config.h`: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific `config.h`.
|
||||
|
||||
### Keymap structure
|
||||
|
||||
In every keymap folder, the following files may be found. Only `keymap.c` is required, if the rest of the files are not found the default options will be chosen.
|
||||
In every keymap folder, the following files may be found. Only `keymap.c` is required, and if the rest of the files are not found the default options will be chosen.
|
||||
|
||||
* `config.h`: the options to configure your keymap
|
||||
* `keymap.c`: all of your keymap code, required
|
||||
@ -30,13 +30,13 @@ There are 2 `config.h` locations:
|
||||
* keyboard (`/keyboards/<keyboard>/config.h`)
|
||||
* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/config.h`)
|
||||
|
||||
If the keymap `config.h` exists that file is included by the build system and the keyboard `config.h` is not included. If you wish to override settings in your keymap's `config.h` you will need to include some glue code:
|
||||
If the keymap `config.h` exists, that file is included by the build system and the keyboard `config.h` is not included. If you wish to override settings in your keymap's `config.h` you will need to include some glue code:
|
||||
|
||||
```
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
#include "config_common.h"
|
||||
```
|
||||
|
||||
If you want to override a setting from the parent `config.h` file, you need to `#undef` and then `#define` the setting again, like this:
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user