From 435e9b7bdb89043b3ce8b0cfc9b0f3ee4d298166 Mon Sep 17 00:00:00 2001 From: yiancar Date: Fri, 10 Aug 2018 03:41:48 +0300 Subject: RGB Driver Documentation Update (#3601) - Minor formating in rgb matrix page - Added a short discription for is31fl3731 in drivers page --- docs/feature_rgb_matrix.md | 6 +++--- docs/hardware_drivers.md | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index cb7aa666cf..ed33c7ea4e 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -80,7 +80,7 @@ All RGB keycodes are currently shared with the RGBLIGHT system: These are the effects that are currently available: enum rgb_matrix_effects { - RGB_MATRIX_SOLID_COLOR = 1, + RGB_MATRIX_SOLID_COLOR = 1, RGB_MATRIX_ALPHAS_MODS, RGB_MATRIX_DUAL_BEACON, RGB_MATRIX_GRADIENT_UP_DOWN, @@ -93,7 +93,7 @@ These are the effects that are currently available: RGB_MATRIX_RAINBOW_MOVING_CHEVRON, RGB_MATRIX_JELLYBEAN_RAINDROPS, #ifdef RGB_MATRIX_KEYPRESSES - RGB_MATRIX_SOLID_REACTIVE, + RGB_MATRIX_SOLID_REACTIVE, RGB_MATRIX_SPLASH, RGB_MATRIX_MULTISPLASH, RGB_MATRIX_SOLID_SPLASH, @@ -107,7 +107,7 @@ These are the effects that are currently available: Custom layer effects can be done by defining this in your `.c`: void rgb_matrix_indicators_kb(void) { - // rgb_matrix_set_color(index, red, green, blue); + rgb_matrix_set_color(index, red, green, blue); } A similar function works in the keymap as `rgb_matrix_indicators_user`. diff --git a/docs/hardware_drivers.md b/docs/hardware_drivers.md index 46e6a71015..336bc908ef 100644 --- a/docs/hardware_drivers.md +++ b/docs/hardware_drivers.md @@ -25,3 +25,7 @@ You can make use of uGFX within QMK to drive character and graphic LCD's, LED ar ## WS2812 (AVR Only) Support for WS2811/WS2812{a,b,c} LED's. For more information see the [RGB Light](feature_rgblight.md) page. + +## IS31FL3731 (AVR Only) + +Support for up to 2 drivers. Each driver impliments 2 charlieplex matrices to individually address LEDs using I2C. This allows up to 144 same color LEDs or 32 RGB LEDs. For more information on how to setup the driver see the [RGB Matrix](feature_rgb_matrix.md) page. -- cgit v1.2.3 From d263b27c9a998e31084d7960724b3c243311c4cf Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 6 Aug 2018 13:08:26 +1000 Subject: Dedupe shifted keycodes listing --- docs/_sidebar.md | 3 +-- docs/_summary.md | 3 +-- docs/feature_advanced_keycodes.md | 30 +----------------------------- docs/features.md | 2 +- docs/keycodes.md | 2 +- 5 files changed, 5 insertions(+), 35 deletions(-) (limited to 'docs') diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 6c56bb2e51..69170d8bb1 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -68,11 +68,10 @@ * [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) * [RGB Light](feature_rgblight.md#rgblight-keycodes) * [RGB Matrix](feature_rgb_matrix.md#keycodes) - * [Shifted Keys](feature_advanced_keycodes.md#shifted-keycodes) + * [Shifted Keys](keycodes_us_ansi_shifted.md) * [Stenography](feature_stenography.md#keycode-reference) * [Swap Hands](feature_swap_hands.md#swap-keycodes) * [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes) - * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) * Reference * [Config Options](config_options.md) diff --git a/docs/_summary.md b/docs/_summary.md index 6c56bb2e51..69170d8bb1 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -68,11 +68,10 @@ * [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) * [RGB Light](feature_rgblight.md#rgblight-keycodes) * [RGB Matrix](feature_rgb_matrix.md#keycodes) - * [Shifted Keys](feature_advanced_keycodes.md#shifted-keycodes) + * [Shifted Keys](keycodes_us_ansi_shifted.md) * [Stenography](feature_stenography.md#keycode-reference) * [Swap Hands](feature_swap_hands.md#swap-keycodes) * [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes) - * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) * Reference * [Config Options](config_options.md) diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index 493a99fd73..f93b8033a5 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -1,6 +1,6 @@ # Advanced Keycodes -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. +Your keymap can include keycodes that are more advanced than normal, for example keys that switch layers or send modifiers when held, but send regular keycodes when tapped. This page documents the functions that are available to you. ### Assigning Custom Names @@ -73,34 +73,6 @@ 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 - -The following shortcuts automatically add `LSFT()` to keycodes to get commonly used symbols. - -|Key |Aliases |Description | -|------------------------|------------------|-------------------| -|`KC_TILDE` |`KC_TILD` |`~` | -|`KC_EXCLAIM` |`KC_EXLM` |`!` | -|`KC_AT` | |`@` | -|`KC_HASH` | |`#` | -|`KC_DOLLAR` |`KC_DLR` |`$` | -|`KC_PERCENT` |`KC_PERC` |`%` | -|`KC_CIRCUMFLEX` |`KC_CIRC` |`^` | -|`KC_AMPERSAND` |`KC_AMPR` |`&` | -|`KC_ASTERISK` |`KC_ASTR` |`*` | -|`KC_LEFT_PAREN` |`KC_LPRN` |`(` | -|`KC_RIGHT_PAREN` |`KC_RPRN` |`)` | -|`KC_UNDERSCORE` |`KC_UNDS` |`_` | -|`KC_PLUS` | |`+` | -|`KC_LEFT_CURLY_BRACE` |`KC_LCBR` |`{` | -|`KC_RIGHT_CURLY_BRACE` |`KC_RCBR` |`}` | -|`KC_PIPE` | ||| -|`KC_COLON` |`KC_COLN` |`:` | -|`KC_DOUBLE_QUOTE` |`KC_DQT`/`KC_DQUO`|`"` | -|`KC_LEFT_ANGLE_BRACKET` |`KC_LT`/`KC_LABK` |`<` | -|`KC_RIGHT_ANGLE_BRACKET`|`KC_GT`/`KC_RABK` |`>` | -|`KC_QUESTION` |`KC_QUES` |`?` | - # 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. diff --git a/docs/features.md b/docs/features.md index b10e0cc1de..537e1061cd 100644 --- a/docs/features.md +++ b/docs/features.md @@ -3,7 +3,7 @@ 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 achieve your goal. -* [Advanced Keycodes](feature_advanced_keycodes.md) - Change layers, type shifted keys, and more. Go beyond typing simple characters. +* [Advanced Keycodes](feature_advanced_keycodes.md) - Change layers, dual-action 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. diff --git a/docs/keycodes.md b/docs/keycodes.md index dbafecb829..fd3776bb72 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -402,7 +402,7 @@ This is a reference only. Each group of keys links to the page documenting their |`PRINT_ON` |Start printing everything the user types| |`PRINT_OFF`|Stop printing everything the user types | -## [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) +## [US ANSI Shifted Symbols](keycodes_us_ansi_shifted.md) |Key |Aliases |Description | |------------------------|-------------------|-------------------| -- cgit v1.2.3 From 2a49832db33598b8acee822fa7b3a6c6af48de0d Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sun, 5 Aug 2018 20:09:42 +1000 Subject: Update FAQ section on power keys --- docs/faq_keymap.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'docs') diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md index 447b892262..b05b968a6c 100644 --- a/docs/faq_keymap.md +++ b/docs/faq_keymap.md @@ -34,12 +34,11 @@ See [issue #168](https://github.com/tmk/tmk_keyboard/issues/168) and * http://en.wikipedia.org/wiki/Magic_SysRq_key * http://en.wikipedia.org/wiki/System_request -## Power Key Doesn't Work -Use `KC_PWR` instead of `KC_POWER` or vice versa. -* `KC_PWR` works with Windows and Linux, not with OSX. -* `KC_POWER` works with OSX and Linux, not with Windows. +## Power Keys Aren't Working -More info: http://geekhack.org/index.php?topic=14290.msg1327264#msg1327264 +Somewhat confusingly, there are two "Power" keycodes in QMK: `KC_POWER` in the Keyboard/Keypad HID usage page, and `KC_SYSTEM_POWER` (or `KC_PWR`) in the Consumer page. + +The former is only recognized on macOS, while the latter, `KC_SLEP` and `KC_WAKE` are supported by all three major operating systems, so it is recommended to use those instead. Under Windows, these keys take effect immediately, however on macOS they must be held down until a dialog appears. ## One Shot Modifier Solves my personal 'the' problem. I often got 'the' or 'THe' wrongly instead of 'The'. One Shot Shift mitigates this for me. -- cgit v1.2.3 From 09759c20ae8b0c40d8f3a7570558d60cc3b5907d Mon Sep 17 00:00:00 2001 From: skullydazed Date: Sat, 11 Aug 2018 23:02:06 -0700 Subject: Document FIRMWARE_FORMAT (#3631) --- docs/config_options.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs') diff --git a/docs/config_options.md b/docs/config_options.md index afc29fae9c..e978bcce82 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -199,6 +199,8 @@ This is a [make](https://www.gnu.org/software/make/manual/make.html) file that i * `DEFAULT_FOLDER` * Used to specify a default folder when a keyboard has more than one sub-folder. +* `FIRMWARE_FORMAT` + * Defines which format (bin, hex) is copied to the root `qmk_firmware` folder after building. * `SRC` * Used to add files to the compilation/linking list. * `LAYOUTS` -- cgit v1.2.3 From bfc9aa66f9ef8146da415a4229b3b9fc7c78ce54 Mon Sep 17 00:00:00 2001 From: zgtm Date: Wed, 15 Aug 2018 18:48:14 +0200 Subject: Docs: Update image in FAQ/Keymap: KC_EQLS -> KC_EQL (#3660) --- docs/faq_keymap.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md index b05b968a6c..07d74d6cf3 100644 --- a/docs/faq_keymap.md +++ b/docs/faq_keymap.md @@ -11,8 +11,8 @@ Keycodes are actually defined in [common/keycode.h](https://github.com/qmk/qmk_f 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: - -![Keyboard Layout Image](https://i.imgur.com/45m4mRf.png) + +![Keyboard Layout Image](https://i.imgur.com/gvlNUpQ.png) ## Some Of My Keys Are Swapped Or Not Working -- cgit v1.2.3 From da24a34efbfdeb80190b78f3f59451af86c4fb8b Mon Sep 17 00:00:00 2001 From: skullY Date: Sat, 11 Aug 2018 14:54:27 -0700 Subject: First pass at reorganizing docs --- docs/_sidebar.md | 68 +++++++++++++++++++++++--------------------------------- docs/_summary.md | 68 +++++++++++++++++++++++--------------------------------- 2 files changed, 56 insertions(+), 80 deletions(-) (limited to 'docs') diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 69170d8bb1..d439298dad 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -1,36 +1,50 @@ -* [Getting Started](README.md) - * [QMK Introduction](getting_started_introduction.md) - * [Install Build Tools](getting_started_build_tools.md) - * Alternative: [Vagrant Guide](getting_started_vagrant.md) - * [Build/Compile Instructions](getting_started_make_guide.md) - * [Flashing Firmware](flashing.md) - * [Contributing to QMK](contributing.md) - * [How to Use Github](getting_started_github.md) - * [Getting Help](getting_started_getting_help.md) - * [Complete Newbs Guide](newbs.md) * [Getting Started](newbs_getting_started.md) * [Building Your First Firmware](newbs_building_firmware.md) * [Flashing Firmware](newbs_flashing.md) * [Testing and Debugging](newbs_testing_debugging.md) +* [QMK Basics](README.md) + * [QMK Introduction](getting_started_introduction.md) + * [Contributing to QMK](contributing.md) + * [How to Use Github](getting_started_github.md) + * [Getting Help](getting_started_getting_help.md) + * [FAQ](faq.md) * [General FAQ](faq_general.md) * [Build/Compile QMK](faq_build.md) * [Debugging/Troubleshooting QMK](faq_debug.md) * [Keymap](faq_keymap.md) +* Detailed Guides + * [Install Build Tools](getting_started_build_tools.md) + * [Vagrant Guide](getting_started_vagrant.md) + * [Build/Compile Instructions](getting_started_make_guide.md) + * [Flashing Firmware](flashing.md) + * [Customizing Functionality](custom_quantum_functions.md) + * [Keymap Overview](keymap.md) + * [Hardware](hardware.md) - * [Keyboard Guidelines](hardware_keyboard_guidelines.md) * [AVR Processors](hardware_avr.md) - * ARM Processors (TBD) * [Drivers](hardware_drivers.md) +* Reference + * [Keyboard Guidelines](hardware_keyboard_guidelines.md) + * [Config Options](config_options.md) + * [Keycodes](keycodes.md) + * [Documentation Best Practices](documentation_best_practices.md) + * [Documentation Templates](documentation_templates.md) + * [Glossary](reference_glossary.md) + * [Unit Testing](unit_testing.md) + * [Features](features.md) + * [Basic Keycodes](keycodes_basic.md) + * [Quantum Keycodes](quantum_keycodes.md) * [Advanced Keycodes](feature_advanced_keycodes.md) * [Audio](feature_audio.md) * [Auto Shift](feature_auto_shift.md) * [Backlight](feature_backlight.md) + * [Bluetooth](feature_bluetooth.md) * [Bootmagic](feature_bootmagic.md) * [Command](feature_command.md) * [Dynamic Macros](feature_dynamic_macros.md) @@ -40,6 +54,7 @@ * [Leader Key](feature_leader_key.md) * [Macros](feature_macros.md) * [Mouse Keys](feature_mouse_keys.md) + * [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) * [Pointing Device](feature_pointing_device.md) * [PS/2 Mouse](feature_ps2_mouse.md) * [RGB Lighting](feature_rgblight.md) @@ -53,34 +68,7 @@ * [Thermal Printer](feature_thermal_printer.md) * [Unicode](feature_unicode.md) * [Userspace](feature_userspace.md) - -* [Keycodes](keycodes.md) - * [Basic](keycodes_basic.md) - * [Quantum](quantum_keycodes.md) - * [Audio](feature_audio.md#audio-keycodes) - * [Backlight](feature_backlight.md#backlight-keycodes) - * [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) - * [Mouse Keys](feature_mouse_keys.md#mapping-mouse-actions-to-keyboard-keys) - * [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) - * [RGB Light](feature_rgblight.md#rgblight-keycodes) - * [RGB Matrix](feature_rgb_matrix.md#keycodes) - * [Shifted Keys](keycodes_us_ansi_shifted.md) - * [Stenography](feature_stenography.md#keycode-reference) - * [Swap Hands](feature_swap_hands.md#swap-keycodes) - * [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes) - -* 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](reference_glossary.md) - * [Keymap Overview](keymap.md) - * [Unit Testing](unit_testing.md) + * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) * For Makers and Modders * [Hand Wiring Guide](hand_wire.md) diff --git a/docs/_summary.md b/docs/_summary.md index 69170d8bb1..d439298dad 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -1,36 +1,50 @@ -* [Getting Started](README.md) - * [QMK Introduction](getting_started_introduction.md) - * [Install Build Tools](getting_started_build_tools.md) - * Alternative: [Vagrant Guide](getting_started_vagrant.md) - * [Build/Compile Instructions](getting_started_make_guide.md) - * [Flashing Firmware](flashing.md) - * [Contributing to QMK](contributing.md) - * [How to Use Github](getting_started_github.md) - * [Getting Help](getting_started_getting_help.md) - * [Complete Newbs Guide](newbs.md) * [Getting Started](newbs_getting_started.md) * [Building Your First Firmware](newbs_building_firmware.md) * [Flashing Firmware](newbs_flashing.md) * [Testing and Debugging](newbs_testing_debugging.md) +* [QMK Basics](README.md) + * [QMK Introduction](getting_started_introduction.md) + * [Contributing to QMK](contributing.md) + * [How to Use Github](getting_started_github.md) + * [Getting Help](getting_started_getting_help.md) + * [FAQ](faq.md) * [General FAQ](faq_general.md) * [Build/Compile QMK](faq_build.md) * [Debugging/Troubleshooting QMK](faq_debug.md) * [Keymap](faq_keymap.md) +* Detailed Guides + * [Install Build Tools](getting_started_build_tools.md) + * [Vagrant Guide](getting_started_vagrant.md) + * [Build/Compile Instructions](getting_started_make_guide.md) + * [Flashing Firmware](flashing.md) + * [Customizing Functionality](custom_quantum_functions.md) + * [Keymap Overview](keymap.md) + * [Hardware](hardware.md) - * [Keyboard Guidelines](hardware_keyboard_guidelines.md) * [AVR Processors](hardware_avr.md) - * ARM Processors (TBD) * [Drivers](hardware_drivers.md) +* Reference + * [Keyboard Guidelines](hardware_keyboard_guidelines.md) + * [Config Options](config_options.md) + * [Keycodes](keycodes.md) + * [Documentation Best Practices](documentation_best_practices.md) + * [Documentation Templates](documentation_templates.md) + * [Glossary](reference_glossary.md) + * [Unit Testing](unit_testing.md) + * [Features](features.md) + * [Basic Keycodes](keycodes_basic.md) + * [Quantum Keycodes](quantum_keycodes.md) * [Advanced Keycodes](feature_advanced_keycodes.md) * [Audio](feature_audio.md) * [Auto Shift](feature_auto_shift.md) * [Backlight](feature_backlight.md) + * [Bluetooth](feature_bluetooth.md) * [Bootmagic](feature_bootmagic.md) * [Command](feature_command.md) * [Dynamic Macros](feature_dynamic_macros.md) @@ -40,6 +54,7 @@ * [Leader Key](feature_leader_key.md) * [Macros](feature_macros.md) * [Mouse Keys](feature_mouse_keys.md) + * [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) * [Pointing Device](feature_pointing_device.md) * [PS/2 Mouse](feature_ps2_mouse.md) * [RGB Lighting](feature_rgblight.md) @@ -53,34 +68,7 @@ * [Thermal Printer](feature_thermal_printer.md) * [Unicode](feature_unicode.md) * [Userspace](feature_userspace.md) - -* [Keycodes](keycodes.md) - * [Basic](keycodes_basic.md) - * [Quantum](quantum_keycodes.md) - * [Audio](feature_audio.md#audio-keycodes) - * [Backlight](feature_backlight.md#backlight-keycodes) - * [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) - * [Mouse Keys](feature_mouse_keys.md#mapping-mouse-actions-to-keyboard-keys) - * [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) - * [RGB Light](feature_rgblight.md#rgblight-keycodes) - * [RGB Matrix](feature_rgb_matrix.md#keycodes) - * [Shifted Keys](keycodes_us_ansi_shifted.md) - * [Stenography](feature_stenography.md#keycode-reference) - * [Swap Hands](feature_swap_hands.md#swap-keycodes) - * [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes) - -* 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](reference_glossary.md) - * [Keymap Overview](keymap.md) - * [Unit Testing](unit_testing.md) + * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) * For Makers and Modders * [Hand Wiring Guide](hand_wire.md) -- cgit v1.2.3 From eb19fb5b57487747d608fad986a70296da4deb12 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 25 Aug 2018 20:01:09 -0700 Subject: Helpful functions --- docs/_sidebar.md | 1 + docs/_summary.md | 1 + docs/feature_backlight.md | 19 +++++++++++++++++++ docs/ref_functions.md | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 69 insertions(+) create mode 100644 docs/ref_functions.md (limited to 'docs') diff --git a/docs/_sidebar.md b/docs/_sidebar.md index d439298dad..a35014dd8c 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -36,6 +36,7 @@ * [Documentation Templates](documentation_templates.md) * [Glossary](reference_glossary.md) * [Unit Testing](unit_testing.md) + * [Useful Functions](ref_functions.md) * [Features](features.md) * [Basic Keycodes](keycodes_basic.md) diff --git a/docs/_summary.md b/docs/_summary.md index d439298dad..a35014dd8c 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -36,6 +36,7 @@ * [Documentation Templates](documentation_templates.md) * [Glossary](reference_glossary.md) * [Unit Testing](unit_testing.md) + * [Useful Functions](ref_functions.md) * [Features](features.md) * [Basic Keycodes](keycodes_basic.md) diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md index 6140e6a0ab..8f883e08fb 100644 --- a/docs/feature_backlight.md +++ b/docs/feature_backlight.md @@ -51,3 +51,22 @@ In this way `OCRxx` essentially controls the duty cycle of the LEDs, and thus th The breathing effect is achieved by registering an interrupt handler for `TIMER1_OVF_vect` that is called whenever the counter resets, roughly 244 times per second. In this handler, the value of an incrementing counter is mapped onto a precomputed brightness curve. To turn off breathing, the interrupt handler is simply disabled, and the brightness reset to the level stored in EEPROM. + +## Backlight Functions + +|Function |Description | +|----------|----------------------------------------------------------| +|`backlight_toggle()` |Turn the backlight on or off | +|`backlight_step()` |Cycle through backlight levels | +|`backlight_increase()` |Increase the backlight level | +|`backlight_decrease()` |Decrease the backlight level | +|`backlight_level(x)` |Sets the backlight level to specified level | +|`get_backlight_level()`|Toggle backlight breathing | + +### Backlight Breathing Functions + +|Function |Description | +|----------|----------------------------------------------------------| +|`breathing_toggle()` |Turn the backlight breathing on or off | +|`breathing_enable()` |Turns on backlight breathing | +|`breathing_disable()` |Turns off backlight breathing | diff --git a/docs/ref_functions.md b/docs/ref_functions.md new file mode 100644 index 0000000000..7d0cda3227 --- /dev/null +++ b/docs/ref_functions.md @@ -0,0 +1,48 @@ +# List of Useful Core Functions To Make Your Keyboard Better + +There are a lot of hidden functions in QMK that are incredible useful, or may add a bit of functionality that you've been wanting. Functions that are specific to certain features are not included here, as those will be on their respective feature page. + +## (OLKB) Tri Layers + +There are actually separate functions that you can use there, depending on what you're after. + +The first is the `update_tri_layer(x, y, z)` function. This function check to see if layers `x` and `y` are both on. If they are both on, then it runs on layer `z`. Otherwise, if both `x` and `y` are not both on (either only one is, or neither is), then it runs off layer `z`. + +This function is useful if you want to create specific keys that have this functionality, but other layer keycodes won't do this. + +The other function is `update_tri_layer_state(state, x, y, z)`. This function is meant to be called from they [`layer_state_set_*` functions](custom_quantum_functions.md#layer-change-code). This means that any time that you use a keycode to change the layer, this will be checked. So you could use `LT(layer, kc)` to change the layer and it will trigger the same layer check. + +The caveat to this method is that you cannot access the `z` layer without having `x` and `y` layers on, since if you try to activate just layer `z`, it will run this code and turn off layer `z` before you could use it. + +## Setting the Persistent Default Layer + +Do you want to set the default layer, so that it's retained even after you unplug the board? If so, this is the function for you. + +To use this, you would use `set_single_persistent_default_layer(layer)`. If you have a name defined for your layer, you can use that instead (such as _QWERTY, _DVORAK or _COLEMAK). + +This will set the default layer, update the persistent settings, and play a tune if you have [Audio](feature_audio.md) enabled on your board, and the default layer sounds set. + +To configure the default layer sounds, you would want to define this in your `config.h` file, like this: + +```c +#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +``` + + +?> There are a large number of predefined songs in [quantum/audio/song_list.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/song_list.h) that you can use. + +## Reseting the keyboard + +There is the `RESET` quantum keycode that you can use. But if you want to reset the board as part of a macro, rather than hitting a key separately, you can do that. + +And to do so, add `reset_keyboard()` to your function or macro, and this will reset to bootloader. + +## Wiping the EEPROM (Persistent Storage) + +If you're having issues with Audio, RGB Underglow, backlighting or keys acting weird, then you can reset the EEPROM (persistent setting storage). Bootmagic is one way to do this, but if that isn't enabled, then you can use a custom macro to do so. + +To wipe the EEPROM, run `eeconfig_init()` from your function or macro to reset most of the settings to default. + -- cgit v1.2.3 From fdd0f915271f79b104aa5d216566bcc3fd134e85 Mon Sep 17 00:00:00 2001 From: yiancar Date: Tue, 28 Aug 2018 16:03:11 +0300 Subject: ISSI31FL3733 driver (#3679) * ISSI31FL3733 driver - Addapted IS31 driver for the above driver * fix my branch * ISSI31FL3733 driver - Inclusion of above ISSI led driver * IS31fl3733 driver - Added correct function for control registers * Finalized support for ISSI31fl3733 led driver - Finalized and tested driver. - Modified i2c_master for arm due to declaration mistake. - Fixed spaces/tabs in quantum.h file. - Fixed spaces/tabs in common_features.mk file. - Removed unnecessary includes from rgb_matrix.c file. - Added local definitions for MIN and MAX macros in rgb_matrix.c file. - Adjusted chevron effect. - Added necessary define (RGB_3733_MATRIX_ENABLE) for makefile. - Added necessary C define (ISSI3733) to aid with inclusion of the correct header file. - Added documentation for the new driver. * Driver structure update - Changed rule includes to be more condensed (RGB_MATRIX_ENABLE = IS31FL3731) and (RGB_MATRIX_ENABLE = IS31FL3733) - Updated documentation - Reverted to the use of differently named functions for each driver and selecting the needed ones within rgb_matrix.c * ISSI Drivers refractoring - Moved issi drivers in a dedicated folder - Updated documentation * I2C library fix I released the special pins incorrectly before. It is now fixed. --- docs/feature_rgb_matrix.md | 52 ++++++++++++++++++++++++++++++++++++++++++++-- docs/hardware_drivers.md | 6 +++++- 2 files changed, 55 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index ed33c7ea4e..4f827f8dc9 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -1,8 +1,12 @@ # RGB Matrix Lighting +## Driver configuration + +### IS31FL3731 + There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`: - RGB_MATRIX_ENABLE = yes + RGB_MATRIX_ENABLE = IS31FL3731 Configure the hardware via your `config.h`: @@ -36,7 +40,51 @@ Define these arrays listing all the LEDs in your `.c`: .... } -Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3731.pdf). The `driver` is the index of the driver you defined in your `config.h` (`0` or `1` right now). +Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731.h`. The `driver` is the index of the driver you defined in your `config.h` (`0` or `1` right now). + +### IS31FL3733 + +There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`: + + RGB_MATRIX_ENABLE = IS31FL3733 + +Configure the hardware via your `config.h`: + + // This is a 7-bit address, that gets left-shifted and bit 0 + // set to 0 for write, 1 for read (as per I2C protocol) + // The address will vary depending on your wiring: + // 00 <-> GND + // 01 <-> SCL + // 10 <-> SDA + // 11 <-> VCC + // ADDR1 represents A1:A0 of the 7-bit address. + // ADDR2 represents A3:A2 of the 7-bit address. + // The result is: 0b101(ADDR2)(ADDR1) + #define DRIVER_ADDR_1 0b1010000 + #define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. + + #define DRIVER_COUNT 1 + #define DRIVER_1_LED_TOTAL 64 + #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + +Currently only a single drivers is supported, but it would be trivial to support all 4 combinations. For now define `DRIVER_ADDR_2` as `DRIVER_ADDR_1` + +Define these arrays listing all the LEDs in your `.c`: + + const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + /* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, B_1, A_1, C_1}, + .... + } + +Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3733.pdf) and the header file `drivers/issi/is31fl3733.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0` right now). + +From this point forward the configuration is the same for all the drivers. const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { /* {row | col << 4} diff --git a/docs/hardware_drivers.md b/docs/hardware_drivers.md index 336bc908ef..4c1266f224 100644 --- a/docs/hardware_drivers.md +++ b/docs/hardware_drivers.md @@ -26,6 +26,10 @@ You can make use of uGFX within QMK to drive character and graphic LCD's, LED ar Support for WS2811/WS2812{a,b,c} LED's. For more information see the [RGB Light](feature_rgblight.md) page. -## IS31FL3731 (AVR Only) +## IS31FL3731 Support for up to 2 drivers. Each driver impliments 2 charlieplex matrices to individually address LEDs using I2C. This allows up to 144 same color LEDs or 32 RGB LEDs. For more information on how to setup the driver see the [RGB Matrix](feature_rgb_matrix.md) page. + +## IS31FL3733 + +Support for up to a single driver with room for expansion. Each driver can control 192 individual LEDs or 64 RGB LEDs. For more information on how to setup the driver see the [RGB Matrix](feature_rgb_matrix.md) page. \ No newline at end of file -- cgit v1.2.3 From 08c682c193f43e5d54df990680ae93fc2e06150a Mon Sep 17 00:00:00 2001 From: Evan Travers Date: Tue, 28 Aug 2018 19:35:24 -0500 Subject: Docs: Add docs for the `LAYOUT_*` macro to layouts (#3772) When moving my planck layout to my let's split, I ran into this issue because I had copied my planck layout from the default layout which just used the `{}` array form for the keymap layers. I checked the docs, but this bit wasn't clear to me. I'm sure @ishtob or @drashna helped me on discord, but this seemed to be the logical place to add a helpful hint. --- docs/feature_layouts.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'docs') diff --git a/docs/feature_layouts.md b/docs/feature_layouts.md index bfae920440..1ee8b5e35c 100644 --- a/docs/feature_layouts.md +++ b/docs/feature_layouts.md @@ -53,6 +53,8 @@ but the `LAYOUT_` variable must be defined in `.h` as well. ## Tips for Making Layouts Keyboard-Agnostic +### Includes + Instead of using `#include "planck.h"`, you can use this line to include whatever `.h` (`.h` should not be included here) file that is being compiled: #include QMK_KEYBOARD_H @@ -72,3 +74,7 @@ For example: ``` Note that the names are lowercase and match the folder/file names for the keyboard/revision exactly. + +### Keymaps + +In order to support both split and non-split keyboards with the same layout, you need to use the keyboard agnostic `LAYOUT_` macro in your keymap. For instance, in order for a Let's Split and Planck to share the same layout file, you need to use `LAYOUT_ortho_4x12` instead of `LAYOUT_planck_grid` or just `{}` for a C array. -- cgit v1.2.3 From 097f1a299f2d0e0e5afe174b8cfc1eea1b00c7cf Mon Sep 17 00:00:00 2001 From: fauxpark Date: Thu, 30 Aug 2018 11:05:02 +1000 Subject: Mask off keycode/layer/mod where possible in LT(), MT(), etc. (#3430) * Mask off keycode/layer/mod where possible in LT(), MT(), etc. * Don't need these parentheses * Put back parentheses for order of operations --- docs/feature_advanced_keycodes.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'docs') diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index f93b8033a5..5713234be1 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -13,9 +13,11 @@ People often define custom names using `#define`. For example: This will allow you to use `FN_CAPS` and `ALT_TAB` in your `KEYMAP()`, keeping it more readable. -### Limits of These Aliases +### Caveats -Currently, the keycodes able to used with these functions are limited to the [Basic Keycodes](keycodes_basic.md), 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.md). +Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Modifiers specified as part of a Layer Tap or Mod Tap's keycode will be ignored. + +Additionally, if at least one right-handed modifier is specified in a Mod Tap or Layer Tap, it will cause all modifiers specified to become right-handed, so it is not possible to mix and match the two. # Switching and Toggling Layers @@ -103,10 +105,6 @@ 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. -?> Due to the way that keycodes are structured, any modifiers specified as part of `kc`, such as `LCTL()` or `KC_LPRN`, will only activate when held instead of tapped. - -?> Additionally, if there is at least one right-handed modifier, any other modifiers in a chain of functions will turn into their right-handed equivalents, so it is not possible to "mix and match" the two. - # One Shot Keys One shot keys are keys that remain active until the next key is pressed, and then are released. This allows you to type keyboard combinations without pressing more than one key at a time. These keys are usually called "Sticky keys" or "Dead keys". -- cgit v1.2.3 From 4cd4e1ded686f2799cfd87750200fcd6fba445ee Mon Sep 17 00:00:00 2001 From: arlenk <33534303+arlenk@users.noreply.github.com> Date: Wed, 29 Aug 2018 21:20:41 -0400 Subject: Docs: add process_terminal() and update links to other functions (#3778) * add process_terminal() and update links to other functions * convert links to permalinks and add a few missing process_* functions * update links in main text as well --- docs/understanding_qmk.md | 53 ++++++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 24 deletions(-) (limited to 'docs') diff --git a/docs/understanding_qmk.md b/docs/understanding_qmk.md index 4544cb2602..bf695d008d 100644 --- a/docs/understanding_qmk.md +++ b/docs/understanding_qmk.md @@ -12,7 +12,7 @@ You can think of QMK as no different from any other computer program. It is star The reason for this is the different platforms that QMK supports. The most common platform is `lufa`, which runs on AVR processors such at the atmega32u4. We also support `chibios` and `vusb`. -We'll focus on AVR processors for the moment, which use the `lufa` platform. You can find the `main()` function in [tmk_core/protocol/lufa/lufa.c](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/protocol/lufa/lufa.c#L1129). If you browse through that function you'll find that it initializes any hardware that has been configured (including USB to the host) and then it starts the core part of the program with a [`while(1)`](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/protocol/lufa/lufa.c#L1182). This is [The Main Loop](#the_main_loop). +We'll focus on AVR processors for the moment, which use the `lufa` platform. You can find the `main()` function in [tmk_core/protocol/lufa/lufa.c](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/tmk_core/protocol/lufa/lufa.c#L1019). If you browse through that function you'll find that it initializes any hardware that has been configured (including USB to the host) and then it starts the core part of the program with a [`while(1)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/tmk_core/protocol/lufa/lufa.c#L1060). This is [The Main Loop](#the-main-loop). ## The Main Loop @@ -22,7 +22,7 @@ This section of code is called "The Main Loop" because it's responsible for loop keyboard_task(); ``` -This is where all the keyboard specific functionality is dispatched. The source code for `keyboard_task()` can be found in [tmk_core/common/keyboard.c](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keyboard.c#L154), and it is responsible for detecting changes in the matrix and turning status LED's on and off. +This is where all the keyboard specific functionality is dispatched. The source code for `keyboard_task()` can be found in [tmk_core/common/keyboard.c](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/tmk_core/common/keyboard.c#L206), and it is responsible for detecting changes in the matrix and turning status LED's on and off. Within `keyboard_task()` you'll find code to handle: @@ -77,7 +77,7 @@ At the keyboard level we define a C macro (typically named `KEYMAP()`) which map Notice how the second block of our `KEYMAP()` macro matches the Matrix Scanning array above? This macro is what will map the matrix scanning array to keycodes. However, if you look at a 17 key numpad you'll notice that it has 3 places where the matrix could have a switch but doesn't, due to larger keys. We have populated those spaces with `KC_NO` so that our keymap definition doesn't have to. -You can also use this macro to handle unusual matrix layouts, for example the [Clueboard rev 2](https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/66/rev2/rev2.h). Explaining that is outside the scope of this document. +You can also use this macro to handle unusual matrix layouts, for example the [Clueboard rev 2](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/keyboards/clueboard/66/rev2/rev2.h). Explaining that is outside the scope of this document. ##### Keycode Assignment @@ -129,27 +129,32 @@ Comparing against our keymap we can see that the pressed key is KC_NLCK. From he ##### Process Record - -The `process_record()` function itself is deceptively simple, but hidden within is a gateway to overriding functionality at various levels of QMK. The chain of events is described below, using cluecard whenever we need to look at the keyboard/keymap level functions. - -* [`void process_record(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action.c#L128) - * [`bool process_record_quantum(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum.c#L140) - * [Map this record to a keycode](https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum.c#L143) - * [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/card/card.c#L20) - * [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/card/keymaps/default/keymap.c#L58) - * [`bool process_midi(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_midi.c#L102) - * [`bool process_audio(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_audio.c#L10) - * [`bool process_music(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_music.c#L69) - * [`bool process_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_tap_dance.c#L75) - * [`bool process_leader(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_leader.c#L32) - * [`bool process_chording(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_chording.c#L41) - * [`bool process_combo(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_combo.c#L115) - * [`bool process_unicode(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicode.c#L22) - * [`bool process_ucis(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_ucis.c#L91) - * [`bool process_printer(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_printer.c#L77) - * [`bool process_auto_shift(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_auto_shift.c#L47) - * [`bool process_unicode_map(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicodemap.c#L47) - * [Identify and process quantum specific keycodes](https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum.c#L211) +The `process_record()` function itself is deceptively simple, but hidden within is a gateway to overriding functionality at various levels of QMK. The chain of events is listed below, using cluecard whenever we need to look at the keyboard/keymap level functions. Depending on options set in rule.mk or elsewhere, only a subset of the functions below will be included in final firmware. + +* [`void process_record(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/tmk_core/common/action.c#L172) + * [`bool process_record_quantum(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/quantum/quantum.c#L193) + * [Map this record to a keycode](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/quantum/quantum.c#L213) + * [`void preprocess_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/quantum/process_keycode/process_tap_dance.c#L115) + * [`bool process_key_lock(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/quantum/process_keycode/process_key_lock.c#L62) + * [`bool process_clicky(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/quantum/process_keycode/process_clicky.c#L44) + * [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/keyboards/clueboard/card/card.c#L20) + * [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/keyboards/clueboard/card/keymaps/default/keymap.c#L58) + * [`bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/fdd0f915271f79b104aa5d216566bcc3fd134e85/quantum/rgb_matrix.c#L139) + * [`bool process_midi(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_midi.c#L81) + * [`bool process_audio(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_audio.c#L19) + * [`bool process_steno(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_steno.c#L160) + * [`bool process_music(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_music.c#L114) + * [`bool process_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_tap_dance.c#L136) + * [`bool process_leader(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_leader.c#L38) + * [`bool process_chording(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_chording.c#L41) + * [`bool process_combo(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_combo.c#L115) + * [`bool process_unicode(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_unicode.c#L22) + * [`bool process_ucis(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_ucis.c#L91) + * [`bool process_printer(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_printer.c#L77) + * [`bool process_auto_shift(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_auto_shift.c#L94) + * [`bool process_unicode_map(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_unicodemap.c#L47) + * [`bool process_terminal(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_terminal.c#L264) + * [Identify and process quantum specific keycodes](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/quantum.c#L287) At any step during this chain of events a function (such as `process_record_kb()`) can `return false` to halt all further processing. -- cgit v1.2.3 From 1acaf2b2c22eb6bd77374b93101480207829db04 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Thu, 30 Aug 2018 16:22:29 +1000 Subject: Tweak the wording in "Becoming a QMK Collaborator" --- docs/becoming_a_qmk_collaborator.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/becoming_a_qmk_collaborator.md b/docs/becoming_a_qmk_collaborator.md index 3cac63c97b..16ae0d569e 100644 --- a/docs/becoming_a_qmk_collaborator.md +++ b/docs/becoming_a_qmk_collaborator.md @@ -1,7 +1,9 @@ -A QMK collaborator is a keyboard maker/designer that is interested in helping QMK grow and fully support their keyboard(s), and encouraging their users/customers to submit features, ideas, and keymaps. We're always looking to add more keyboards and collaborators, but we ask that they fulfill these requirements: +# Becoming a QMK Collaborator -* **Have a PCB available for sale** - unfortunately there's just too much variation and complications with handwired keyboards. -* **Maintain the your keyboard's directory** - this may just require an initial setup to get your keyboard working, but it could also include accommodating changes made to QMK's core. -* **Approve and merge your keyboard's keymap pull requests** - we like to encourage users to contribute their keymaps for others to see and work from when creating their own. +A QMK collaborator is a keyboard maker or designer that is interested in helping QMK grow and fully support their keyboard(s), and encouraging their users and customers to submit features, ideas, and keymaps. We're always looking to add more keyboards and collaborators, but we ask that they fulfill these requirements: + +* **Have a PCB available for sale.** Unfortunately there's just too much variation and complications with handwired keyboards. +* **Maintain your keyboard in QMK.** This may just require an initial setup to get your keyboard working, but it could also include accommodating changes made to QMK's core that might break or render any custom code redundant. +* **Approve and merge keymap pull requests for your keyboard.** We like to encourage users to contribute their keymaps for others to see and work from when creating their own. If you feel you meet these requirements, shoot us an email at hello@qmk.fm with an introduction and some links to your keyboard! -- cgit v1.2.3 From ce3ccd3f4a5e8ff8ac391887f3357dd8e985a452 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 31 Aug 2018 02:37:05 +1000 Subject: Docs: Tabulate Modifier & Mod-Tap keycode listings in advanced keycodes docs (#3799) --- docs/feature_advanced_keycodes.md | 114 ++++++++++++++++++++++---------------- docs/keycodes.md | 4 +- 2 files changed, 69 insertions(+), 49 deletions(-) (limited to 'docs') diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index 5713234be1..5f30359e0d 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -57,53 +57,73 @@ Sometimes, you might want to switch between layers in a macro or as part of a ta # 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. - -* `LSFT(kc)` or `S(kc)` - applies left Shift to *kc* (keycode) -* `RSFT(kc)` - applies right Shift to *kc* -* `LCTL(kc)` - applies left Control to *kc* -* `RCTL(kc)` - applies right Control to *kc* -* `LALT(kc)` - applies left Alt to *kc* -* `RALT(kc)` - applies right Alt to *kc* -* `LGUI(kc)` - applies left GUI (command/win) to *kc* -* `RGUI(kc)` - applies right GUI (command/win) to *kc* -* `HYPR(kc)` - applies Hyper (all modifiers) to *kc* -* `MEH(kc)` - applies Meh (all modifiers except Win/Cmd) to *kc* -* `LCAG(kc)` - applies CtrlAltGui to *kc* - -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. - -# 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. - -These are the values you can use for the `mod` in `MT()` and `OSM()`: - - * MOD_LCTL - * MOD_LSFT - * MOD_LALT - * MOD_LGUI - * MOD_RCTL - * MOD_RSFT - * MOD_RALT - * MOD_RGUI - * MOD_HYPR - * MOD_MEH - -These can also be combined like `MOD_LCTL | MOD_LSFT` e.g. `MT(MOD_LCTL | MOD_LSFT, KC_ESC)` which would activate Control and Shift when held, and send Escape when tapped. - -We've added shortcuts to make common modifier/tap (mod-tap) mappings more compact: - - * `CTL_T(kc)` - is LCTL when held and *kc* when tapped - * `SFT_T(kc)` - is LSFT when held and *kc* when tapped - * `ALT_T(kc)` - is LALT when held and *kc* when tapped - * `ALGR_T(kc)` - is AltGr when held and *kc* when tapped - * `GUI_T(kc)` - is LGUI when held and *kc* when tapped - * `ALL_T(kc)` - is Hyper (all mods) when held and *kc* when tapped. To read more about what you can do with a Hyper key, see [this blog post by Brett Terpstra](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/) - * `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. +These allow you to combine a modifier with a keycode. When pressed, the keydown event for the modifier, then `kc` will be sent. On release, the keyup event for `kc`, then the modifier will be sent. + +|Key |Aliases |Description | +|----------|----------------------|----------------------------------------------------| +|`LCTL(kc)`| |Hold Left Control and press `kc` | +|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` | +|`LALT(kc)`| |Hold Left Alt and press `kc` | +|`LGUI(kc)`|`LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` | +|`RCTL(kc)`| |Hold Right Control and press `kc` | +|`RSFT(kc)`| |Hold Right Shift and press `kc` | +|`RALT(kc)`| |Hold Right Alt and press `kc` | +|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)`|Hold Right GUI and press `kc` | +|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`| +|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` | +|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` | +|`ALTG(kc)`| |Hold Right Control and Alt and press `kc` | +|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and GUI and press `kc` | +|`LCA(kc)` | |Hold Left Control and Alt and press `kc` | + +You can also chain them, for example `LCTL(LALT(KC_DEL))` makes a key that sends Control+Alt+Delete with a single keypress. + +# Mod-Tap + +The Mod-Tap key `MT(mod, kc)` acts like a modifier when held, and a regular keycode when tapped. In other words, you can have a key that sends Escape when you tap it, but functions as a Control or Shift key when you hold it down. + +The modifiers this keycode and `OSM()` accept are prefixed with `MOD_`, not `KC_`: + +|Modifier |Description | +|----------|----------------------------------------| +|`MOD_LCTL`|Left Control | +|`MOD_LSFT`|Left Shift | +|`MOD_LALT`|Left Alt | +|`MOD_LGUI`|Left GUI (Windows/Command/Meta key) | +|`MOD_RCTL`|Right Control | +|`MOD_RSFT`|Right Shift | +|`MOD_RALT`|Right Alt | +|`MOD_RGUI`|Right GUI (Windows/Command/Meta key) | +|`MOD_HYPR`|Hyper (Left Control, Shift, Alt and GUI)| +|`MOD_MEH` |Meh (Left Control, Shift, and Alt) | + +You can combine these by ORing them together like so: + +```c +MT(MOD_LCTL | MOD_LSFT, KC_ESC) +``` + +This key would activate Left Control and Left Shift when held, and send Escape when tapped. + +For convenience, QMK includes some Mod-Tap shortcuts to make common combinations more compact in your keymap: + +|Key |Aliases |Description | +|------------|---------------------------------------|-------------------------------------------------------| +|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped | +|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped | +|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped | +|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped | +|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped | +|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped | +|`LGUI_T(kc)`|`LCMD_T(kc)`, `RWIN_T(kc)`, `GUI_T(kc)`|Left GUI when held, `kc` when tapped | +|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | +|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | +|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped| +|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped | +|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped | +|`ALL_T(kc)` | |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)| +|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | +|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | # One Shot Keys diff --git a/docs/keycodes.md b/docs/keycodes.md index fd3776bb72..c344a75283 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -318,7 +318,7 @@ This is a reference only. Each group of keys links to the page documenting their ## [Modifiers](feature_advanced_keycodes.md#modifier-keys) |Key |Aliases |Description | -|----------|---------- |----------------------------------------------------| +|----------|----------------------|----------------------------------------------------| |`KC_HYPR` | |Hold Left Control, Shift, Alt and GUI | |`KC_MEH` | |Hold Left Control, Shift and Alt | |`LCTL(kc)`| |Hold Left Control and press `kc` | @@ -353,7 +353,7 @@ This is a reference only. Each group of keys links to the page documenting their |`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped | |`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped | |`ALL_T(kc)` | |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)| -|`SCMD_T(kc)`|`SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | +|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | |`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | ## [RGB Lighting](feature_rgblight.md) -- cgit v1.2.3 From 73a3399d0ef7e06db70fc2964a3f2a35e9aca25d Mon Sep 17 00:00:00 2001 From: yiancar Date: Fri, 24 Aug 2018 15:38:31 +0300 Subject: Add the ability to disable the USB startup check for Chibios - Added support for NO_USB_STARTUP_CHECK. This allows the keyboard do function and not get stuck in a SUSPENDED state loop in case of no USB connection. - Added support for WAIT_FOR_USB. In LUFA no keyboard has this flag enable therefor no keyboard waits for usb to be active. - Added documentation for both configuration flags as they were missing. --- docs/config_options.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs') diff --git a/docs/config_options.md b/docs/config_options.md index e978bcce82..eaaa59872c 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -248,3 +248,7 @@ Use these to enable or disable building certain features. The more you have enab * Enable Bluetooth with the Adafruit EZ-Key HID * `SPLIT_KEYBOARD` * Enables split keyboard support (dual MCU like the let's split and bakingpy's boards) and includes all necessary files located at quantum/split_common +* `WAIT_FOR_USB` + * Forces the keyboard to wait for a USB connection to be established before it starts up +* `NO_USB_STARTUP_CHECK` + * Disables usb suspend check after keyboard startup. Usually the keyboard waits for the host to wake it up before any tasks are performed. This is useful for split keyboards as one half will not get a wakeup call but must send commands to the master. -- cgit v1.2.3 From 6d6d91c834ef3415425e21d895d4ec91c67fd4b8 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Fri, 14 Sep 2018 02:24:10 +0900 Subject: rgblight.[ch] more configurable (#3582) * add temporary test code rgblight-macro-test1.[ch] * rgblight.h : mode auto numberring and auto generate mode name symbol No change in build result. * rgblight.c use RGBLIGHT_MODE_xxx symbols No change in build result. * quantum.c use RGBLIGHT_MODE_xxx symbols No change in build result. * fix build break. when RGB_MATRIX_ENABLE defined * add temporary test code rgblight-mac