diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/_summary.md | 50 | ||||
-rw-r--r-- | docs/config_options.md | 299 | ||||
-rw-r--r-- | docs/contributing.md | 2 | ||||
-rw-r--r-- | docs/faq_keymap.md | 11 | ||||
-rw-r--r-- | docs/feature_advanced_keycodes.md (renamed from docs/feature_common_shortcuts.md) | 18 | ||||
-rw-r--r-- | docs/feature_dynamic_macros.md (renamed from docs/dynamic_macros.md) | 0 | ||||
-rw-r--r-- | docs/feature_key_lock.md (renamed from docs/key_lock.md) | 0 | ||||
-rw-r--r-- | docs/feature_macros.md (renamed from docs/macros.md) | 0 | ||||
-rw-r--r-- | docs/feature_mouse_keys.md (renamed from docs/mouse_keys.md) | 0 | ||||
-rw-r--r-- | docs/feature_space_cadet.md (renamed from docs/space_cadet_shift.md) | 0 | ||||
-rw-r--r-- | docs/feature_tap_dance.md (renamed from docs/tap_dance.md) | 0 | ||||
-rw-r--r-- | docs/feature_unicode.md (renamed from docs/unicode.md) | 0 | ||||
-rw-r--r-- | docs/features.md | 125 | ||||
-rw-r--r-- | docs/getting_started_make_guide.md | 2 | ||||
-rw-r--r-- | docs/glossary.md | 12 | ||||
-rw-r--r-- | docs/hardware.md | 8 | ||||
-rw-r--r-- | docs/hardware_avr.md | 157 | ||||
-rw-r--r-- | docs/hardware_drivers.md | 27 | ||||
-rw-r--r-- | docs/hardware_keyboard_guidelines.md (renamed from docs/adding_a_keyboard_to_qmk.md) | 34 | ||||
-rw-r--r-- | docs/keycodes.md | 36 | ||||
-rw-r--r-- | docs/porting_your_keyboard_to_qmk.md | 63 | ||||
-rw-r--r-- | docs/quantum_keycodes.md | 2 | ||||
-rw-r--r-- | docs/redirects.json | 34 |
23 files changed, 530 insertions, 350 deletions
diff --git a/docs/_summary.md b/docs/_summary.md index 55cfd2ab3d..b433181a60 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -12,57 +12,61 @@ * [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) - * [Userspace](feature_userspace.md) + * [Advanced Keycodes](feature_advanced_keycodes.md) + * [Audio](feature_audio.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) + * [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) * Reference + * [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) * [Keycodes](keycodes.md) - * [Basic](keycodes_basic.md) - * [Quantum](quantum_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_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) + * [Quantum](quantum_keycodes.md) * [RGB Light](feature_rgblight.md#rgblight-keycodes) + * [Shifted Keys](feature_common_shortcuts.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) - * [The `config.h` File](config_options.md) - * [Customizing Functionality](custom_quantum_functions.md) - * [Documentation Best Practices](documentation_best_practices.md) - * [Documentation Templates](documentation_templates.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) * [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) diff --git a/docs/config_options.md b/docs/config_options.md index b71dbb8ae9..de67630adc 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -1,129 +1,198 @@ -# The `config.h` file - -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: - -## Keyboard +# Configuring QMK -```c -#ifndef CONFIG_H -#define CONFIG_H +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. -#include "config_common.h" +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: -// config options +* QMK Default +* Keyboard +* Folders (Up to 5 levels deep) +* Keymap -#endif -``` +## QMK Default -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. +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. -## Revisions - -```c -#ifndef <revision>_CONFIG_H -#define <revision>_CONFIG_H - -#include "config_common.h" +## Keyboard -// config options +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. -#endif -``` +## Folders -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 - -#include "config_common.h" - -// config options - -#endif -``` - -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. - -# Config Options - -```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) - -#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 +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. -#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() ( \ // key combination that allows the use of magic commands (useful for debugging) - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -// 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 - -#define FORCE_NKRO // NKRO by default requires to be turned on, this forces it to be on always - -#define PREVENT_STUCK_MODIFIERS // when switching layers, this will release all mods - -#define TAPPING_TERM 200 // how long before a tap becomes a hold -#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 - -// 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) - -#define RGBW_BB_TWI // bit-bangs twi to EZ RGBW LEDs (only required for Ergodox EZ) - -// 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 +# The `config.h` file -```
\ No newline at end of file +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. + +## `config.h` Options + +### 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) + +### Features That Can Be Disabled + +If you define these options you will disable the associated feature, which can save on code size. + +* `#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) + +### Features That Can Be Enabled + +If you define these options you will enable the associated feature, which may increase your code size. + +* `#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 + +### Behaviors That Can Be Configured + +* `#define TAPPING_TERM 200` + * how long before a tap becomes a hold +* `#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 + +### RGB Light Configuration + +* `#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) + +### Mouse Key Options + +* `#define MOUSEKEY_INTERVAL 20` +* `#define MOUSEKEY_DELAY 0` +* `#define MOUSEKEY_TIME_TO_MAX 60` +* `#define MOUSEKEY_MAX_SPEED 7` +* `#define MOUSEKEY_WHEEL_DELAY 0` + +# The `rules.mk` File + +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. + +## `rules.mk` options + +### Build Options + +* `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. + +### AVR MCU Options +* `MCU = atmega32u4` +* `F_CPU = 16000000` +* `ARCH = AVR8` +* `F_USB = $(F_CPU)` +* `OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT` +* `OPT_DEFS += -DBOOTLOADER_SIZE=4096` + +### Feature Options + +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. + +* `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 diff --git a/docs/contributing.md b/docs/contributing.md index 58af8ce53b..4acbdc1f03 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -144,4 +144,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. diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md index eb49a36996..83eeb235ef 100644 --- a/docs/faq_keymap.md +++ b/docs/faq_keymap.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'. diff --git a/docs/feature_common_shortcuts.md b/docs/feature_advanced_keycodes.md index e942b26c8b..95a20340e4 100644 --- a/docs/feature_common_shortcuts.md +++ b/docs/feature_advanced_keycodes.md @@ -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,7 @@ 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 +# 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 +69,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 +97,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 +127,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. diff --git a/docs/dynamic_macros.md b/docs/feature_dynamic_macros.md index 4dd8a39e6f..4dd8a39e6f 100644 --- a/docs/dynamic_macros.md +++ b/docs/feature_dynamic_macros.md diff --git a/docs/key_lock.md b/docs/feature_key_lock.md index e424061a9a..e424061a9a 100644 --- a/docs/key_lock.md +++ b/docs/feature_key_lock.md diff --git a/docs/macros.md b/docs/feature_macros.md index 66d2bc090a..66d2bc090a 100644 --- a/docs/macros.md +++ b/docs/feature_macros.md diff --git a/docs/mouse_keys.md b/docs/feature_mouse_keys.md index 560bd04705..560bd04705 100644 --- a/docs/mouse_keys.md +++ b/docs/feature_mouse_keys.md diff --git a/docs/space_cadet_shift.md b/docs/feature_space_cadet.md index a1ec256def..a1ec256def 100644 --- a/docs/space_cadet_shift.md +++ b/docs/feature_space_cadet.md diff --git a/docs/tap_dance.md b/docs/feature_tap_dance.md index 32dffa9cd3..32dffa9cd3 100644 --- a/docs/tap_dance.md +++ b/docs/feature_tap_dance.md diff --git a/docs/unicode.md b/docs/feature_unicode.md index 2dfb38d96a..2dfb38d96a 100644 --- a/docs/unicode.md +++ b/docs/feature_unicode.md diff --git a/docs/features.md b/docs/features.md index 2ef4361563..afffead499 100644 --- a/docs/features.md +++ b/docs/features.md @@ -1,105 +1,24 @@ # QMK Features - -## 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; -```
\ No newline at end of file +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. + + +* [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. +* [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. +* [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 diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md index b6f0f4ee27..29560b8461 100644 --- a/docs/getting_started_make_guide.md +++ b/docs/getting_started_make_guide.md @@ -131,7 +131,7 @@ This consumes about 5390 bytes. `KEY_LOCK_ENABLE` -This enables [key lock](key_lock.md). This consumes an additional 260 bytes. +This enables [key lock](feature_key_lock.md). This consumes an additional 260 bytes. ## Customizing Makefile options on a per-keymap basis diff --git a/docs/glossary.md b/docs/glossary.md index e1103ec94a..67820c7b22 100644 --- a/docs/glossary.md +++ b/docs/glossary.md @@ -36,7 +36,7 @@ An alternative keyboard layout developed by Dr. August Dvorak in the 1930's. A s ## Dynamic Macro A macro which has been recorded on the keyboard and which will be lost when the keyboard is unplugged or the computer rebooted. -* [Dynamic Macro Documentation](dynamic_macros.html) +* [Dynamic Macro Documentation](feature_dynamic_macros.md) ## Eclipse An IDE that is popular with many C developers. @@ -93,7 +93,7 @@ A wiring |