diff options
Diffstat (limited to 'docs')
80 files changed, 1158 insertions, 694 deletions
diff --git a/docs/_summary.md b/docs/_summary.md index 2f6309e41..4b528d996 100644 --- a/docs/_summary.md +++ b/docs/_summary.md | |||
@@ -72,6 +72,7 @@ | |||
72 | * [Mod-Tap](mod_tap.md) | 72 | * [Mod-Tap](mod_tap.md) |
73 | * [Macros](feature_macros.md) | 73 | * [Macros](feature_macros.md) |
74 | * [Mouse Keys](feature_mouse_keys.md) | 74 | * [Mouse Keys](feature_mouse_keys.md) |
75 | * [Programmable Button](feature_programmable_button.md) | ||
75 | * [Space Cadet Shift](feature_space_cadet.md) | 76 | * [Space Cadet Shift](feature_space_cadet.md) |
76 | * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) | 77 | * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) |
77 | 78 | ||
diff --git a/docs/audio_driver.md b/docs/audio_driver.md index 7cd5a98d9..81c339007 100644 --- a/docs/audio_driver.md +++ b/docs/audio_driver.md | |||
@@ -57,14 +57,14 @@ This driver needs one Timer per enabled/used DAC channel, to trigger conversion; | |||
57 | 57 | ||
58 | Additionally, in the board config, you'll want to make changes to enable the DACs, GPT for Timers 6, 7 and 8: | 58 | Additionally, in the board config, you'll want to make changes to enable the DACs, GPT for Timers 6, 7 and 8: |
59 | 59 | ||
60 | ``` c | 60 | ```c |
61 | //halconf.h: | 61 | //halconf.h: |
62 | #define HAL_USE_DAC TRUE | 62 | #define HAL_USE_DAC TRUE |
63 | #define HAL_USE_GPT TRUE | 63 | #define HAL_USE_GPT TRUE |
64 | #include_next <halconf.h> | 64 | #include_next <halconf.h> |
65 | ``` | 65 | ``` |
66 | 66 | ||
67 | ``` c | 67 | ```c |
68 | // mcuconf.h: | 68 | // mcuconf.h: |
69 | #include_next <mcuconf.h> | 69 | #include_next <mcuconf.h> |
70 | #undef STM32_DAC_USE_DAC1_CH1 | 70 | #undef STM32_DAC_USE_DAC1_CH1 |
@@ -93,14 +93,14 @@ only needs one timer (GPTD6, Tim6) to trigger the DAC unit to do a conversion; t | |||
93 | 93 | ||
94 | Additionally, in the board config, you'll want to make changes to enable the DACs, GPT for Timer 6: | 94 | Additionally, in the board config, you'll want to make changes to enable the DACs, GPT for Timer 6: |
95 | 95 | ||
96 | ``` c | 96 | ```c |
97 | //halconf.h: | 97 | //halconf.h: |
98 | #define HAL_USE_DAC TRUE | 98 | #define HAL_USE_DAC TRUE |
99 | #define HAL_USE_GPT TRUE | 99 | #define HAL_USE_GPT TRUE |
100 | #include_next <halconf.h> | 100 | #include_next <halconf.h> |
101 | ``` | 101 | ``` |
102 | 102 | ||
103 | ``` c | 103 | ```c |
104 | // mcuconf.h: | 104 | // mcuconf.h: |
105 | #include_next <mcuconf.h> | 105 | #include_next <mcuconf.h> |
106 | #undef STM32_DAC_USE_DAC1_CH1 | 106 | #undef STM32_DAC_USE_DAC1_CH1 |
@@ -153,7 +153,7 @@ This driver uses the ChibiOS-PWM system to produce a square-wave on specific out | |||
153 | The hardware directly toggles the pin via its alternate function. See your MCU's data-sheet for which pin can be driven by what timer - looking for TIMx_CHy and the corresponding alternate function. | 153 | The hardware directly toggles the pin via its alternate function. See your MCU's data-sheet for which pin can be driven by what timer - looking for TIMx_CHy and the corresponding alternate function. |
154 | 154 | ||
155 | A configuration example for the STM32F103C8 would be: | 155 | A configuration example for the STM32F103C8 would be: |
156 | ``` c | 156 | ```c |
157 | //halconf.h: | 157 | //halconf.h: |
158 | #define HAL_USE_PWM TRUE | 158 | #define HAL_USE_PWM TRUE |
159 | #define HAL_USE_PAL TRUE | 159 | #define HAL_USE_PAL TRUE |
@@ -161,7 +161,7 @@ A configuration example for the STM32F103C8 would be: | |||
161 | #include_next <halconf.h> | 161 | #include_next <halconf.h> |
162 | ``` | 162 | ``` |
163 | 163 | ||
164 | ``` c | 164 | ```c |
165 | // mcuconf.h: | 165 | // mcuconf.h: |
166 | #include_next <mcuconf.h> | 166 | #include_next <mcuconf.h> |
167 | #undef STM32_PWM_USE_TIM1 | 167 | #undef STM32_PWM_USE_TIM1 |
@@ -177,7 +177,7 @@ If we now target pin A8, looking through the data-sheet of the STM32F103C8, for | |||
177 | - TIM1_CH4 = PA11 | 177 | - TIM1_CH4 = PA11 |
178 | 178 | ||
179 | with all this information, the configuration would contain these lines: | 179 | with all this information, the configuration would contain these lines: |
180 | ``` c | 180 | ```c |
181 | //config.h: | 181 | //config.h: |
182 | #define AUDIO_PIN A8 | 182 | #define AUDIO_PIN A8 |
183 | #define AUDIO_PWM_DRIVER PWMD1 | 183 | #define AUDIO_PWM_DRIVER PWMD1 |
diff --git a/docs/chibios_upgrade_instructions.md b/docs/chibios_upgrade_instructions.md index 40c2faafc..b0a71142a 100644 --- a/docs/chibios_upgrade_instructions.md +++ b/docs/chibios_upgrade_instructions.md | |||
@@ -14,10 +14,10 @@ ChibiOS and ChibiOS-Contrib need to be updated in tandem -- the latter has a bra | |||
14 | * First time around this will take several hours | 14 | * First time around this will take several hours |
15 | * Subsequent updates will be incremental only | 15 | * Subsequent updates will be incremental only |
16 | * Tagging example (work out which version first!): | 16 | * Tagging example (work out which version first!): |
17 | * `git tag -a ver20.3.3 -m ver20.3.3 svn/tags/ver20.3.3` | 17 | * `git tag -a ver20.3.4 -m ver20.3.4 svn/tags/ver20.3.4` |
18 | * `git push qmk ver20.3.3` | 18 | * `git push qmk ver20.3.4` |
19 | * `git tag -a breaking_YYYY_qN -m breaking_YYYY_qN svn/tags/ver20.3.3` | 19 | * `git tag -a develop_YYYY_qN -m develop_YYYY_qN svn/tags/ver20.3.4` |
20 | * `git push qmk breaking_YYYY_qN` | 20 | * `git push qmk develop_YYYY_qN` |
21 | 21 | ||
22 | ## Getting ChibiOS-Contrib | 22 | ## Getting ChibiOS-Contrib |
23 | 23 | ||
@@ -30,8 +30,8 @@ ChibiOS and ChibiOS-Contrib need to be updated in tandem -- the latter has a bra | |||
30 | * `git checkout chibios-20.3.x` | 30 | * `git checkout chibios-20.3.x` |
31 | * `git pull --ff-only` | 31 | * `git pull --ff-only` |
32 | * `git push origin chibios-20.3.x` | 32 | * `git push origin chibios-20.3.x` |
33 | * `git tag -a breaking_YYYY_qN -m breaking_YYYY_qN chibios-20.3.x` | 33 | * `git tag -a develop_YYYY_qN -m develop_YYYY_qN chibios-20.3.x` |
34 | * `git push origin breaking_YYYY_qN` | 34 | * `git push origin develop_YYYY_qN` |
35 | 35 | ||
36 | ## Updating submodules | 36 | ## Updating submodules |
37 | 37 | ||
@@ -42,15 +42,18 @@ ChibiOS and ChibiOS-Contrib need to be updated in tandem -- the latter has a bra | |||
42 | * `git checkout -b chibios-version-bump` | 42 | * `git checkout -b chibios-version-bump` |
43 | * `cd lib/chibios` | 43 | * `cd lib/chibios` |
44 | * `git fetch --all --tags --prune` | 44 | * `git fetch --all --tags --prune` |
45 | * `git checkout breaking_YYYY_qN` | 45 | * `git checkout develop_YYYY_qN` |
46 | * `cd ../chibios-contrib` | 46 | * `cd ../chibios-contrib` |
47 | * `git fetch --all --tags --prune` | 47 | * `git fetch --all --tags --prune` |
48 | * `git checkout breaking_YYYY_qN` | 48 | * `git checkout develop_YYYY_qN` |
49 | * Update ChibiOS configs within QMK | ||
50 | * `cd $QMK_FIRMWARE` | ||
51 | * `./util/chibios_conf_updater.sh` | ||
49 | * Build everything | 52 | * Build everything |
50 | * `cd $QMK_FIRMWARE` | 53 | * `cd $QMK_FIRMWARE` |
51 | * `qmk multibuild -j4` | 54 | * `qmk multibuild -j4` |
52 | * Make sure there are no errors | 55 | * Make sure there are no errors |
53 | * Push to the repo | 56 | * Push to the repo |
54 | * `git commit -am 'Update ChibiOS to XXXXXXXXX'` | 57 | * `git commit -am 'Update ChibiOS to 99.9.9'` |
55 | * `git push --set-upstream origin chibios-version-bump` | 58 | * `git push --set-upstream origin chibios-version-bump` |
56 | * Make a PR to qmk_firmware with the new branch \ No newline at end of file | 59 | * Make a PR to qmk_firmware with the new branch |
diff --git a/docs/cli_commands.md b/docs/cli_commands.md index 8f5117633..520da06c4 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md | |||
@@ -382,6 +382,33 @@ qmk format-c | |||
382 | qmk format-c -b branch_name | 382 | qmk format-c -b branch_name |
383 | ``` | 383 | ``` |
384 | 384 | ||
385 | ## `qmk generate-compilation-database` | ||
386 | |||
387 | **Usage**: | ||
388 | |||
389 | ``` | ||
390 | qmk generate-compilation-database [-kb KEYBOARD] [-km KEYMAP] | ||
391 | ``` | ||
392 | |||
393 | Creates a `compile_commands.json` file. | ||
394 | |||
395 | Does your IDE/editor use a language server but doesn't _quite_ find all the necessary include files? Do you hate red squigglies? Do you wish your editor could figure out `#include QMK_KEYBOARD_H`? You might need a [compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html)! The qmk tool can build this for you. | ||
396 | |||
397 | This command needs to know which keyboard and keymap to build. It uses the same configuration options as the `qmk compile` command: arguments, current directory, and config files. | ||
398 | |||
399 | **Example:** | ||
400 | |||
401 | ``` | ||
402 | $ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak | ||
403 | $ qmk generate-compilation-database | ||
404 | Ψ Making clean | ||
405 | Ψ Gathering build instructions from make -n gh60/satan:colemak | ||
406 | Ψ Found 50 compile commands | ||
407 | Ψ Writing build database to /Users/you/src/qmk_firmware/compile_commands.json | ||
408 | ``` | ||
409 | |||
410 | Now open your dev environment and live a squiggly-free life. | ||
411 | |||
385 | ## `qmk docs` | 412 | ## `qmk docs` |
386 | 413 | ||
387 | This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936. | 414 | This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936. |
diff --git a/docs/cli_development.md b/docs/cli_development.md index 0f4f401b3..62be3b3d8 100644 --- a/docs/cli_development.md +++ b/docs/cli_development.md | |||
@@ -14,7 +14,7 @@ If you intend to maintain keyboards and/or contribute to QMK, you can enable the | |||
14 | 14 | ||
15 | This will allow you to see all available subcommands. | 15 | This will allow you to see all available subcommands. |
16 | **Note:** You will have to install additional requirements: | 16 | **Note:** You will have to install additional requirements: |
17 | ```bash | 17 | ``` |
18 | python3 -m pip install -r requirements-dev.txt | 18 | python3 -m pip install -r requirements-dev.txt |
19 | ``` | 19 | ``` |
20 | 20 | ||
diff --git a/docs/compatible_microcontrollers.md b/docs/compatible_microcontrollers.md index 2bf3b0ebb..39e9061c2 100644 --- a/docs/compatible_microcontrollers.md +++ b/docs/compatible_microcontrollers.md | |||
@@ -27,6 +27,7 @@ You can also use any ARM chip with USB that [ChibiOS](https://www.chibios.org) s | |||
27 | * [STM32F103](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html) | 27 | * [STM32F103](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html) |
28 | * [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html) | 28 | * [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html) |
29 | * [STM32F401](https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html) | 29 | * [STM32F401](https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html) |
30 | * [STM32F405](https://www.st.com/en/microcontrollers-microprocessors/stm32f405-415.html) | ||
30 | * [STM32F407](https://www.st.com/en/microcontrollers-microprocessors/stm32f407-417.html) | 31 | * [STM32F407](https://www.st.com/en/microcontrollers-microprocessors/stm32f407-417.html) |
31 | * [STM32F411](https://www.st.com/en/microcontrollers-microprocessors/stm32f411.html) | 32 | * [STM32F411](https://www.st.com/en/microcontrollers-microprocessors/stm32f411.html) |
32 | * [STM32F446](https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html) | 33 | * [STM32F446](https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html) |
@@ -42,7 +43,14 @@ You can also use any ARM chip with USB that [ChibiOS](https://www.chibios.org) s | |||
42 | * [MKL26Z64](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/kl-series-cortex-m0-plus/kinetis-kl2x-72-96-mhz-usb-ultra-low-power-microcontrollers-mcus-based-on-arm-cortex-m0-plus-core:KL2x) | 43 | * [MKL26Z64](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/kl-series-cortex-m0-plus/kinetis-kl2x-72-96-mhz-usb-ultra-low-power-microcontrollers-mcus-based-on-arm-cortex-m0-plus-core:KL2x) |
43 | * [MK20DX128](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/k-series-cortex-m4/k2x-usb/kinetis-k20-50-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-based-on-arm-cortex-m4-core:K20_50) | 44 | * [MK20DX128](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/k-series-cortex-m4/k2x-usb/kinetis-k20-50-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-based-on-arm-cortex-m4-core:K20_50) |
44 | * [MK20DX256](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/k-series-cortex-m4/k2x-usb/kinetis-k20-72-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-mcus-based-on-arm-cortex-m4-core:K20_72) | 45 | * [MK20DX256](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/k-series-cortex-m4/k2x-usb/kinetis-k20-72-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-mcus-based-on-arm-cortex-m4-core:K20_72) |
46 | * [MK66FX1M0](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/k-series-cortex-m4/k6x-ethernet/kinetis-k66-180-mhz-dual-high-speed-full-speed-usbs-2mb-flash-microcontrollers-mcus-based-on-arm-cortex-m4-core:K66_180) | ||
45 | 47 | ||
46 | ## Atmel ATSAM | 48 | ## Atmel ATSAM |
47 | 49 | ||
48 | There is limited support for one of Atmel's ATSAM microcontrollers, that being the [ATSAMD51J18A](https://www.microchip.com/wwwproducts/en/ATSAMD51J18A) used by the [Massdrop keyboards](https://github.com/qmk/qmk_firmware/tree/master/keyboards/massdrop). | 50 | There is limited support for one of Atmel's ATSAM microcontrollers, that being the [ATSAMD51J18A](https://www.microchip.com/wwwproducts/en/ATSAMD51J18A) used by the [Massdrop keyboards](https://github.com/qmk/qmk_firmware/tree/master/keyboards/massdrop). |
51 | |||
52 | ## RISC-V | ||
53 | |||
54 | ### GigaDevice | ||
55 | |||
56 | [ChibiOS-Contrib](https://github.com/ChibiOS/ChibiOS-Contrib) has support for the GigaDevice [GD32VF103 series](https://www.gigadevice.com/products/microcontrollers/gd32/risc-v/mainstream-line/gd32vf103-series/) microcontrollers and provides configurations for the [SiPeed Longan Nano](https://longan.sipeed.com/en/) development board that uses this microcontroller. It is largely pin and feature compatible with STM32F103 and STM32F303 microcontrollers. \ No newline at end of file | ||
diff --git a/docs/config_options.md b/docs/config_options.md index cfbe39f0d..9f2453b69 100644 --- a/docs/config_options.md +++ b/docs/config_options.md | |||
@@ -206,7 +206,7 @@ If you define these options you will enable the associated feature, which may in | |||
206 | * `#define TAP_CODE_DELAY 100` | 206 | * `#define TAP_CODE_DELAY 100` |
207 | * Sets the delay between `register_code` and `unregister_code`, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds. | 207 | * Sets the delay between `register_code` and `unregister_code`, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds. |
208 | * `#define TAP_HOLD_CAPS_DELAY 80` | 208 | * `#define TAP_HOLD_CAPS_DELAY 80` |
209 | * Sets the delay for Tap Hold keys (`LT`, `MT`) when using `KC_CAPSLOCK` keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher. | 209 | * Sets the delay for Tap Hold keys (`LT`, `MT`) when using `KC_CAPS_LOCK` keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher. |
210 | * `#define KEY_OVERRIDE_REPEAT_DELAY 500` | 210 | * `#define KEY_OVERRIDE_REPEAT_DELAY 500` |
211 | * Sets the key repeat interval for [key overrides](feature_key_overrides.md). | 211 | * Sets the key repeat interval for [key overrides](feature_key_overrides.md). |
212 | 212 | ||
@@ -407,7 +407,7 @@ Use these to enable or disable building certain features. The more you have enab | |||
407 | * `MAGIC_ENABLE` | 407 | * `MAGIC_ENABLE` |
408 | * MAGIC actions (BOOTMAGIC without the boot) | 408 | * MAGIC actions (BOOTMAGIC without the boot) |
409 | * `BOOTMAGIC_ENABLE` | 409 | * `BOOTMAGIC_ENABLE` |
410 | * Virtual DIP switch configuration | 410 | * Enable Bootmagic Lite |
411 | * `MOUSEKEY_ENABLE` | 411 | * `MOUSEKEY_ENABLE` |
412 | * Mouse keys | 412 | * Mouse keys |
413 | * `EXTRAKEY_ENABLE` | 413 | * `EXTRAKEY_ENABLE` |
@@ -446,6 +446,8 @@ Use these to enable or disable building certain features. The more you have enab | |||
446 | * Forces the keyboard to wait for a USB connection to be established before it starts up | 446 | * Forces the keyboard to wait for a USB connection to be established before it starts up |
447 | * `NO_USB_STARTUP_CHECK` | 447 | * `NO_USB_STARTUP_CHECK` |
448 | * 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. | 448 | * 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. |
449 | * `DEFERRED_EXEC_ENABLE` | ||
450 | * Enables deferred executor support -- timed delays before callbacks are invoked. See [deferred execution](custom_quantum_functions.md#deferred-execution) for more information. | ||
449 | 451 | ||
450 | ## USB Endpoint Limitations | 452 | ## USB Endpoint Limitations |
451 | 453 | ||
diff --git a/docs/configurator_default_keymaps.md b/docs/configurator_default_keymaps.md index 30f9fa72f..d2b14ec41 100644 --- a/docs/configurator_default_keymaps.md +++ b/docs/configurator_default_keymaps.md | |||
@@ -20,7 +20,7 @@ Keymaps in this directory require four key-value pairs: | |||
20 | 20 | ||
21 | Additionally, most keymaps contain a `commit` key. This key is not consumed by the API that back-stops QMK Configurator, but is used by Configurator's maintainers to tell which version of a keymap was used to create the JSON keymap in this repository. The value is the SHA of the last commit to modify a board's default `keymap.c` in the `qmk_firmware` repository. The SHA is found by checking out [the `master` branch of the `qmk/qmk_firmware` repository](https://github.com/qmk/qmk_firmware/tree/master/) and running `git log -1 --pretty=oneline -- keyboards/<keyboard>/keymaps/default/keymap.c` (use `keymap.json` if the keyboard in question has this file instead), which should return something similar to: | 21 | Additionally, most keymaps contain a `commit` key. This key is not consumed by the API that back-stops QMK Configurator, but is used by Configurator's maintainers to tell which version of a keymap was used to create the JSON keymap in this repository. The value is the SHA of the last commit to modify a board's default `keymap.c` in the `qmk_firmware` repository. The SHA is found by checking out [the `master` branch of the `qmk/qmk_firmware` repository](https://github.com/qmk/qmk_firmware/tree/master/) and running `git log -1 --pretty=oneline -- keyboards/<keyboard>/keymaps/default/keymap.c` (use `keymap.json` if the keyboard in question has this file instead), which should return something similar to: |
22 | 22 | ||
23 | ```shell | 23 | ``` |
24 | f14629ed1cd7c7ec9089604d64f29a99981558e8 Remove/migrate action_get_macro()s from default keymaps (#5625) | 24 | f14629ed1cd7c7ec9089604d64f29a99981558e8 Remove/migrate action_get_macro()s from default keymaps (#5625) |
25 | ``` | 25 | ``` |
26 | 26 | ||
@@ -31,7 +31,7 @@ In this example, `f14629ed1cd7c7ec9089604d64f29a99981558e8` is the value that sh | |||
31 | 31 | ||
32 | If one wished to add a default keymap for the H87a by Hineybush, one would run the `git log` command above against the H87a's default keymap in `qmk_firmware`: | 32 | If one wished to add a default keymap for the H87a by Hineybush, one would run the `git log` command above against the H87a's default keymap in `qmk_firmware`: |
33 | 33 | ||
34 | ```shell | 34 | ``` |
35 | user ~/qmk_firmware (master) | 35 | user ~/qmk_firmware (master) |
36 | $ git log -1 --pretty=oneline master -- keyboards/hineybush/h87a/keymaps/default/keymap.c | 36 | $ git log -1 --pretty=oneline master -- keyboards/hineybush/h87a/keymaps/default/keymap.c |
37 | ef8878fba5d3786e3f9c66436da63a560cd36ac9 Hineybush h87a lock indicators (#8237) | 37 | ef8878fba5d3786e3f9c66436da63a560cd36ac9 Hineybush h87a lock indicators (#8237) |
@@ -46,7 +46,7 @@ Now that we have the commit hash, we need the keymap (edited for readability): | |||
46 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 46 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
47 | 47 | ||
48 | [0] = LAYOUT_all( | 48 | [0] = LAYOUT_all( |
49 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, | 49 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUS, |
50 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, | 50 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, |
51 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, | 51 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, |
52 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, | 52 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, |
@@ -74,7 +74,7 @@ The default keymap uses the `LAYOUT_all` macro, so that will be the value of the | |||
74 | "layout": "LAYOUT_all", | 74 | "layout": "LAYOUT_all", |
75 | "layers": [ | 75 | "layers": [ |
76 | [ | 76 | [ |
77 | "KC_ESC", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_PSCR", "KC_SLCK", "KC_PAUS", | 77 | "KC_ESC", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_PSCR", "KC_SCRL", "KC_PAUS", |
78 | "KC_GRV", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_MINS", "KC_EQL", "KC_BSPC", "KC_BSPC", "KC_INS", "KC_HOME", "KC_PGUP", | 78 | "KC_GRV", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_MINS", "KC_EQL", "KC_BSPC", "KC_BSPC", "KC_INS", "KC_HOME", "KC_PGUP", |
79 | "KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_LBRC", "KC_RBRC", "KC_BSLS", "KC_DEL", "KC_END", "KC_PGDN", | 79 | "KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_LBRC", "KC_RBRC", "KC_BSLS", "KC_DEL", "KC_END", "KC_PGDN", |
80 | "KC_CAPS", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", "KC_NUHS", "KC_ENT", | 80 | "KC_CAPS", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", "KC_NUHS", "KC_ENT", |
diff --git a/docs/contributing.md b/docs/contributing.md index 1d68d22d9..eb033d167 100644 --- a/docs/contributing.md +++ b/docs/contributing.md | |||
@@ -105,7 +105,7 @@ enum my_keycodes { | |||
105 | 105 | ||
106 | Before opening a pull request, you can preview your changes if you have set up the development environment by running this command from the `qmk_firmware/` folder: | 106 | Before opening a pull request, you can preview your changes if you have set up the development environment by running this command from the `qmk_firmware/` folder: |
107 | 107 | ||
108 | ./bin/qmk docs | 108 | qmk docs |
109 | 109 | ||
110 | or if you only have Python 3 installed: | 110 | or if you only have Python 3 installed: |
111 | 111 | ||
diff --git a/docs/custom_matrix.md b/docs/custom_matrix.md index cfa900a33..8f6878f94 100644 --- a/docs/custom_matrix.md +++ b/docs/custom_matrix.md | |||
@@ -15,7 +15,7 @@ The reasons to use this feature include: | |||
15 | Implementing custom matrix usually involves compilation of an additional source file. It is recommended that for consistency, this file is called `matrix.c`. | 15 | Implementing custom matrix usually involves compilation of an additional source file. It is recommended that for consistency, this file is called `matrix.c`. |
16 | 16 | ||
17 | Add a new file to your keyboard directory: | 17 | Add a new file to your keyboard directory: |
18 | ```text | 18 | ``` |
19 | keyboards/<keyboard>/matrix.c | 19 | keyboards/<keyboard>/matrix.c |
20 | ``` | 20 | ``` |
21 | 21 | ||
diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index 463366ff7..dd1654bd2 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md | |||
@@ -149,7 +149,7 @@ This is useful for setting up stuff that you may need elsewhere, but isn't hardw | |||
149 | * GPIO pin initialisation: `void matrix_init_pins(void)` | 149 | * GPIO pin initialisation: `void matrix_init_pins(void)` |
150 | * This needs to perform the low-level initialisation of all row and column pins. By default this will initialise the input/output state of each of the GPIO pins listed in `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`, based on whether or not the keyboard is set up for `ROW2COL`, `COL2ROW`, or `DIRECT_PINS`. Should the keyboard designer override this function, no initialisation of pin state will occur within QMK itself, instead deferring to the keyboard's override. | 150 | * This needs to perform the low-level initialisation of all row and column pins. By default this will initialise the input/output state of each of the GPIO pins listed in `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`, based on whether or not the keyboard is set up for `ROW2COL`, `COL2ROW`, or `DIRECT_PINS`. Should the keyboard designer override this function, no initialisation of pin state will occur within QMK itself, instead deferring to the keyboard's override. |
151 | * `COL2ROW`-based row reads: `void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)` | 151 | * `COL2ROW`-based row reads: `void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)` |
152 | * `ROW2COL`-based column reads: `void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)` | 152 | * `ROW2COL`-based column reads: `void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col, matrix_row_t row_shifter)` |
153 | * `DIRECT_PINS`-based reads: `void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)` | 153 | * `DIRECT_PINS`-based reads: `void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)` |
154 | * These three functions need to perform the low-level retrieval of matrix state of relevant input pins, based on the matrix type. Only one of the functions should be implemented, if needed. By default this will iterate through `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`, configuring the inputs and outputs based on whether or not the keyboard is set up for `ROW2COL`, `COL2ROW`, or `DIRECT_PINS`. Should the keyboard designer override this function, no manipulation of matrix GPIO pin state will occur within QMK itself, instead deferring to the keyboard's override. | 154 | * These three functions need to perform the low-level retrieval of matrix state of relevant input pins, based on the matrix type. Only one of the functions should be implemented, if needed. By default this will iterate through `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`, configuring the inputs and outputs based on whether or not the keyboard is set up for `ROW2COL`, `COL2ROW`, or `DIRECT_PINS`. Should the keyboard designer override this function, no manipulation of matrix GPIO pin state will occur within QMK itself, instead deferring to the keyboard's override. |
155 | 155 | ||
@@ -405,3 +405,69 @@ And you're done. The RGB layer indication will only work if you want it to. And | |||
405 | * Keymap: `void eeconfig_init_user(void)`, `uint32_t eeconfig_read_user(void)` and `void eeconfig_update_user(uint32_t val)` | 405 | * Keymap: `void eeconfig_init_user(void)`, `uint32_t eeconfig_read_user(void)` and `void eeconfig_update_user(uint32_t val)` |
406 | 406 | ||
407 | The `val` is the value of the data that you want to write to EEPROM. And the `eeconfig_read_*` function return a 32 bit (DWORD) value from the EEPROM. | 407 | The `val` is the value of the data that you want to write to EEPROM. And the `eeconfig_read_*` function return a 32 bit (DWORD) value from the EEPROM. |
408 | |||
409 | ### Deferred Execution :id=deferred-execution | ||
410 | |||
411 | QMK has the ability to execute a callback after a specified period of time, rather than having to manually manage timers. | ||
412 | |||
413 | #### Deferred executor callbacks | ||
414 | |||
415 | All _deferred executor callbacks_ have a common function signature and look like: | ||
416 | |||
417 | ```c | ||
418 | uint32_t my_callback(uint32_t trigger_time, void *cb_arg) { | ||
419 | /* do something */ | ||
420 | bool repeat = my_deferred_functionality(); | ||
421 | return repeat ? 500 : 0; | ||
422 | } | ||
423 | ``` | ||
424 | |||
425 | The first argument `trigger_time` is the intended time of execution. If other delays prevent executing at the exact trigger time, this allows for "catch-up" or even skipping intervals, depending on the required behaviour. | ||
426 | |||
427 | The second argument `cb_arg` is the same argument passed into `defer_exec()` below, and can be used to access state information from the original call context. | ||
428 | |||
429 | The return value is the number of milliseconds to use if the function should be repeated -- if the callback returns `0` then it's automatically unregistered. In the example above, a hypothetical `my_deferred_functionality()` is invoked to determine if the callback needs to be repeated -- if it does, it reschedules for a `500` millisecond delay, otherwise it informs the deferred execution background task that it's done, by returning `0`. | ||
430 | |||
431 | ?> Note that the returned delay will be applied to the intended trigger time, not the time of callback invocation. This allows for generally consistent timing even in the face of occasional late execution. | ||
432 | |||
433 | #### Deferred executor registration | ||
434 | |||
435 | Once a callback has been defined, it can be scheduled using the following API: | ||
436 | |||
437 | ```c | ||
438 | deferred_token my_token = defer_exec(1500, my_callback, NULL); | ||
439 | ``` | ||
440 | |||
441 | The first argument is the number of milliseconds to wait until executing `my_callback` -- in the case above, `1500` milliseconds, or 1.5 seconds. | ||
442 | |||
443 | The third parameter is the `cb_arg` that gets passed to the callback at the point of execution. This value needs to be valid at the time the callback is invoked -- a local function value will be destroyed before the callback is executed and should not be used. If this is not required, `NULL` should be used. | ||
444 | |||
445 | The return value is a `deferred_token` that can consequently be used to cancel the deferred executor callback before it's invoked. If a failure occurs, the returned value will be `INVALID_DEFERRED_TOKEN`. Usually this will be as a result of supplying `0` to the delay, or a `NULL` for the callback. The other failure case is if there are too many deferred executions "in flight" -- this can be increased by changing the limit, described below. | ||
446 | |||
447 | #### Extending a deferred execution | ||
448 | |||
449 | The `deferred_token` returned by `defer_exec()` can be used to extend a the duration a pending execution waits before it gets invoked: | ||
450 | ```c | ||
451 | // This will re-delay my_token's future execution such that it is invoked 800ms after the current time | ||
452 | extend_deferred_exec(my_token, 800); | ||
453 | ``` | ||
454 | |||
455 | #### Cancelling a deferred execution | ||
456 | |||
457 | The `deferred_token` returned by `defer_exec()` can be used to cancel a pending execution before it gets invoked: | ||
458 | ```c | ||
459 | // This will cancel my_token's future execution | ||
460 | cancel_deferred_exec(my_token); | ||
461 | ``` | ||
462 | |||
463 | Once a token has been canceled, it should be considered invalid. Reusing the same token is not supported. | ||
464 | |||
465 | #### Deferred callback limits | ||
466 | |||
467 | There are a maximum number of deferred callbacks that can be scheduled, controlled by the value of the define `MAX_DEFERRED_EXECUTORS`. | ||
468 | |||
469 | If registrations fail, then you can increase this value in your keyboard or keymap `config.h` file, for example to 16 instead of the default 8: | ||
470 | |||
471 | ```c | ||
472 | #define MAX_DEFERRED_EXECUTORS 16 | ||
473 | ``` | ||
diff --git a/docs/de/cli.md b/docs/de/cli.md index 7dc02d505..259aeecf7 100644 --- a/docs/de/cli.md +++ b/docs/de/cli.md | |||
@@ -51,25 +51,6 @@ Wir suchen nach Freiwilligen, die ein `qmk`-Package für weitere Betriebssysteme | |||
51 | * Installiere mit einem [virtualenv](https://virtualenv.pypa.io/en/latest/). | 51 | * Installiere mit einem [virtualenv](https://virtualenv.pypa.io/en/latest/). |
52 | * Weise den User an, die Umgebungs-Variable `QMK_HOME` zu setzen, um die Firmware-Quelle anders einzustellen als `~/qmk_firmware`. | 52 | * Weise den User an, die Umgebungs-Variable `QMK_HOME` zu setzen, um die Firmware-Quelle anders einzustellen als `~/qmk_firmware`. |
53 | 53 | ||
54 | # Lokale CLI | ||
55 | |||
56 | Wenn Du die globale CLI nicht verwenden möchtest, beinhaltet `qmk_firmware` auch eine lokale CLI. Du kannst sie hier finden: `qmk_firmware/bin/qmk`. Du kannst den `qmk`-Befehl aus irgendeinem Datei-Verzeichnis ausführen und es wird immer auf dieser Kopie von `qmk_firmware` arbeiten. | ||
57 | |||
58 | **Beispiel**: | ||
59 | |||
60 | ``` | ||
61 | $ ~/qmk_firmware/bin/qmk hello | ||
62 | Ψ Hello, World! | ||
63 | ``` | ||
64 | |||
65 | ## Einschränkungen der lokalen CLI | ||
66 | |||
67 | Hier ein Vergleich mit der globalen CLI: | ||
68 | |||
69 | * Die lokale CLI unterstützt kein `qmk setup` oder `qmk clone`. | ||
70 | * Die lokale CLI arbeitet immer innerhalb der selben `qmk_firmware`-Verzeichnisstruktur, auch wenn Du mehrere Repositories geklont hast. | ||
71 | * Die lokale CLI läuft nicht in einer virtualenv. Daher ist es möglich, dass Abhängigkeiten (dependencies) miteinander in Konflikt kommen/stehen. | ||
72 | |||
73 | # CLI-Befehle | 54 | # CLI-Befehle |
74 | 55 | ||
75 | ## `qmk compile` | 56 | ## `qmk compile` |
diff --git a/docs/driver_installation_zadig.md b/docs/driver_installation_zadig.md index 9155e56e3..003629ba9 100644 --- a/docs/driver_installation_zadig.md +++ b/docs/driver_installation_zadig.md | |||
@@ -93,6 +93,7 @@ The device name here is the name that appears in Zadig, and may not be what the | |||
93 | |`usbasploader`|USBasp |`16C0:05DC` |libusbK| | 93 | |`usbasploader`|USBasp |`16C0:05DC` |libusbK| |
94 | |`apm32-dfu` |APM32 DFU ISP Mode |`314B:0106` |WinUSB | | 94 | |`apm32-dfu` |APM32 DFU ISP Mode |`314B:0106` |WinUSB | |
95 | |`stm32-dfu` |STM32 BOOTLOADER |`0483:DF11` |WinUSB | | 95 | |`stm32-dfu` |STM32 BOOTLOADER |`0483:DF11` |WinUSB | |
96 | |`gd32v-dfu` |GD32V BOOTLOADER |`28E9:0189` |WinUSB | | ||
96 | |`kiibohd` |Kiibohd DFU Bootloader |`1C11:B007` |WinUSB | | 97 | |`kiibohd` |Kiibohd DFU Bootloader |`1C11:B007` |WinUSB | |
97 | |`stm32duino` |Maple 003 |`1EAF:0003` |WinUSB | | 98 | |`stm32duino` |Maple 003 |`1EAF:0003` |WinUSB | |
98 | |`qmk-hid` |(keyboard name) Bootloader |`03EB:2067` |HidUsb | | 99 | |`qmk-hid` |(keyboard name) Bootloader |`03EB:2067` |HidUsb | |
diff --git a/docs/es/hardware_drivers.md b/docs/es/hardware_drivers.md index e0a973606..788de2c5e 100644 --- a/docs/es/hardware_drivers.md +++ b/docs/es/hardware_drivers.md | |||
@@ -18,10 +18,6 @@ Soporte para direccionar pines en el ProMicro por su nombre Arduino en lugar de | |||
18 | 18 | ||
19 | Soporte para pantallas OLED basadas en SSD1306. Para obtener más información consulta la página de [Característica de Controlador OLED](feature_oled_driver.md). | 19 | Soporte para pantallas OLED basadas en SSD1306. Para obtener más información consulta la página de [Característica de Controlador OLED](feature_oled_driver.md). |
20 | 20 | ||
21 | ## uGFX | ||
22 | |||
23 | Puedes hacer uso de uGFX dentro de QMK para manejar LCDs de caracteres y gráficos, matrices de LED, OLED, TFT, y otras tecnologías de visualización. Esto necesita ser mejor documentado. Si estás tratando de hacer esto y leer el código no ayuda por favor [abre una issue](https://github.com/qmk/qmk_firmware/issues/new) y podemos ayudarte por el proceso. | ||
24 | |||
25 | ## WS2812 (Solo AVR) | 21 | ## WS2812 (Solo AVR) |
26 | 22 | ||
27 | Soporte para LEDs WS2811/WS2812{a,b,c}. Para obtener más información consulta la página de [Luz RGB](feature_rgblight.md). | 23 | Soporte para LEDs WS2811/WS2812{a,b,c}. Para obtener más información consulta la página de [Luz RGB](feature_rgblight.md). |
diff --git a/docs/es/hardware_keyboard_guidelines.md b/docs/es/hardware_keyboard_guidelines.md index a505cc5ce..298a3b7ce 100644 --- a/docs/es/hardware_keyboard_guidelines.md +++ b/docs/es/hardware_keyboard_guidelines.md | |||
@@ -142,8 +142,6 @@ El año debe ser el primer año en que se crea el archivo. Si el trabajo se hizo | |||
142 | 142 | ||
143 | El núcleo de QMC está licenciado bajo la [GNU General Public License](https://www.gnu.org/licenses/licenses.en.html). Si estás enviando binarios para los procesadores AVR puedes elegir cualquiera [GPLv2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html) o [GPLv3](https://www.gnu.org/licenses/gpl.html). Si estás enviando binarios para ARM procesadores debes elegir [GPL Versión 3](https://www.gnu.org/licenses/gpl.html) para cumplir con los [ChibiOS](https://www.chibios.org) licencia GPLv3. | 143 | El núcleo de QMC está licenciado bajo la [GNU General Public License](https://www.gnu.org/licenses/licenses.en.html). Si estás enviando binarios para los procesadores AVR puedes elegir cualquiera [GPLv2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html) o [GPLv3](https://www.gnu.org/licenses/gpl.html). Si estás enviando binarios para ARM procesadores debes elegir [GPL Versión 3](https://www.gnu.org/licenses/gpl.html) para cumplir con los [ChibiOS](https://www.chibios.org) licencia GPLv3. |
144 | 144 | ||
145 | Si tu teclado hace uso de la [uGFX](https://gfx.io) características dentro de QMK debes cumplir con la [Licencia de uGFX](https://ugfx.io/license.html), que requiere una licencia comercial separada antes de vender un dispositivo que contiene uGFX. | ||
146 | |||
147 | ## Detalles técnicos | 145 | ## Detalles técnicos |
148 | 146 | ||
149 | Si estás buscando más información sobre cómo hacer que su teclado funcione con QMK, [echa un vistazo a la sección hardware](hardware.md)! | 147 | Si estás buscando más información sobre cómo hacer que su teclado funcione con QMK, [echa un vistazo a la sección hardware](hardware.md)! |
diff --git a/docs/faq_debug.md b/docs/faq_debug.md index 1afa38a62..28b8c8175 100644 --- a/docs/faq_debug.md +++ b/docs/faq_debug.md | |||
@@ -62,7 +62,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
62 | ``` | 62 | ``` |
63 | 63 | ||
64 | Example output | 64 | Example output |
65 | ```text | 65 | ``` |
66 | Waiting for device:....... | 66 | Waiting for device:....... |
67 | Listening: | 67 | Listening: |
68 | KL: kc: 169, col: 0, row: 0, pressed: 1 | 68 | KL: kc: 169, col: 0, row: 0, pressed: 1 |
@@ -82,7 +82,7 @@ When testing performance issues, it can be useful to know the frequency at which | |||
82 | ``` | 82 | ``` |
83 | 83 | ||
84 | Example output | 84 | Example output |
85 | ```text | 85 | ``` |
86 | > matrix scan frequency: 315 | 86 | > matrix scan frequency: 315 |
87 | > matrix scan frequency: 313 | 87 | > matrix scan frequency: 313 |
88 | > matrix scan frequency: 316 | 88 | > matrix scan frequency: 316 |
diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md index dbeadba71..01ded4f23 100644 --- a/docs/faq_keymap.md +++ b/docs/faq_keymap.md | |||
@@ -19,7 +19,7 @@ There are 3 standard keyboard layouts in use around the world- ANSI, ISO, and JI | |||
19 | Sometimes, for readability's sake, it's useful to define custom names for some keycodes. People often define custom names using `#define`. For example: | 19 | Sometimes, for readability's sake, it's useful to define custom names for some keycodes. People often define custom names using `#define`. For example: |
20 | 20 | ||
21 | ```c | 21 | ```c |
22 | #define FN_CAPS LT(_FL, KC_CAPSLOCK) | 22 | #define FN_CAPS LT(_FL, KC_CAPS) |
23 | #define ALT_TAB LALT(KC_TAB) | 23 | #define ALT_TAB LALT(KC_TAB) |
24 | ``` | 24 | ``` |
25 | 25 | ||
@@ -38,8 +38,8 @@ As a quick fix try holding down `Space`+`Backspace` while you plug in your keybo | |||
38 | 38 | ||
39 | 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. | 39 | 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. |
40 | 40 | ||
41 | ## `KC_SYSREQ` Isn't Working | 41 | ## `KC_SYSTEM_REQUEST` Isn't Working |
42 | 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'. | 42 | Use keycode for Print Screen (`KC_PRINT_SCREEN`/`KC_PSCR`) instead of `KC_SYSTEM_REQUEST`. Key combination of 'Alt + Print Screen' is recognized as 'System request'. |
43 | 43 | ||
44 | See [issue #168](https://github.com/tmk/tmk_keyboard/issues/168) and | 44 | See [issue #168](https://github.com/tmk/tmk_keyboard/issues/168) and |
45 | * https://en.wikipedia.org/wiki/Magic_SysRq_key | 45 | * https://en.wikipedia.org/wiki/Magic_SysRq_key |
@@ -47,7 +47,7 @@ See [issue #168](https://github.com/tmk/tmk_keyboard/issues/168) and | |||
47 | 47 | ||
48 | ## Power Keys Aren't Working | 48 | ## Power Keys Aren't Working |
49 | 49 | ||
50 | 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. | 50 | Somewhat confusingly, there are two "Power" keycodes in QMK: `KC_KB_POWER` in the Keyboard/Keypad HID usage page, and `KC_SYSTEM_POWER` (or `KC_PWR`) in the Consumer page. |
51 | 51 | ||
52 | 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. | 52 | 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. |
53 | 53 | ||
@@ -57,7 +57,7 @@ https://github.com/tmk/tmk_keyboard/issues/67 | |||
57 | 57 | ||
58 | ## Modifier/Layer Stuck | 58 | ## Modifier/Layer Stuck |
59 | Modifier keys or layers can be stuck unless layer switching is configured properly. | 59 | Modifier keys or layers can be stuck unless layer switching is configured properly. |
60 | For Modifier keys and layer actions you have to place `KC_TRANS` on same position of destination layer to unregister the modifier key or return to previous layer on release event. | 60 | For Modifier keys and layer actions you have to place `KC_TRNS` on same position of destination layer to unregister the modifier key or return to previous layer on release event. |
61 | 61 | ||
62 | * https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#31-momentary-switching | 62 | * https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#31-momentary-switching |
63 | * https://geekhack.org/index.php?topic=57008.msg1492604#msg1492604 | 63 | * https://geekhack.org/index.php?topic=57008.msg1492604#msg1492604 |
@@ -75,7 +75,7 @@ This feature is for *mechanical lock switch* like [this Alps one](https://deskth | |||
75 | 75 | ||
76 | After enabling this feature use keycodes `KC_LCAP`, `KC_LNUM` and `KC_LSCR` in your keymap instead. | 76 | After enabling this feature use keycodes `KC_LCAP`, `KC_LNUM` and `KC_LSCR` in your keymap instead. |
77 | 77 | ||
78 | Old vintage mechanical keyboards occasionally have lock switches but modern ones don't have. ***You don't need this feature in most case and just use keycodes `KC_CAPS`, `KC_NLCK` and `KC_SLCK`.*** | 78 | Old vintage mechanical keyboards occasionally have lock switches but modern ones don't have. ***You don't need this feature in most case and just use keycodes `KC_CAPS`, `KC_NUM` and `KC_SCRL`.*** |
79 | 79 | ||
80 | ## Input Special Characters Other Than ASCII like Cédille 'Ç' | 80 | ## Input Special Characters Other Than ASCII like Cédille 'Ç' |
81 | 81 | ||
diff --git a/docs/faq_misc.md b/docs/faq_misc.md index 9ab2b69a8..9e34a0481 100644 --- a/docs/faq_misc.md +++ b/docs/faq_misc.md | |||
@@ -36,7 +36,7 @@ Size after: | |||
36 | can retry, loading that one | 36 | can retry, loading that one |
37 | - Some of the options you might specify in your keyboard's Makefile | 37 | - Some of the options you might specify in your keyboard's Makefile |
38 | consume extra memory; watch out for BOOTMAGIC_ENABLE, | 38 | consume extra memory; watch out for BOOTMAGIC_ENABLE, |
39 | MOUSEKEY_ENABLE, EXTRAKEY_ENABLE, CONSOLE_ENABLE, API_SYSEX_ENABLE | 39 | MOUSEKEY_ENABLE, EXTRAKEY_ENABLE, CONSOLE_ENABLE |
40 | - DFU tools do /not/ allow you to write into the bootloader (unless | 40 | - DFU tools do /not/ allow you to write into the bootloader (unless |
41 | you throw in an extra fruit salad of options), so there is little risk | 41 | you throw in an extra fruit salad of options), so there is little risk |
42 | there. | 42 | there. |
@@ -49,10 +49,6 @@ First you have to compile firmware with the build option `NKRO_ENABLE` in **Make | |||
49 | 49 | ||
50 | Try `Magic` **N** command(`LShift+RShift+N` by default) when **NKRO** still doesn't work. You can use this command to toggle between **NKRO** and **6KRO** mode temporarily. In some situations **NKRO** doesn't work and you will need to switch to **6KRO** mode, in particular when you are in BIOS. | 50 | Try `Magic` **N** command(`LShift+RShift+N` by default) when **NKRO** still doesn't work. You can use this command to toggle between **NKRO** and **6KRO** mode temporarily. In some situations **NKRO** doesn't work and you will need to switch to **6KRO** mode, in particular when you are in BIOS. |
51 | 51 | ||
52 | If your firmware was built with `BOOTMAGIC_ENABLE` you need to turn its switch on by `BootMagic` **N** command(`Space+N` by default). This setting is stored in EEPROM and kept over power cycles. | ||
53 | |||
54 | https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch | ||
55 | |||
56 | 52 | ||
57 | ## TrackPoint Needs Reset Circuit (PS/2 Mouse Support) | 53 | ## TrackPoint Needs Reset Circuit (PS/2 Mouse Support) |
58 | Without reset circuit you will have inconsistent result due to improper initialization of the hardware. See circuit schematic of TPM754: | 54 | Without reset circuit you will have inconsistent result due to improper initialization of the hardware. See circuit schematic of TPM754: |
diff --git a/docs/feature_auto_shift.md b/docs/feature_auto_shift.md index ec7eeaaa0..a54cd79e4 100644 --- a/docs/feature_auto_shift.md +++ b/docs/feature_auto_shift.md | |||
@@ -127,7 +127,7 @@ bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *record) { | |||
127 | # ifndef NO_AUTO_SHIFT_SPECIAL | 127 | # ifndef NO_AUTO_SHIFT_SPECIAL |
128 | case KC_TAB: | 128 | case KC_TAB: |
129 | case KC_MINUS ... KC_SLASH: | 129 | case KC_MINUS ... KC_SLASH: |
130 | case KC_NONUS_BSLASH: | 130 | case KC_NONUS_BACKSLASH: |
131 | # endif | 131 | # endif |
132 | return true; | 132 | return true; |
133 | } | 133 | } |
diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md index d47ecc682..79782cf56 100644 --- a/docs/feature_backlight.md +++ b/docs/feature_backlight.md | |||
@@ -8,7 +8,7 @@ The MCU can only supply so much current to its GPIO pins. Instead of powering th | |||
8 | 8 | ||
9 | Most keyboards have backlighting enabled by default if they support it, but if it is not working for you, check that your `rules.mk` includes the following: | 9 | Most keyboards have backlighting enabled by default if they support it, but if it is not working for you, check that your `rules.mk` includes the following: |
10 | 10 | ||
11 | ```makefile | 11 | ```make |
12 | BACKLIGHT_ENABLE = yes | 12 | BACKLIGHT_ENABLE = yes |
13 | ``` | 13 | ``` |
14 | 14 | ||
@@ -54,7 +54,7 @@ If backlight breathing is enabled (see below), the following functions are also | |||
54 | 54 | ||
55 | To select which driver to use, configure your `rules.mk` with the following: | 55 | To select which driver to use, configure your `rules.mk` with the following: |
56 | 56 | ||
57 | ```makefile | 57 | ```make |
58 | BACKLIGHT_DRIVER = software | 58 | BACKLIGHT_DRIVER = software |
59 | ``` | 59 | ``` |
60 | 60 | ||
@@ -87,7 +87,7 @@ This functionality is configured at the keyboard level with the `BACKLIGHT_ON_ST | |||
87 | 87 | ||
88 | The `pwm` driver is configured by default, however the equivalent setting within `rules.mk` would be: | 88 | The `pwm` driver is configured by default, however the equivalent setting within `rules.mk` would be: |
89 | 89 | ||
90 | ```makefile | 90 | ```make |
91 | BACKLIGHT_DRIVER = pwm | 91 | BACKLIGHT_DRIVER = pwm |
92 | ``` | 92 | ``` |
93 | 93 | ||
@@ -143,7 +143,7 @@ The breathing effect is the same as in the hardware PWM implementation. | |||
143 | 143 | ||
144 | While still in its early stages, ARM backlight support aims to eventually have feature parity with AVR. The `pwm` driver is configured by default, however the equivalent setting within `rules.mk` would be: | 144 | While still in its early stages, ARM backlight support aims to eventually have feature parity with AVR. The `pwm` driver is configured by default, however the equivalent setting within `rules.mk` would be: |
145 | 145 | ||
146 | ```makefile | 146 | ```make |
147 | BACKLIGHT_DRIVER = pwm | 147 | BACKLIGHT_DRIVER = pwm |
148 | ``` | 148 | ``` |
149 | 149 | ||
@@ -167,7 +167,7 @@ Currently only hardware PWM is supported, not timer assisted, and does not provi | |||
167 | 167 | ||
168 | In this mode, PWM is "emulated" while running other keyboard tasks. It offers maximum hardware compatibility without extra platform configuration. The tradeoff is the backlight might jitter when the keyboard is busy. To enable, add this to your `rules.mk`: | 168 | In this mode, PWM is "emulated" while running other keyboard tasks. It offers maximum hardware compatibility without extra platform configuration. The tradeoff is the backlight might jitter when the keyboard is busy. To enable, add this to your `rules.mk`: |
169 | 169 | ||
170 | ```makefile | 170 | ```make |
171 | BACKLIGHT_DRIVER = software | 171 | BACKLIGHT_DRIVER = software |
172 | ``` | 172 | ``` |
173 | 173 | ||
@@ -188,7 +188,7 @@ To activate multiple backlight pins, add something like this to your `config.h`, | |||
188 | 188 | ||
189 | If none of the above drivers apply to your board (for example, you are using a separate IC to control the backlight), you can implement a custom backlight driver using this simple API provided by QMK. To enable, add this to your `rules.mk`: | 189 | If none of the above drivers apply to your board (for example, you are using a separate IC to control the backlight), you can implement a custom backlight driver using this simple API provided by QMK. To enable, add this to your `rules.mk`: |
190 | 190 | ||
191 | ```makefile | 191 | ```make |
192 | BACKLIGHT_DRIVER = custom | 192 | BACKLIGHT_DRIVER = custom |
193 | ``` | 193 | ``` |
194 | 194 | ||
diff --git a/docs/feature_bluetooth.md b/docs/feature_bluetooth.md index 08e5f24ac..fdf19c107 100644 --- a/docs/feature_bluetooth.md +++ b/docs/feature_bluetooth.md | |||
@@ -4,10 +4,10 @@ | |||
4 | 4 | ||
5 | Currently Bluetooth support is limited to AVR based chips. For Bluetooth 2.1, QMK has support for RN-42 modules. For more recent BLE protocols, currently only the Adafruit Bluefruit SPI Friend is directly supported. BLE is needed to connect to iOS devices. Note iOS does not support mouse input. | 5 | Currently Bluetooth support is limited to AVR based chips. For Bluetooth 2.1, QMK has support for RN-42 modules. For more recent BLE protocols, currently only the Adafruit Bluefruit SPI Friend is directly supported. BLE is needed to connect to iOS devices. Note iOS does not support mouse input. |
6 | 6 | ||
7 | |Board |Bluetooth Protocol |Connection Type |rules.mk |Bluetooth Chip| | 7 | |Board |Bluetooth Protocol |Connection Type|rules.mk |Bluetooth Chip| |
8 | |----------------------------------------------------------------|----------------------------|----------------|---------------------------|--------------| | 8 | |----------------------------------------------------------------|--------------------|---------------|--------------------------------|--------------| |
9 | |Roving Networks RN-42 (Sparkfun Bluesmirf) |Bluetooth Classic | UART |`BLUETOOTH = RN42` | RN-42 | | 9 | |Roving Networks RN-42 (Sparkfun Bluesmirf) |Bluetooth Classic |UART |`BLUETOOTH_DRIVER = RN42` |RN-42 | |
10 | |[Bluefruit LE SPI Friend](https://www.adafruit.com/product/2633)|Bluetooth Low Energy | SPI |`BLUETOOTH = AdafruitBLE` | nRF51822 | | 10 | |[Bluefruit LE SPI Friend](https://www.adafruit.com/product/2633)|Bluetooth Low Energy|SPI |`BLUETOOTH_DRIVER = AdafruitBLE`|nRF51822 | |
11 | 11 | ||
12 | Not Supported Yet but possible: | 12 | Not Supported Yet but possible: |
13 | * [Bluefruit LE UART Friend](https://www.adafruit.com/product/2479). [Possible tmk implementation found in](https://github.com/tmk/tmk_keyboard/issues/514) | 13 | * [Bluefruit LE UART Friend](https://www.adafruit.com/product/2479). [Possible tmk implementation found in](https://github.com/tmk/tmk_keyboard/issues/514) |
@@ -17,22 +17,23 @@ Not Supported Yet but possible: | |||
17 | 17 | ||
18 | ### Adafruit BLE SPI Friend | 18 | ### Adafruit BLE SPI Friend |
19 | Currently The only bluetooth chipset supported by QMK is the Adafruit Bluefruit SPI Friend. It's a Nordic nRF5182 based chip running Adafruit's custom firmware. Data is transmitted via Adafruit's SDEP over Hardware SPI. The [Feather 32u4 Bluefruit LE](https://www.adafruit.com/product/2829) is supported as it's an AVR mcu connected via SPI to the Nordic BLE chip with Adafruit firmware. If Building a custom board with the SPI friend it would be easiest to just use the pin selection that the 32u4 feather uses but you can change the pins in the config.h options with the following defines: | 19 | Currently The only bluetooth chipset supported by QMK is the Adafruit Bluefruit SPI Friend. It's a Nordic nRF5182 based chip running Adafruit's custom firmware. Data is transmitted via Adafruit's SDEP over Hardware SPI. The [Feather 32u4 Bluefruit LE](https://www.adafruit.com/product/2829) is supported as it's an AVR mcu connected via SPI to the Nordic BLE chip with Adafruit firmware. If Building a custom board with the SPI friend it would be easiest to just use the pin selection that the 32u4 feather uses but you can change the pins in the config.h options with the following defines: |
20 | * #define AdafruitBleResetPin D4 | 20 | * `#define ADAFRUIT_BLE_RST_PIN D4` |
21 | * #define AdafruitBleCSPin B4 | 21 | * `#define ADAFRUIT_BLE_CS_PIN B4` |
22 | * #define AdafruitBleIRQPin E6 | 22 | * `#define ADAFRUIT_BLE_IRQ_PIN E6` |
23 | 23 | ||
24 | A Bluefruit UART friend can be converted to an SPI friend, however this [requires](https://github.com/qmk/qmk_firmware/issues/2274) some reflashing and soldering directly to the MDBT40 chip. | 24 | A Bluefruit UART friend can be converted to an SPI friend, however this [requires](https://github.com/qmk/qmk_firmware/issues/2274) some reflashing and soldering directly to the MDBT40 chip. |
25 | 25 | ||
26 | |||
27 | <!-- FIXME: Document bluetooth support more completely. --> | 26 | <!-- FIXME: Document bluetooth support more completely. --> |
28 | ## Bluetooth Rules.mk Options | 27 | ## Bluetooth Rules.mk Options |
29 | 28 | ||
30 | The currently supported Bluetooth chipsets do not support [N-Key Rollover (NKRO)](reference_glossary.md#n-key-rollover-nkro), so `rules.mk` must contain `NKRO_ENABLE = no`. | 29 | The currently supported Bluetooth chipsets do not support [N-Key Rollover (NKRO)](reference_glossary.md#n-key-rollover-nkro), so `rules.mk` must contain `NKRO_ENABLE = no`. |
31 | 30 | ||
32 | Use only one of these to enable Bluetooth: | 31 | Add the following to your `rules.mk`: |
33 | * BLUETOOTH_ENABLE = yes (Legacy Option) | 32 | |
34 | * BLUETOOTH = RN42 | 33 | ```make |
35 | * BLUETOOTH = AdafruitBLE | 34 | BLUETOOTH_ENABLE = yes |
35 | BLUETOOTH_DRIVER = AdafruitBLE # or RN42 | ||
36 | ``` | ||
36 | 37 | ||
37 | ## Bluetooth Keycodes | 38 | ## Bluetooth Keycodes |
38 | 39 | ||
diff --git a/docs/feature_bootmagic.md b/docs/feature_bootmagic.md index 6c66b0067..148ea92b9 100644 --- a/docs/feature_bootmagic.md +++ b/docs/feature_bootmagic.md | |||
@@ -8,8 +8,6 @@ On some keyboards Bootmagic Lite is disabled by default. If this is the case, it | |||
8 | BOOTMAGIC_ENABLE = yes | 8 | BOOTMAGIC_ENABLE = yes |
9 | ``` | 9 | ``` |
10 | 10 | ||
11 | ?> You may see `lite` being used in place of `yes`. | ||
12 | |||
13 | Additionally, you may want to specify which key to use. This is especially useful for keyboards that have unusual matrices. To do so, you need to specify the row and column of the key that you want to use. Add these entries to your `config.h` file: | 11 | Additionally, you may want to specify which key to use. This is especially useful for keyboards that have unusual matrices. To do so, you need to specify the row and column of the key that you want to use. Add these entries to your `config.h` file: |
14 | 12 | ||
15 | ```c | 13 | ```c |
diff --git a/docs/feature_combo.md b/docs/feature_combo.md index d98e6f2ac..b5c22bade 100644 --- a/docs/feature_combo.md +++ b/docs/feature_combo.md | |||
@@ -173,7 +173,7 @@ uint16_t get_combo_term(uint16_t index, combo_t *combo) { | |||
173 | // i.e. the exact array of keys you defined for the combo. | 173 | // i.e. the exact array of keys you defined for the combo. |
174 | // This can be useful if your combos have a common key and you want to apply the | 174 | // This can be useful if your combos have a common key and you want to apply the |
175 | // same combo term for all of them. | 175 | // same combo term for all of them. |
176 | if (combo->keys[0] == KC_ENTER) { // if first key in the array is KC_ENTER | 176 | if (combo->keys[0] == KC_ENT) { // if first key in the array is Enter |
177 | return 150; | 177 | return 150; |
178 | } | 178 | } |
179 | 179 | ||
diff --git a/docs/feature_digitizer.md b/docs/feature_digitizer.md index 9b6aeddba..ac2d64f97 100644 --- a/docs/feature_digitizer.md +++ b/docs/feature_digitizer.md | |||
@@ -4,7 +4,7 @@ The digitizer HID interface allows setting the mouse cursor position at absolute | |||
4 | 4 | ||
5 | To enable the digitizer interface, add the following line to your rules.mk: | 5 | To enable the digitizer interface, add the following line to your rules.mk: |
6 | 6 | ||
7 | ```makefile | 7 | ```make |
8 | DIGITIZER_ENABLE = yes | 8 | DIGITIZER_ENABLE = yes |
9 | ``` | 9 | ``` |
10 | 10 | ||
diff --git a/docs/feature_grave_esc.md b/docs/feature_grave_esc.md index f57c6042c..f135b1ded 100644 --- a/docs/feature_grave_esc.md +++ b/docs/feature_grave_esc.md | |||
@@ -4,7 +4,7 @@ If you're using a 60% keyboard, or any other layout with no F-row, you will have | |||
4 | 4 | ||
5 | ## Usage | 5 | ## Usage |
6 | 6 | ||
7 | Replace the `KC_GRAVE` key in your keymap (usually to the left of the `1` key) with `KC_GESC`. Most of the time this key will output `KC_ESC` when pressed. However, when Shift or GUI are held down it will output `KC_GRV` instead. | 7 | Replace the `KC_GRV` key in your keymap (usually to the left of the `1` key) with `KC_GESC`. Most of the time this key will output `KC_ESC` when pressed. However, when Shift or GUI are held down it will output `KC_GRV` instead. |
8 | 8 | ||
9 | ## What Your OS Sees | 9 | ## What Your OS Sees |
10 | 10 | ||
diff --git a/docs/feature_haptic_feedback.md b/docs/feature_haptic_feedback.md index 1f36f5b05..c8c74cb8f 100644 --- a/docs/feature_haptic_feedback.md +++ b/docs/feature_haptic_feedback.md | |||
@@ -4,9 +4,22 @@ | |||
4 | 4 | ||
5 | The following options are currently available for haptic feedback in `rules.mk`: | 5 | The following options are currently available for haptic feedback in `rules.mk`: |
6 | 6 | ||
7 | `HAPTIC_ENABLE += DRV2605L` | 7 | ``` |
8 | HAPTIC_ENABLE = yes | ||
9 | |||
10 | HAPTIC_DRIVER += DRV2605L | ||
11 | HAPTIC_DRIVER += SOLENOID | ||
12 | ``` | ||
13 | |||
14 | The following `config.h` settings are available for all types of haptic feedback: | ||
8 | 15 | ||
9 | `HAPTIC_ENABLE += SOLENOID` | 16 | | Settings | Default | Description | |
17 | |--------------------------------------|---------------|---------------------------------------------------------------------------------------------------------------| | ||
18 | |`HAPTIC_ENABLE_PIN` | *Not defined* |Configures a pin to enable a boost converter for some haptic solution, often used with solenoid drivers. | | ||
19 | |`HAPTIC_ENABLE_PIN_ACTIVE_LOW` | *Not defined* |If defined then the haptic enable pin is active-low. | | ||
20 | |`HAPTIC_ENABLE_STATUS_LED` | *Not defined* |Configures a pin to reflect the current enabled/disabled status of haptic feedback. | | ||
21 | |`HAPTIC_ENABLE_STATUS_LED_ACTIVE_LOW` | *Not defined* |If defined then the haptic status led will be active-low. | | ||
22 | |`HAPTIC_OFF_IN_LOW_POWER` | `0` |If set to `1`, haptic feedback is disabled before the device is configured, and while the device is suspended. | | ||
10 | 23 | ||
11 | ## Known Supported Hardware | 24 | ## Known Supported Hardware |
12 | 25 | ||
@@ -45,6 +58,7 @@ First you will need a build a circuit to drive the solenoid through a mosfet as | |||
45 | | Settings | Default | Description | | 58 | | Settings | Default | Description | |
46 | |----------------------------|----------------------|-------------------------------------------------------| | 59 | |----------------------------|----------------------|-------------------------------------------------------| |
47 | |`SOLENOID_PIN` | *Not defined* |Configures the pin that the Solenoid is connected to. | | 60 | |`SOLENOID_PIN` | *Not defined* |Configures the pin that the Solenoid is connected to. | |
61 | |`SOLENOID_PIN_ACTIVE_LOW` | *Not defined* |If defined then the solenoid trigger pin is active low.| | ||
48 | |`SOLENOID_DEFAULT_DWELL` | `12` ms |Configures the default dwell time for the solenoid. | | 62 | |`SOLENOID_DEFAULT_DWELL` | `12` ms |Configures the default dwell time for the solenoid. | |
49 | |`SOLENOID_MIN_DWELL` | `4` ms |Sets the lower limit for the dwell. | | 63 | |`SOLENOID_MIN_DWELL` | `4` ms |Sets the lower limit for the dwell. | |
50 | |`SOLENOID_MAX_DWELL` | `100` ms |Sets the upper limit for the dwell. | | 64 | |`SOLENOID_MAX_DWELL` | `100` ms |Sets the upper limit for the dwell. | |
@@ -170,8 +184,9 @@ The Haptic Exclusion is implemented as `__attribute__((weak)) bool get_haptic_en | |||
170 | ### NO_HAPTIC_MOD | 184 | ### NO_HAPTIC_MOD |
171 | With the entry of `#define NO_HAPTIC_MOD` in config.h, the following keys will not trigger feedback: | 185 | With the entry of `#define NO_HAPTIC_MOD` in config.h, the following keys will not trigger feedback: |
172 | 186 | ||
173 | * Usual modifier keys such as Control/Shift/Alt/Gui (For example `KC_LCTRL`) | 187 | * Usual modifier keys such as Control/Shift/Alt/Gui (For example `KC_LCTL`) |
174 | * `MO()` momentary keys. See also [Layers](feature_layers.md). | 188 | * `MO()` momentary keys. See also [Layers](feature_layers.md). |
189 | * `LM()` momentary keys with mod active. | ||
175 | * `LT()` layer tap keys, when held to activate a layer. However when tapped, and the key is quickly released, and sends a keycode, haptic feedback is still triggered. | 190 | * `LT()` layer tap keys, when held to activate a layer. However when tapped, and the key is quickly released, and sends a keycode, haptic feedback is still triggered. |
176 | * `TT()` layer tap toggle keys, when held to activate a layer. However when tapped `TAPPING_TOGGLE` times to permanently toggle the layer, on the last tap haptic feedback is still triggered. | 191 | * `TT()` layer tap toggle keys, when held to activate a layer. However when tapped `TAPPING_TOGGLE` times to permanently toggle the layer, on the last tap haptic feedback is still triggered. |
177 | * `MT()` mod tap keys, when held to keep a usual modifier key pressed. However when tapped, and the key is quickly released, and sends a keycode, haptic feedback is still triggered. See also [Mod-Tap](mod_tap.md). | 192 | * `MT()` mod tap keys, when held to keep a usual modifier key pressed. However when tapped, and the key is quickly released, and sends a keycode, haptic feedback is still triggered. See also [Mod-Tap](mod_tap.md). |
diff --git a/docs/feature_joystick.md b/docs/feature_joystick.md index 95702d6a2..fe33517a1 100644 --- a/docs/feature_joystick.md +++ b/docs/feature_joystick.md | |||
@@ -15,7 +15,7 @@ or send gamepad reports based on values computed by the keyboard. | |||
15 | 15 | ||
16 | To use analog input you must first enable it in `rules.mk`: | 16 | To use analog input you must first enable it in `rules.mk`: |
17 | 17 | ||
18 | ```makefile | 18 | ```make |
19 | JOYSTICK_ENABLE = yes | 19 | JOYSTICK_ENABLE = yes |
20 | JOYSTICK_DRIVER = analog # or 'digital' | 20 | JOYSTICK_DRIVER = analog # or 'digital' |
21 | ``` | 21 | ``` |
diff --git a/docs/feature_key_overrides.md b/docs/feature_key_overrides.md index 98036241e..2417fcf59 100644 --- a/docs/feature_key_overrides.md +++ b/docs/feature_key_overrides.md | |||
@@ -39,7 +39,7 @@ For more customization possibilities, you may directly create a `key_override_t` | |||
39 | This shows how the mentioned example of sending `delete` when `shift` + `backspace` are pressed is realized: | 39 | This shows how the mentioned example of sending `delete` when `shift` + `backspace` are pressed is realized: |
40 | 40 | ||
41 | ```c | 41 | ```c |
42 | const key_override_t delete_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_BSPACE, KC_DELETE); | 42 | const key_override_t delete_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_BSPC, KC_DEL); |
43 | 43 | ||
44 | // This globally defines all key overrides to be used | 44 | // This globally defines all key overrides to be used |
45 | const key_override_t **key_overrides = (const key_override_t *[]){ | 45 | const key_override_t **key_overrides = (const key_override_t *[]){ |
@@ -107,10 +107,10 @@ The [Grave Escape feature](feature_grave_esc.md) is limited in its configurabili | |||
107 | 107 | ||
108 | ```c | 108 | ```c |
109 | // Shift + esc = ~ | 109 | // Shift + esc = ~ |
110 | const key_override_t tilde_esc_override = ko_make_basic(MOD_MASK_SHIFT, KC_ESC, S(KC_GRAVE)); | 110 | const key_override_t tilde_esc_override = ko_make_basic(MOD_MASK_SHIFT, KC_ESC, S(KC_GRV)); |
111 | 111 | ||
112 | // GUI + esc = ` | 112 | // GUI + esc = ` |
113 | const key_override_t grave_esc_override = ko_make_basic(MOD_MASK_GUI, KC_ESC, KC_GRAVE); | 113 | const key_override_t grave_esc_override = ko_make_basic(MOD_MASK_GUI, KC_ESC, KC_GRV); |
114 | 114 | ||
115 | const key_override_t **key_overrides = (const key_override_t *[]){ | 115 | const key_override_t **key_overrides = (const key_override_t *[]){ |
116 | &tilde_esc_override, | 116 | &tilde_esc_override, |
diff --git a/docs/feature_layouts.md b/docs/feature_layouts.md index b34fd442d..93d040b55 100644 --- a/docs/feature_layouts.md +++ b/docs/feature_layouts.md | |||
@@ -25,7 +25,7 @@ The `layouts/default/` and `layouts/community/` are two examples of layout "repo | |||
25 | 25 | ||
26 | Each layout folder is named (`[a-z0-9_]`) after the physical aspects of the layout, in the most generic way possible, and contains a `readme.md` with the layout to be defined by the keyboard: | 26 | Each layout folder is named (`[a-z0-9_]`) after the physical aspects of the layout, in the most generic way possible, and contains a `readme.md` with the layout to be defined by the keyboard: |
27 | 27 | ||
28 | ```md | 28 | ```markdown |
29 | # 60_ansi | 29 | # 60_ansi |
30 | 30 | ||
31 | LAYOUT_60_ansi | 31 | LAYOUT_60_ansi |
diff --git a/docs/feature_led_matrix.md b/docs/feature_led_matrix.md index ed92bffd9..d96199a3c 100644 --- a/docs/feature_led_matrix.md +++ b/docs/feature_led_matrix.md | |||
@@ -49,6 +49,8 @@ Here is an example using 2 drivers. | |||
49 | 49 | ||
50 | !> Note the parentheses, this is so when `LED_DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL)` will give very different results than `rand() % LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL`. | 50 | !> Note the parentheses, this is so when `LED_DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL)` will give very different results than `rand() % LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL`. |
51 | 51 | ||
52 | For split keyboards using `LED_MATRIX_SPLIT` with an LED driver, you can either have the same driver address or different driver addresses. If using different addresses, use `DRIVER_ADDR_1` for one and `DRIVER_ADDR_2` for the other one. Then, in `g_is31_leds`, fill out the correct driver index (0 or 1). If using one address, use `DRIVER_ADDR_1` for both, and use index 0 for `g_is31_leds`. | ||
53 | |||
52 | Define these arrays listing all the LEDs in your `<keyboard>.c`: | 54 | Define these arrays listing all the LEDs in your `<keyboard>.c`: |
53 | 55 | ||
54 | ```c | 56 | ```c |
@@ -164,26 +166,26 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con | |||
164 | 166 | ||
165 | |Define |Description | | 167 | |Define |Description | |
166 | |-------------------------------------------------------|-----------------------------------------------| | 168 | |-------------------------------------------------------|-----------------------------------------------| |
167 | |`#define DISABLE_LED_MATRIX_ALPHAS_MODS` |Disables `LED_MATRIX_ALPHAS_MODS` | | 169 | |`#define ENABLE_LED_MATRIX_ALPHAS_MODS` |Enables `LED_MATRIX_ALPHAS_MODS` | |
168 | |`#define DISABLE_LED_MATRIX_BREATHING` |Disables `LED_MATRIX_BREATHING` | | 170 | |`#define ENABLE_LED_MATRIX_BREATHING` |Enables `LED_MATRIX_BREATHING` | |
169 | |`#define DISABLE_LED_MATRIX_BAND` |Disables `LED_MATRIX_BAND` | | 171 | |`#define ENABLE_LED_MATRIX_BAND` |Enables `LED_MATRIX_BAND` | |
170 | |`#define DISABLE_LED_MATRIX_BAND_PINWHEEL` |Disables `LED_MATRIX_BAND_PINWHEEL` | | 172 | |`#define ENABLE_LED_MATRIX_BAND_PINWHEEL` |Enables `LED_MATRIX_BAND_PINWHEEL` | |
171 | |`#define DISABLE_LED_MATRIX_BAND_SPIRAL` |Disables `LED_MATRIX_BAND_SPIRAL` | | 173 | |`#define ENABLE_LED_MATRIX_BAND_SPIRAL` |Enables `LED_MATRIX_BAND_SPIRAL` | |
172 | |`#define DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT` |Disables `LED_MATRIX_CYCLE_LEFT_RIGHT` | | 174 | |`#define ENABLE_LED_MATRIX_CYCLE_LEFT_RIGHT` |Enables `LED_MATRIX_CYCLE_LEFT_RIGHT` | |
173 | |`#define DISABLE_LED_MATRIX_CYCLE_UP_DOWN` |Disables `LED_MATRIX_CYCLE_UP_DOWN` | | 175 | |`#define ENABLE_LED_MATRIX_CYCLE_UP_DOWN` |Enables `LED_MATRIX_CYCLE_UP_DOWN` | |
174 | |`#define DISABLE_LED_MATRIX_CYCLE_OUT_IN` |Disables `LED_MATRIX_CYCLE_OUT_IN` | | 176 | |`#define ENABLE_LED_MATRIX_CYCLE_OUT_IN` |Enables `LED_MATRIX_CYCLE_OUT_IN` | |
175 | |`#define DISABLE_LED_MATRIX_DUAL_BEACON` |Disables `LED_MATRIX_DUAL_BEACON` | | 177 | |`#define ENABLE_LED_MATRIX_DUAL_BEACON` |Enables `LED_MATRIX_DUAL_BEACON` | |
176 | |`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE` |Disables `LED_MATRIX_SOLID_REACTIVE_SIMPLE` | | 178 | |`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE` |Enables `LED_MATRIX_SOLID_REACTIVE_SIMPLE` | |
177 | |`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE` |Disables `LED_MATRIX_SOLID_REACTIVE_WIDE` | | 179 | |`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_WIDE` |Enables `LED_MATRIX_SOLID_REACTIVE_WIDE` | |
178 | |`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE` |Disables `LED_MATRIX_SOLID_REACTIVE_MULTIWIDE` | | 180 | |`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE` |Enables `LED_MATRIX_SOLID_REACTIVE_MULTIWIDE` | |
179 | |`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS` |Disables `LED_MATRIX_SOLID_REACTIVE_CROSS` | | 181 | |`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_CROSS` |Enables `LED_MATRIX_SOLID_REACTIVE_CROSS` | |
180 | |`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS` |Disables `LED_MATRIX_SOLID_REACTIVE_MULTICROSS`| | 182 | |`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS` |Enables `LED_MATRIX_SOLID_REACTIVE_MULTICROSS`| |
181 | |`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS` |Disables `LED_MATRIX_SOLID_REACTIVE_NEXUS` | | 183 | |`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS` |Enables `LED_MATRIX_SOLID_REACTIVE_NEXUS` | |
182 | |`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS` |Disables `LED_MATRIX_SOLID_REACTIVE_MULTINEXUS`| | 184 | |`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS` |Enables `LED_MATRIX_SOLID_REACTIVE_MULTINEXUS`| |
183 | |`#define DISABLE_LED_MATRIX_SOLID_SPLASH` |Disables `LED_MATRIX_SOLID_SPLASH` | | 185 | |`#define ENABLE_LED_MATRIX_SOLID_SPLASH` |Enables `LED_MATRIX_SOLID_SPLASH` | |
184 | |`#define DISABLE_LED_MATRIX_SOLID_MULTISPLASH` |Disables `LED_MATRIX_SOLID_MULTISPLASH` | | 186 | |`#define ENABLE_LED_MATRIX_SOLID_MULTISPLASH` |Enables `LED_MATRIX_SOLID_MULTISPLASH` | |
185 | |`#define DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT` |Disables `LED_MATRIX_WAVE_LEFT_RIGHT` | | 187 | |`#define ENABLE_LED_MATRIX_WAVE_LEFT_RIGHT` |Enables `LED_MATRIX_WAVE_LEFT_RIGHT` | |
186 | |`#define DISABLE_LED_MATRIX_WAVE_UP_DOWN` |Disables `LED_MATRIX_WAVE_UP_DOWN` | | 188 | |`#define ENABLE_LED_MATRIX_WAVE_UP_DOWN` |Enables `LED_MATRIX_WAVE_UP_DOWN` | |
187 | 189 | ||
188 | ## Custom LED Matrix Effects :id=custom-led-matrix-effects | 190 | ## Custom LED Matrix Effects :id=custom-led-matrix-effects |
189 | 191 | ||
@@ -219,7 +221,7 @@ static bool my_cool_effect(effect_params_t* params) { | |||
219 | for (uint8_t i = led_min; i < led_max; i++) { | 221 | for (uint8_t i = led_min; i < led_max; i++) { |
220 | led_matrix_set_value(i, 0xFF); | 222 | led_matrix_set_value(i, 0xFF); |
221 | } | 223 | } |
222 | return led_max < DRIVER_LED_TOTAL; | 224 | return led_matrix_check_finished_leds(led_max); |
223 | } | 225 | } |
224 | 226 | ||
225 | // e.g: A more complex effect, relying on external methods and state, with | 227 | // e.g: A more complex effect, relying on external methods and state, with |
@@ -233,8 +235,7 @@ static bool my_cool_effect2_complex_run(effect_params_t* params) { | |||
233 | for (uint8_t i = led_min; i < led_max; i++) { | 235 | for (uint8_t i = led_min; i < led_max; i++) { |
234 | led_matrix_set_value(i, some_global_state++); | 236 | led_matrix_set_value(i, some_global_state++); |
235 | } | 237 | } |
236 | 238 | return led_matrix_check_finished_leds(led_max); | |
237 | return led_max < DRIVER_LED_TOTAL; | ||
238 | } | 239 | } |
239 | static bool my_cool_effect2(effect_params_t* params) { | 240 | static bool my_cool_effect2(effect_params_t* params) { |
240 | if (params->init) my_cool_effect2_complex_init(params); | 241 | if (params->init) my_cool_effect2_complex_init(params); |
diff --git a/docs/feature_macros.md b/docs/feature_macros.md index 3660f3775..6807111ca 100644 --- a/docs/feature_macros.md +++ b/docs/feature_macros.md | |||
@@ -118,7 +118,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
118 | void post_process_record_user(uint16_t keycode, keyrecord_t *record) { | 118 | void post_process_record_user(uint16_t keycode, keyrecord_t *record) { |
119 | switch (keycode) { | 119 | switch (keycode) { |
120 | case KC_A ... KC_F21: //notice how it skips over F22 | 120 | case KC_A ... KC_F21: //notice how it skips over F22 |
121 | case KC_F23 ... KC_EXSEL: //exsel is the last one before the modifier keys | 121 | case KC_F23 ... KC_EXSL: //exsel is the last one before the modifier keys |
122 | if (!record->event.pressed) { | 122 | if (!record->event.pressed) { |
123 | f22_tracker--; | 123 | f22_tracker--; |
124 | if (!f22_tracker) { | 124 | if (!f22_tracker) { |
diff --git a/docs/feature_midi.md b/docs/feature_midi.md index ab29d89db..3da5c4940 100644 --- a/docs/feature_midi.md +++ b/docs/feature_midi.md | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | First, enable MIDI by adding the following to your `rules.mk`: | 5 | First, enable MIDI by adding the following to your `rules.mk`: |
6 | 6 | ||
7 | ```makefile | 7 | ```make |
8 | MIDI_ENABLE = yes | 8 | MIDI_ENABLE = yes |
9 | ``` | 9 | ``` |
10 | 10 | ||
diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md index 6d82aa0f5..0c926f674 100644 --- a/docs/feature_oled_driver.md +++ b/docs/feature_oled_driver.md | |||
@@ -38,7 +38,7 @@ Then in your `keymap.c` file, implement the OLED task call. This example assumes | |||
38 | 38 | ||
39 | ```c | 39 | ```c |
40 | #ifdef OLED_ENABLE | 40 | #ifdef OLED_ENABLE |
41 | void oled_task_user(void) { | 41 | bool oled_task_user(void) { |
42 | // Host Keyboard Layer Status | 42 | // Host Keyboard Layer Status |
43 | oled_write_P(PSTR("Layer: "), false); | 43 | oled_write_P(PSTR("Layer: "), false); |
44 | 44 | ||
@@ -62,6 +62,8 @@ void oled_task_user(void) { | |||
62 | oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); | 62 | oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); |
63 | oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); | 63 | oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); |
64 | oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); | 64 | oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); |
65 | |||
66 | return false; | ||
65 | } | 67 | } |
66 | #endif | 68 | #endif |
67 | ``` | 69 | ``` |
@@ -133,13 +135,14 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { | |||
133 | return rotation; | 135 | return rotation; |
134 | } | 136 | } |
135 | 137 | ||
136 | void oled_task_user(void) { | 138 | bool oled_task_user(void) { |
137 | if (is_keyboard_master()) { | 139 | if (is_keyboard_master()) { |
138 | render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) | 140 | render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) |
139 | } else { | 141 | } else { |
140 | render_logo(); // Renders a static logo | 142 | render_logo(); // Renders a static logo |
141 | oled_scroll_left(); // Turns on scrolling | 143 | oled_scroll_left(); // Turns on scrolling |
142 | } | 144 | } |
145 | return false; | ||
143 | } | 146 | } |
144 | #endif | 147 | #endif |
145 | ``` | 148 | ``` |
@@ -242,6 +245,7 @@ bool oled_init(oled_rotation_t rotation); | |||
242 | // Called at the start of oled_init, weak function overridable by the user | 245 | // Called at the start of oled_init, weak function overridable by the user |
243 | // rotation - the value passed into oled_init | 246 | // rotation - the value passed into oled_init |
244 | // Return new oled_rotation_t if you want to override default rotation | 247 | // Return new oled_rotation_t if you want to override default rotation |
248 | oled_rotation_t oled_init_kb(oled_rotation_t rotation); | ||
245 | oled_rotation_t oled_init_user(oled_rotation_t rotation); | 249 | oled_rotation_t oled_init_user(oled_rotation_t rotation); |
246 | 250 | ||
247 | // Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering | 251 | // Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering |
@@ -333,7 +337,8 @@ uint8_t oled_get_brightness(void); | |||
333 | void oled_task(void); | 337 | void oled_task(void); |
334 | 338 | ||
335 | // Called at the start of oled_task, weak function overridable by the user | 339 | // Called at the start of oled_task, weak function overridable by the user |
336 | void oled_task_user(void); | 340 | bool oled_task_kb(void); |
341 | bool oled_task_user(void); | ||
337 | 342 | ||
338 | // Set the specific 8 lines rows of the screen to scroll. | 343 | // Set the specific 8 lines rows of the screen to scroll. |
339 | // 0 is the default for start, and 7 for end, which is the entire | 344 | // 0 is the default for start, and 7 for end, which is the entire |
diff --git a/docs/feature_pointing_device.md b/docs/feature_pointing_device.md index 905c2a8f9..031ee52c1 100644 --- a/docs/feature_pointing_device.md +++ b/docs/feature_pointing_device.md | |||
@@ -1,19 +1,205 @@ | |||
1 | # Pointing Device :id=pointing-device | 1 | # Pointing Device :id=pointing-device |
2 | 2 | ||
3 | Pointing Device is a generic name for a feature intended to be generic: moving the system pointer around. There are certainly other options for it - like mousekeys - but this aims to be easily modifiable and lightweight. You can implement custom keys to control functionality, or you can gather information from other peripherals and insert it directly here - let QMK handle the processing for you. | 3 | Pointing Device is a generic name for a feature intended to be generic: moving the system pointer around. There are certainly other options for it - like mousekeys - but this aims to be easily modifiable and hardware driven. You can implement custom keys to control functionality, or you can gather information from other peripherals and insert it directly here - let QMK handle the processing for you. |
4 | 4 | ||
5 | To enable Pointing Device, uncomment the following line in your rules.mk: | 5 | To enable Pointing Device, uncomment the following line in your rules.mk: |
6 | 6 | ||
7 | ```makefile | 7 | ```make |
8 | POINTING_DEVICE_ENABLE = yes | 8 | POINTING_DEVICE_ENABLE = yes |
9 | ``` | 9 | ``` |
10 | 10 | ||
11 | To manipulate the mouse report, you can use the following functions: | 11 | ## Sensor Drivers |
12 | 12 | ||
13 | * `pointing_device_get_report()` - Returns the current report_mouse_t that represents the information sent to the host computer | 13 | There are a number of sensors that are supported by default. Note that only one sensor can be enabled by `POINTING_DEVICE_DRIVER` at a time. If you need to enable more than one sensor, then you need to implement it manually. |
14 | * `pointing_device_set_report(report_mouse_t newMouseReport)` - Overrides and saves the report_mouse_t to be sent to the host computer | 14 | |
15 | ### ADNS 5050 Sensor | ||
16 | |||
17 | To use the ADNS 5050 sensor, add this to your `rules.mk` | ||
18 | |||
19 | ```make | ||
20 | POINTING_DEVICE_DRIVER = adns5050 | ||
21 | ``` | ||
22 | |||
23 | The ADNS 5050 sensor uses a serial type protocol for communication, and requires an additional light source. | ||
24 | |||
25 | | Setting | Description | | ||
26 | |--------------------|---------------------------------------------------------------------| | ||
27 | |`ADNS5050_SCLK_PIN` | (Required) The pin connected to the clock pin of the sensor. | | ||
28 | |`ADNS5050_SDIO_PIN` | (Required) The pin connected to the data pin of the sensor. | | ||
29 | |`ADNS5050_CS_PIN` | (Required) The pin connected to the cable select pin of the sensor. | | ||
30 | |||
31 | The CPI range is 125-1375, in increments of 125. Defaults to 500 CPI. | ||
32 | |||
33 | ### ADSN 9800 Sensor | ||
34 | |||
35 | To use the ADNS 9800 sensor, add this to your `rules.mk` | ||
36 | |||
37 | ```make | ||
38 | POINTING_DEVICE_DRIVER = adns9800 | ||
39 | ``` | ||
40 | |||
41 | The ADNS 9800 is an SPI driven optical sensor, that uses laser output for surface tracking. | ||
42 | |||
43 | | Setting | Description | Default | | ||
44 | |------------------------|------------------------------------------------------------------------|---------------| | ||
45 | |`ADNS9800_CLOCK_SPEED` | (Optional) Sets the clock speed that the sensor runs at. | `2000000` | | ||
46 | |`ADNS9800_SPI_LSBFIRST` | (Optional) Sets the Least/Most Significant Byte First setting for SPI. | `false` | | ||
47 | |`ADNS9800_SPI_MODE` | (Optional) Sets the SPI Mode for the sensor. | `3` | | ||
48 | |`ADNS9800_SPI_DIVISOR` | (Optional) Sets the SPI Divisor used for SPI communication. | _varies_ | | ||
49 | |`ADNS9800_CS_PIN` | (Required) Sets the Cable Select pin connected to the sensor. | _not defined_ | | ||
50 | |||
51 | |||
52 | The CPI range is 800-8200, in increments of 200. Defaults to 1800 CPI. | ||
53 | |||
54 | ### Analog Joystick | ||
55 | |||
56 | To use an analog joystick to control the pointer, add this to your `rules.mk` | ||
57 | |||
58 | ```make | ||
59 | POINTING_DEVICE_DRIVER = analog_joystick | ||
60 | ``` | ||
61 | |||
62 | The Analog Joystick is an analog (ADC) driven sensor. There are a variety of joysticks that you can use for this. | ||
63 | |||
64 | | Setting | Description | Default | | ||
65 | |----------------------------------|----------------------------------------------------------------------------|---------------| | ||
66 | |`ANALOG_JOYSTICK_X_AXIS_PIN` | (Required) The pin used for the vertical/X axis. | _not defined_ | | ||
67 | |`ANALOG_JOYSTICK_Y_AXIS_PIN` | (Required) The pin used for the horizontal/Y axis. | _not defined_ | | ||
68 | |`ANALOG_JOYSTICK_AXIS_MIN` | (Optional) Sets the lower range to be considered movement. | `0` | | ||
69 | |`ANALOG_JOYSTICK_AXIS_MAX` | (Optional) Sets the upper range to be considered movement. | `1023` | | ||
70 | |`ANALOG_JOYSTICK_SPEED_REGULATOR` | (Optional) The divisor used to slow down movement. (lower makes it faster) | `20` | | ||
71 | |`ANALOG_JOYSTICK_READ_INTERVAL` | (Optional) The interval in milliseconds between reads. | `10` | | ||
72 | |`ANALOG_JOYSTICK_SPEED_MAX` | (Optional) The maxiumum value used for motion. | `2` | | ||
73 | |`ANALOG_JOYSTICK_CLICK_PIN` | (Optional) The pin wired up to the press switch of the analog stick. | _not defined_ | | ||
74 | |||
75 | |||
76 | ### Cirque Trackpad | ||
77 | |||
78 | To use the Cirque Trackpad sensor, add this to your `rules.mk`: | ||
79 | |||
80 | ```make | ||
81 | POINTING_DEVICE_DRIVER = cirque_pinnacle_i2c | ||
82 | ``` | ||
83 | |||
84 | or | ||
85 | |||
86 | ```make | ||
87 | POINTING_DEVICE_DRIVER = cirque_pinnacle_spi | ||
88 | ``` | ||
89 | |||
90 | |||
91 | This supports the Cirque Pinnacle 1CA027 Touch Controller, which is used in the TM040040, TM035035 and the TM023023 trackpads. These are I2C or SPI compatible, and both configurations are supported. | ||
92 | |||
93 | | Setting | Description | Default | | ||
94 | |---------------------------------|---------------------------------------------------------------------------------|-----------------------| | ||
95 | |`CIRQUE_PINNACLE_X_LOWER` | (Optional) The minimum reachable X value on the sensor. | `127` | | ||
96 | |`CIRQUE_PINNACLE_X_UPPER` | (Optional) The maximum reachable X value on the sensor. | `1919` | | ||
97 | |`CIRQUE_PINNACLE_Y_LOWER` | (Optional) The minimum reachable Y value on the sensor. | `63` | | ||
98 | |`CIRQUE_PINNACLE_Y_UPPER` | (Optional) The maximum reachable Y value on the sensor. | `1471` | | ||
99 | |`CIRQUE_PINNACLE_TAPPING_TERM` | (Optional) Length of time that a touch can be to be considered a tap. | `TAPPING_TERM`/`200` | | ||
100 | |`CIRQUE_PINNACLE_TOUCH_DEBOUNCE` | (Optional) Length of time that a touch can be to be considered a tap. | `TAPPING_TERM`/`200` | | ||
15 | 101 | ||
16 | Keep in mind that a report_mouse_t (here "mouseReport") has the following properties: | 102 | | I2C Setting | Description | Default | |
103 | |--------------------------|---------------------------------------------------------------------------------|---------| | ||
104 | |`CIRQUE_PINNACLE_ADDR` | (Required) Sets the I2C Address for the Cirque Trackpad | `0x2A` | | ||
105 | |`CIRQUE_PINNACLE_TIMEOUT` | (Optional) The timeout for i2c communication with the trackpad in milliseconds. | `20` | | ||
106 | |||
107 | | SPI Setting | Description | Default | | ||
108 | |-------------------------------|------------------------------------------------------------------------|---------------| | ||
109 | |`CIRQUE_PINNACLE_CLOCK_SPEED` | (Optional) Sets the clock speed that the sensor runs at. | `1000000` | | ||
110 | |`CIRQUE_PINNACLE_SPI_LSBFIRST` | (Optional) Sets the Least/Most Significant Byte First setting for SPI. | `false` | | ||
111 | |`CIRQUE_PINNACLE_SPI_MODE` | (Optional) Sets the SPI Mode for the sensor. | `1` | | ||
112 | |`CIRQUE_PINNACLE_SPI_DIVISOR` | (Optional) Sets the SPI Divisor used for SPI communication. | _varies_ | | ||
113 | |`CIRQUE_PINNACLE_SPI_CS_PIN` | (Required) Sets the Cable Select pin connected to the sensor. | _not defined_ | | ||
114 | |||
115 | Default Scaling/CPI is 1024. | ||
116 | |||
117 | ### Pimoroni Trackball | ||
118 | |||
119 | To use the Pimoroni Trackball module, add this to your `rules.mk`: | ||
120 | |||
121 | ```make | ||
122 | POINTING_DEVICE_DRIVER = pimoroni_trackball | ||
123 | ``` | ||
124 | |||
125 | The Pimoroni Trackball module is a I2C based breakout board with an RGB enable trackball. | ||
126 | |||
127 | | Setting | Description | Default | | ||
128 | |-------------------------------------|------------------------------------------------------------------------------------|---------| | ||
129 | |`PIMORONI_TRACKBALL_ADDRESS` | (Required) Sets the I2C Address for the Pimoroni Trackball. | `0x0A` | | ||
130 | |`PIMORONI_TRACKBALL_TIMEOUT` | (Optional) The timeout for i2c communication with the trackpad in milliseconds. | `100` | | ||
131 | |`PIMORONI_TRACKBALL_INTERVAL_MS` | (Optional) The update/read interval for the sensor in milliseconds. | `8` | | ||
132 | |`PIMORONI_TRACKBALL_SCALE` | (Optional) The multiplier used to generate reports from the sensor. | `5` | | ||
133 | |`PIMORONI_TRACKBALL_DEBOUNCE_CYCLES` | (Optional) The number of scan cycles used for debouncing on the ball press. | `20` | | ||
134 | |`PIMORONI_TRACKBALL_ERROR_COUNT` | (Optional) Specifies the number of read/write errors until the sensor is disabled. | `10` | | ||
135 | |||
136 | ### PMW 3360 Sensor | ||
137 | |||
138 | To use the PMW 3360 sensor, add this to your `rules.mk` | ||
139 | |||
140 | ```make | ||
141 | POINTING_DEVICE_DRIVER = pmw3360 | ||
142 | ``` | ||
143 | |||
144 | The PMW 3360 is an SPI driven optical sensor, that uses a built in IR LED for surface tracking. | ||
145 | |||
146 | | Setting | Description | Default | | ||
147 | |-----------------------------|--------------------------------------------------------------------------------------------|---------------| | ||
148 | |`PMW3360_CS_PIN` | (Required) Sets the Cable Select pin connected to the sensor. | _not defined_ | | ||
149 | |`PMW3360_CLOCK_SPEED` | (Optional) Sets the clock speed that the sensor runs at. | `2000000` | | ||
150 | |`PMW3360_SPI_LSBFIRST` | (Optional) Sets the Least/Most Significant Byte First setting for SPI. | `false` | | ||
151 | |`PMW3360_SPI_MODE` | (Optional) Sets the SPI Mode for the sensor. | `3` | | ||
152 | |`PMW3360_SPI_DIVISOR` | (Optional) Sets the SPI Divisor used for SPI communication. | _varies_ | | ||
153 | |`ROTATIONAL_TRANSFORM_ANGLE` | (Optional) Allows for the sensor data to be rotated +/- 30 degrees directly in the sensor. | `0` | | ||
154 | |||
155 | The CPI range is 100-12000, in increments of 100. Defaults to 1600 CPI. | ||
156 | |||
157 | |||
158 | ### Custom Driver | ||
159 | |||
160 | If you have a sensor type that isn't supported here, you can manually implement it, by adding these functions (with the correct implementation for your device): | ||
161 | |||
162 | ```c | ||
163 | void pointing_device_driver_init(void) {} | ||
164 | report_mouse_t pointing_device_driver_get_report(report_mouse_t mouse_report) { return mouse_report; } | ||
165 | uint16_t pointing_device_driver_get_cpi(void) { return 0; } | ||
166 | void pointing_device_driver_set_cpi(uint16_t cpi) {} | ||
167 | ``` | ||
168 | |||
169 | !> Ideally, new sensor hardware should be added to `drivers/sensors/` and `quantum/pointing_device_drivers.c`, but there may be cases where it's very specific to the hardware. So these functions are provided, just in case. | ||
170 | |||
171 | ## Common Configuration | ||
172 | |||
173 | | Setting | Description | Default | | ||
174 | |-------------------------------|-----------------------------------------------------------------------|---------------| | ||
175 | |`POINTING_DEVICE_ROTATION_90` | (Optional) Rotates the X and Y data by 90 degrees. | _not defined_ | | ||
176 | |`POINTING_DEVICE_ROTATION_180` | (Optional) Rotates the X and Y data by 180 degrees. | _not defined_ | | ||
177 | |`POINTING_DEVICE_ROTATION_270` | (Optional) Rotates the X and Y data by 270 degrees. | _not defined_ | | ||
178 | |`POINTING_DEVICE_INVERT_X` | (Optional) Inverts the X axis report. | _not defined_ | | ||
179 | |`POINTING_DEVICE_INVERT_Y` | (Optional) Inverts the Y axis report. | _not defined_ | | ||
180 | |`POINTING_DEVICE_MOTION_PIN` | (Optional) If supported, will only read from sensor if pin is active. | _not defined_ | | ||
181 | |||
182 | |||
183 | ## Callbacks and Functions | ||
184 | |||
185 | | Function | Description | | ||
186 | |-----------------------------------|----------------------------------------------------------------------------------------------------------------------------------------| | ||
187 | | `pointing_device_init_kb(void)` | Callback to allow for keyboard level initialization. Useful for additional hardware sensors. | | ||
188 | | `pointing_device_init_user(void)` | Callback to allow for user level initialization. Useful for additional hardware sensors. | | ||
189 | | `pointing_device_task_kb(mouse_report)` | Callback that sends sensor data, so keyboard code can intercept and modify the data. Returns a mouse report. | | ||
190 | | `pointing_device_task_user(mouse_report)` | Callback that sends sensor data, so user coe can intercept and modify the data. Returns a mouse report. | | ||
191 | | `pointing_device_handle_buttons(buttons, pressed, button)` | Callback to handle hardware button presses. Returns a `uint8_t`. | | ||
192 | | `pointing_device_get_cpi(void)` | Gets the current CPI/DPI setting from the sensor, if supported. | | ||
193 | | `pointing_device_set_cpi(uint16_t)` | Sets the CPI/DPI, if supported. | | ||
194 | | `pointing_device_get_report(void)` | Returns the current mouse report (as a `mouse_report_t` data structure). | | ||
195 | | `pointing_device_set_report(mouse_report)` | Sets the mouse report to the assigned `mouse_report_t` data structured passed to the function. | | ||
196 | | `pointing_device_send(void)` | Sends the current mouse report to the host system. Function can be replaced. | | ||
197 | | `has_mouse_report_changed(old, new)` | Compares the old and new `mouse_report_t` data and returns true only if it has changed. | | ||
198 | |||
199 | |||
200 | # Manipulating Mouse Reports | ||
201 | |||
202 | The report_mouse_t (here "mouseReport") has the following properties: | ||
17 | 203 | ||
18 | * `mouseReport.x` - this is a signed int from -127 to 127 (not 128, this is defined in USB HID spec) representing movement (+ to the right, - to the left) on the x axis. | 204 | * `mouseReport.x` - this is a signed int from -127 to 127 (not 128, this is defined in USB HID spec) representing movement (+ to the right, - to the left) on the x axis. |
19 | * `mouseReport.y` - this is a signed int from -127 to 127 (not 128, this is defined in USB HID spec) representing movement (+ upward, - downward) on the y axis. | 205 | * `mouseReport.y` - this is a signed int from -127 to 127 (not 128, this is defined in USB HID spec) representing movement (+ upward, - downward) on the y axis. |
@@ -21,8 +207,10 @@ Keep in mind that a report_mouse_t (here "mouseReport") has the following proper | |||
21 | * `mouseReport.h` - this is a signed int from -127 to 127 (not 128, this is defined in USB HID spec) representing horizontal scrolling (+ right, - left). | 207 | * `mouseReport.h` - this is a signed int from -127 to 127 (not 128, this is defined in USB HID spec) representing horizontal scrolling (+ right, - left). |
22 | * `mouseReport.buttons` - this is a uint8_t in which all 8 bits are used. These bits represent the mouse button state - bit 0 is mouse button 1, and bit 7 is mouse button 8. | 208 | * `mouseReport.buttons` - this is a uint8_t in which all 8 bits are used. These bits represent the mouse button state - bit 0 is mouse button 1, and bit 7 is mouse button 8. |
23 | 209 | ||
24 | Once you have made the necessary changes to the mouse report, you need to send it: | 210 | To manually manipulate the mouse reports outside of the `pointing_device_task_*` functions, you can use: |
25 | 211 | ||
212 | * `pointing_device_get_report()` - Returns the current report_mouse_t that represents the information sent to the host computer | ||
213 | * `pointing_device_set_report(report_mouse_t newMouseReport)` - Overrides and saves the report_mouse_t to be sent to the host computer | ||
26 | * `pointing_device_send()` - Sends the mouse report to the host and zeroes out the report. | 214 | * `pointing_device_send()` - Sends the mouse report to the host and zeroes out the report. |
27 | 215 | ||
28 | When the mouse report is sent, the x, y, v, and h values are set to 0 (this is done in `pointing_device_send()`, which can be overridden to avoid this behavior). This way, button states persist, but movement will only occur once. For further customization, both `pointing_device_init` and `pointing_device_task` can be overridden. | 216 | When the mouse report is sent, the x, y, v, and h values are set to 0 (this is done in `pointing_device_send()`, which can be overridden to avoid this behavior). This way, button states persist, but movement will only occur once. For further customization, both `pointing_device_init` and `pointing_device_task` can be overridden. |
@@ -31,6 +219,8 @@ Additionally, by default, `pointing_device_send()` will only send a report when | |||
31 | 219 | ||
32 | Also, you use the `has_mouse_report_changed(new, old)` function to check to see if the report has changed. | 220 | Also, you use the `has_mouse_report_changed(new, old)` function to check to see if the report has changed. |
33 | 221 | ||
222 | ## Example | ||
223 | |||
34 | In the following example, a custom key is used to click the mouse and scroll 127 units vertically and horizontally, then undo all of that when released - because that's a totally useful function. Listen, this is an example: | 224 | In the following example, a custom key is used to click the mouse and scroll 127 units vertically and horizontally, then undo all of that when released - because that's a totally useful function. Listen, this is an example: |
35 | 225 | ||
36 | ```c | 226 | ```c |
diff --git a/docs/feature_programmable_button.md b/docs/feature_programmable_button.md new file mode 100644 index 000000000..b1ef555d1 --- /dev/null +++ b/docs/feature_programmable_button.md | |||
@@ -0,0 +1,74 @@ | |||
1 | ## Programmable Button | ||
2 | |||
3 | Programmable button is a feature that can be used to send keys that have no | ||
4 | predefined meaning. | ||
5 | This means they can be processed on the host side by custom software without | ||
6 | colliding without the operating system trying to interpret these keys. | ||
7 | |||
8 | The keycodes are emitted according to the HID usage | ||
9 | "Telephony Device Page" (0x0B), "Programmable button usage" (0x07). | ||
10 | On Linux (> 5.14) they are handled automatically and translated to `KEY_MACRO#` | ||
11 | keycodes. | ||
12 | (Up to `KEY_MACRO30`) | ||
13 | |||
14 | ### Enabling Programmable Button support | ||
15 | |||
16 | To enable Programmable Button, add the following line to your keymap’s `rules.mk`: | ||
17 | |||
18 | ```c | ||
19 | PROGRAMMABLE_BUTTON_ENABLE = yes | ||
20 | ``` | ||
21 | |||
22 | ### Mapping | ||
23 | |||
24 | In your keymap you can use the following keycodes to map key presses to Programmable Buttons: | ||
25 | |||
26 | |Key |Description | | ||
27 | |------------------------|----------------------| | ||
28 | |`PROGRAMMABLE_BUTTON_1` |Programmable button 1 | | ||
29 | |`PROGRAMMABLE_BUTTON_2` |Programmable button 2 | | ||
30 | |`PROGRAMMABLE_BUTTON_3` |Programmable button 3 | | ||
31 | |`PROGRAMMABLE_BUTTON_4` |Programmable button 4 | | ||
32 | |`PROGRAMMABLE_BUTTON_5` |Programmable button 5 | | ||
33 | |`PROGRAMMABLE_BUTTON_6` |Programmable button 6 | | ||
34 | |`PROGRAMMABLE_BUTTON_7` |Programmable button 7 | | ||
35 | |`PROGRAMMABLE_BUTTON_8` |Programmable button 8 | | ||
36 | |`PROGRAMMABLE_BUTTON_9` |Programmable button 9 | | ||
37 | |`PROGRAMMABLE_BUTTON_10`|Programmable button 10| | ||
38 | |`PROGRAMMABLE_BUTTON_11`|Programmable button 11| | ||
39 | |`PROGRAMMABLE_BUTTON_12`|Programmable button 12| | ||
40 | |`PROGRAMMABLE_BUTTON_13`|Programmable button 13| | ||
41 | |`PROGRAMMABLE_BUTTON_14`|Programmable button 14| | ||
42 | |`PROGRAMMABLE_BUTTON_15`|Programmable button 15| | ||
43 | |`PROGRAMMABLE_BUTTON_16`|Programmable button 16| | ||
44 | |`PROGRAMMABLE_BUTTON_17`|Programmable button 17| | ||
45 | |`PROGRAMMABLE_BUTTON_18`|Programmable button 18| | ||
46 | |`PROGRAMMABLE_BUTTON_19`|Programmable button 19| | ||
47 | |`PROGRAMMABLE_BUTTON_20`|Programmable button 20| | ||
48 | |`PROGRAMMABLE_BUTTON_21`|Programmable button 21| | ||
49 | |`PROGRAMMABLE_BUTTON_22`|Programmable button 22| | ||
50 | |`PROGRAMMABLE_BUTTON_23`|Programmable button 23| | ||
51 | |`PROGRAMMABLE_BUTTON_24`|Programmable button 24| | ||
52 | |`PROGRAMMABLE_BUTTON_25`|Programmable button 25| | ||
53 | |`PROGRAMMABLE_BUTTON_26`|Programmable button 26| | ||
54 | |`PROGRAMMABLE_BUTTON_27`|Programmable button 27| | ||
55 | |`PROGRAMMABLE_BUTTON_28`|Programmable button 28| | ||
56 | |`PROGRAMMABLE_BUTTON_29`|Programmable button 29| | ||
57 | |`PROGRAMMABLE_BUTTON_30`|Programmable button 30| | ||
58 | |`PROGRAMMABLE_BUTTON_31`|Programmable button 31| | ||
59 | |`PROGRAMMABLE_BUTTON_32`|Programmable button 32| | ||
60 | |`PB_1` to `PB_32` |Aliases for keymaps | | ||
61 | |||
62 | ### API | ||
63 | |||
64 | You can also use a dedicated API defined in `programmable_button.h` to interact with this feature: | ||
65 | |||
66 | ``` | ||
67 | void programmable_button_clear(void); | ||
68 | void programmable_button_send(void); | ||
69 | void programmable_button_on(uint8_t code); | ||
70 | void programmable_button_off(uint8_t code); | ||
71 | bool programmable_button_is_on(uint8_t code); | ||
72 | uint32_t programmable_button_get_report(void); | ||
73 | void programmable_button_set_report(uint32_t report); | ||
74 | ``` | ||
diff --git a/docs/feature_ps2_mouse.md b/docs/feature_ps2_mouse.md index 776a33150..c980705ae 100644 --- a/docs/feature_ps2_mouse.md +++ b/docs/feature_ps2_mouse.md | |||
@@ -30,7 +30,7 @@ Note: This is not recommended, you may encounter jerky movement or unsent inputs | |||
30 | 30 | ||
31 | In rules.mk: | 31 | In rules.mk: |
32 | 32 | ||
33 | ```makefile | 33 | ```make |
34 | PS2_MOUSE_ENABLE = yes | 34 | PS2_MOUSE_ENABLE = yes |
35 | PS2_USE_BUSYWAIT = yes | 35 | PS2_USE_BUSYWAIT = yes |
36 | ``` | 36 | ``` |
@@ -39,14 +39,8 @@ In your keyboard config.h: | |||
39 | 39 | ||
40 | ```c | 40 | ```c |
41 | #ifdef PS2_USE_BUSYWAIT | 41 | #ifdef PS2_USE_BUSYWAIT |
42 | # define PS2_CLOCK_PORT PORTD | 42 | # define PS2_CLOCK_PIN D1 |
43 | # define PS2_CLOCK_PIN PIND | 43 | # define PS2_DATA_PIN D2 |
44 | # define PS2_CLOCK_DDR DDRD | ||
45 | # define PS2_CLOCK_BIT 1 | ||
46 | # define PS2_DATA_PORT PORTD | ||
47 | # define PS2_DATA_PIN PIND | ||
48 | # define PS2_DATA_DDR DDRD | ||
49 | # define PS2_DATA_BIT 2 | ||
50 | #endif | 44 | #endif |
51 | ``` | 45 | ``` |
52 | 46 | ||
@@ -56,7 +50,7 @@ The following example uses D2 for clock and D5 for data. You can use any INT or | |||
56 | 50 | ||
57 | In rules.mk: | 51 | In rules.mk: |
58 | 52 | ||
59 | ```makefile | 53 | ```make |
60 | PS2_MOUSE_ENABLE = yes | 54 | PS2_MOUSE_ENABLE = yes |
61 | PS2_USE_INT = yes | 55 | PS2_USE_INT = yes |
62 | ``` | 56 | ``` |
@@ -65,14 +59,8 @@ In your keyboard config.h: | |||
65 | 59 | ||
66 | ```c | 60 | ```c |
67 | #ifdef PS2_USE_INT | 61 | #ifdef PS2_USE_INT |
68 | #define PS2_CLOCK_PORT PORTD | 62 | #define PS2_CLOCK_PIN D2 |
69 | #define PS2_CLOCK_PIN PIND | 63 | #define PS2_DATA_PIN D5 |
70 | #define PS2_CLOCK_DDR DDRD | ||
71 | #define PS2_CLOCK_BIT 2 | ||
72 | #define PS2_DATA_PORT PORTD | ||
73 | #define PS2_DATA_PIN PIND | ||
74 | #define PS2_DATA_DDR DDRD | ||
75 | #define PS2_DATA_BIT 5 | ||
76 | 64 | ||
77 | #define PS2_INT_INIT() do { \ | 65 | #define PS2_INT_INIT() do { \ |
78 | EICRA |= ((1<<ISC21) | \ | 66 | EICRA |= ((1<<ISC21) | \ |
@@ -102,8 +90,8 @@ PS2_USE_INT = yes | |||
102 | In your keyboard config.h: | 90 | In your keyboard config.h: |
103 | 91 | ||
104 | ```c | 92 | ```c |
105 | #define PS2_CLOCK A8 | 93 | #define PS2_CLOCK_PIN A8 |
106 | #define PS2_DATA A9 | 94 | #define PS2_DATA_PIN A9 |
107 | ``` | 95 | ``` |
108 | 96 | ||
109 | And in the chibios specifig halconf.h: | 97 | And in the chibios specifig halconf.h: |
@@ -118,7 +106,7 @@ To use USART on the ATMega32u4, you have to use PD5 for clock and PD2 for data. | |||
118 | 106 | ||
119 | In rules.mk: | 107 | In rules.mk: |
120 | 108 | ||
121 | ```makefile | 109 | ```make |
122 | PS2_MOUSE_ENABLE = yes | 110 | PS2_MOUSE_ENABLE = yes |
123 | PS2_USE_USART = yes | 111 | PS2_USE_USART = yes |
124 | ``` | 112 | ``` |
@@ -127,14 +115,8 @@ In your keyboard config.h: | |||
127 | 115 | ||
128 | ```c | 116 | ```c |
129 | #ifdef PS2_USE_USART | 117 | #ifdef PS2_USE_USART |
130 | #define PS2_CLOCK_PORT PORTD | 118 | #define PS2_CLOCK_PIN D5 |
131 | #define PS2_CLOCK_PIN PIND | 119 | #define PS2_DATA_PIN D2 |
132 | #define PS2_CLOCK_DDR DDRD | ||
133 | #define PS2_CLOCK_BIT 5 | ||
134 | #define PS2_DATA_PORT PORTD | ||
135 | #define PS2_DATA_PIN PIND | ||
136 | #define PS2_DATA_DDR DDRD | ||
137 | #define PS2_DATA_BIT 2 | ||
138 | 120 | ||
139 | /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */ | 121 | /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */ |
140 | /* set DDR of CLOCK as input to be slave */ | 122 | /* set DDR of CLOCK as input to be slave */ |
diff --git a/docs/feature_rawhid.md b/docs/feature_rawhid.md index 4a688fcba..558a23a80 100644 --- a/docs/feature_rawhid.md +++ b/docs/feature_rawhid.md | |||
@@ -15,7 +15,7 @@ RAW_ENABLE = yes | |||
15 | 15 | ||
16 | In your `keymap.c` include `"raw_hid.h"` and implement the following: | 16 | In your `keymap.c` include `"raw_hid.h"` and implement the following: |
17 | 17 | ||
18 | ```C | 18 | ```c |
19 | void raw_hid_receive(uint8_t *data, uint8_t length) { | 19 | void raw_hid_receive(uint8_t *data, uint8_t length) { |
20 | // Your code goes here. data is the packet received from host. | 20 | // Your code goes here. data is the packet received from host. |
21 | } | 21 | } |
@@ -23,7 +23,7 @@ void raw_hid_receive(uint8_t *data, uint8_t length) { | |||
23 | 23 | ||
24 | The `"raw_hid.h"` header also declares `void raw_hid_send(uint8_t *data, uint8_t length);` which allows sending packets from keyboard to host. As an example, it can also be used for debugging when building your host application by returning all data back to the host. | 24 | The `"raw_hid.h"` header also declares `void raw_hid_send(uint8_t *data, uint8_t length);` which allows sending packets from keyboard to host. As an example, it can also be used for debugging when building your host application by returning all data back to the host. |
25 | 25 | ||
26 | ```C | 26 | ```c |
27 | void raw_hid_receive(uint8_t *data, uint8_t length) { | 27 | void raw_hid_receive(uint8_t *data, uint8_t length) { |
28 | raw_hid_send(data, length); | 28 | raw_hid_send(data, length); |
29 | } | 29 | } |
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index fe72d063e..d3d740c1b 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md | |||
@@ -10,7 +10,7 @@ If you want to use single color LED's you should use the [LED Matrix Subsystem]( | |||
10 | 10 | ||
11 | There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`: | 11 | There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`: |
12 | 12 | ||
13 | ```makefile | 13 | ```make |
14 | RGB_MATRIX_ENABLE = yes | 14 | RGB_MATRIX_ENABLE = yes |
15 | RGB_MATRIX_DRIVER = IS31FL3731 | 15 | RGB_MATRIX_DRIVER = IS31FL3731 |
16 | ``` | 16 | ``` |
@@ -21,6 +21,7 @@ You can use between 1 and 4 IS31FL3731 IC's. Do not specify `DRIVER_ADDR_<N>` de | |||
21 | |----------|-------------|---------| | 21 | |----------|-------------|---------| |
22 | | `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 | | 22 | | `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 | |
23 | | `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | | 23 | | `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | |
24 | | `ISSI_3731_DEGHOST` | (Optional) Set this define to enable de-ghosting by halving Vcc during blanking time | | | ||
24 | | `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | | | 25 | | `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | | |
25 | | `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | | | 26 | | `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | | |
26 | | `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | | | 27 | | `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | | |
@@ -49,6 +50,8 @@ Here is an example using 2 drivers. | |||
49 | 50 | ||
50 | !> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`. | 51 | !> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`. |
51 | 52 | ||
53 | For split keyboards using `RGB_MATRIX_SPLIT` with an LED driver, you can either have the same driver address or different driver addresses. If using different addresses, use `DRIVER_ADDR_1` for one and `DRIVER_ADDR_2` for the other one. Then, in `g_is31_leds`, fill out the correct driver index (0 or 1). If using one address, use `DRIVER_ADDR_1` for both, and use index 0 for `g_is31_leds`. | ||
54 | |||
52 | Define these arrays listing all the LEDs in your `<keyboard>.c`: | 55 | Define these arrays listing all the LEDs in your `<keyboard>.c`: |
53 | 56 | ||
54 | ```c | 57 | ```c |
@@ -71,7 +74,7 @@ Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet] | |||
71 | 74 | ||
72 | There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`: | 75 | There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`: |
73 | 76 | ||
74 | ```makefile | 77 | ```make |
75 | RGB_MATRIX_ENABLE = yes | 78 | RGB_MATRIX_ENABLE = yes |
76 | RGB_MATRIX_DRIVER = IS31FL3733 | 79 | RGB_MATRIX_DRIVER = IS31FL3733 |
77 | ``` | 80 | ``` |
@@ -82,6 +85,9 @@ You can use between 1 and 4 IS31FL3733 IC's. Do not specify `DRIVER_ADDR_<N>` de | |||
82 | |----------|-------------|---------| | 85 | |----------|-------------|---------| |
83 | | `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 | | 86 | | `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 | |
84 | | `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | | 87 | | `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | |
88 | | `ISSI_PWM_FREQUENCY` | (Optional) PWM Frequency Setting - IS31FL3733B only | 0 | | ||
89 | | `ISSI_SWPULLUP` | (Optional) Set the value of the SWx lines on-chip de-ghosting resistors | PUR_0R (Disabled) | | ||
90 | | `ISSI_CSPULLUP` | (Optional) Set the value of the CSx lines on-chip de-ghosting resistors | PUR_0R (Disabled) | | ||
85 | | `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | | | 91 | | `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | | |
86 | | `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | | | 92 | | `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | | |
87 | | `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | | | 93 | | `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | | |
@@ -93,6 +99,18 @@ You can use between 1 and 4 IS31FL3733 IC's. Do not specify `DRIVER_ADDR_<N>` de | |||
93 | | `DRIVER_SYNC_3` | (Optional) Sync configuration for the third RGB driver | 0 | | 99 | | `DRIVER_SYNC_3` | (Optional) Sync configuration for the third RGB driver | 0 | |
94 | | `DRIVER_SYNC_4` | (Optional) Sync configuration for the fourth RGB driver | 0 | | 100 | | `DRIVER_SYNC_4` | (Optional) Sync configuration for the fourth RGB driver | 0 | |
95 | 101 | ||
102 | The IS31FL3733 IC's have on-chip resistors that can be enabled to allow for de-ghosting of the RGB matrix. By default these resistors are not enabled (`ISSI_SWPULLUP`/`ISSI_CSPULLUP` are given the value of`PUR_0R`), the values that can be set to enable de-ghosting are as follows: | ||
103 | |||
104 | | `ISSI_SWPULLUP/ISSI_CSPULLUP` | Description | | ||
105 | |----------------------|-------------| | ||
106 | | `PUR_0R` | (default) Do not use the on-chip resistors/enable de-ghosting | | ||
107 | | `PUR_05KR` | The 0.5k Ohm resistor used during blanking period (t_NOL) | | ||
108 | | `PUR_3KR` | The 3k Ohm resistor used at all times | | ||
109 | | `PUR_4KR` | The 4k Ohm resistor used at all times | | ||
110 | | `PUR_8KR` | The 8k Ohm resistor used at all times | | ||
111 | | `PUR_16KR` | The 16k Ohm resistor used at all times | | ||
112 | | `PUR_32KR` | The 32k Ohm resistor used during blanking period (t_NOL) | | ||
113 | |||
96 | Here is an example using 2 drivers. | 114 | Here is an example using 2 drivers. |
97 | 115 | ||
98 | ```c | 116 | ```c |
@@ -141,7 +159,7 @@ Where `X_Y` is the location of the LED in the matrix defined by [the datasheet]( | |||
141 | 159 | ||
142 | There is basic support for addressable RGB matrix lighting with the I2C IS31FL3737 RGB controller. To enable it, add this to your `rules.mk`: | 160 | There is basic support for addressable RGB matrix lighting with the I2C IS31FL3737 RGB controller. To enable it, add this to your `rules.mk`: |
143 | 161 | ||
144 | ```makefile | 162 | ```make |
145 | RGB_MATRIX_ENABLE = yes | 163 | RGB_MATRIX_ENABLE = yes |
146 | RGB_MATRIX_DRIVER = IS31FL3737 | 164 | RGB_MATRIX_DRIVER = IS31FL3737 |
147 | ``` | 165 | ``` |
@@ -153,11 +171,25 @@ Configure the hardware via your `config.h`: | |||
153 | |----------|-------------|---------| | 171 | |----------|-------------|---------| |
154 | | `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 | | 172 | | `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 | |
155 | | `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | | 173 | | `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | |
174 | | `ISSI_SWPULLUP` | (Optional) Set the value of the SWx lines on-chip de-ghosting resistors | PUR_0R (Disabled) | | ||
175 | | `ISSI_CSPULLUP` | (Optional) Set the value of the CSx lines on-chip de-ghosting resistors | PUR_0R (Disabled) | | ||
156 | | `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | | | 176 | | `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | | |
157 | | `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | | | 177 | | `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | | |
158 | | `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | | | 178 | | `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | | |
159 | | `DRIVER_ADDR_2` | (Optional) Address for the second RGB driver | | | 179 | | `DRIVER_ADDR_2` | (Optional) Address for the second RGB driver | | |
160 | 180 | ||
181 | The IS31FL3737 IC's have on-chip resistors that can be enabled to allow for de-ghosting of the RGB matrix. By default these resistors are not enabled (`ISSI_SWPULLUP`/`ISSI_CSPULLUP` are given the value of`PUR_0R`), the values that can be set to enable de-ghosting are as follows: | ||
182 | |||
183 | | `ISSI_SWPULLUP/ISSI_CSPULLUP` | Description | | ||
184 | |----------------------|-------------| | ||
185 | | `PUR_0R` | (default) Do not use the on-chip resistors/enable de-ghosting | | ||
186 | | `PUR_05KR` | The 0.5k Ohm resistor used during blanking period (t_NOL) | | ||
187 | | `PUR_1KR` | The 1k Ohm resistor used during blanking period (t_NOL) | | ||
188 | | `PUR_2KR` | The 2k Ohm resistor used during blanking period (t_NOL) | | ||
189 | | `PUR_4KR` | The 4k Ohm resistor used during blanking period (t_NOL) | | ||
190 | | `PUR_8KR` | The 8k Ohm resistor during blanking period (t_NOL) | | ||
191 | | `PUR_16KR` | The 16k Ohm resistor during blanking period (t_NOL) | | ||
192 | | `PUR_32KR` | The 32k Ohm resistor used during blanking period (t_NOL) | | ||
161 | 193 | ||
162 | Here is an example using 2 drivers. | 194 | Here is an example using 2 drivers. |
163 | 195 | ||
@@ -181,7 +213,7 @@ Here is an example using 2 drivers. | |||
181 | ``` | 213 | ``` |
182 | !> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`. | 214 | !> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`. |
183 | 215 | ||
184 | Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations. | 216 | Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations. |
185 | 217 | ||
186 | Define these arrays listing all the LEDs in your `<keyboard>.c`: | 218 | Define these arrays listing all the LEDs in your `<keyboard>.c`: |
187 | 219 | ||
@@ -206,7 +238,7 @@ Where `X_Y` is the location of the LED in the matrix defined by [the datasheet]( | |||
206 | 238 | ||
207 | There is basic support for addressable RGB matrix lighting with a WS2811/WS2812{a,b,c} addressable LED strand. To enable it, add this to your `rules.mk`: | 239 | There is basic support for addressable RGB matrix lighting with a WS2811/WS2812{a,b,c} addressable LED strand. To enable it, add this to your `rules.mk`: |
208 | 240 | ||
209 | ```makefile | 241 | ```make |
210 | RGB_MATRIX_ENABLE = yes | 242 | RGB_MATRIX_ENABLE = yes |
211 | RGB_MATRIX_DRIVER = WS2812 | 243 | RGB_MATRIX_DRIVER = WS2812 |
212 | ``` | 244 | ``` |
@@ -226,7 +258,7 @@ Configure the hardware via your `config.h`: | |||
226 | 258 | ||
227 | There is basic support for APA102 based addressable LED strands. To enable it, add this to your `rules.mk`: | 259 | There is basic support for APA102 based addressable LED strands. To enable it, add this to your `rules.mk`: |
228 | 260 | ||
229 | ```makefile | 261 | ```make |
230 | RGB_MATRIX_ENABLE = yes | 262 | RGB_MATRIX_ENABLE = yes |
231 | RGB_MATRIX_DRIVER = APA102 | 263 | RGB_MATRIX_DRIVER = APA102 |
232 | ``` | 264 | ``` |
@@ -246,7 +278,7 @@ Configure the hardware via your `config.h`: | |||
246 | ### AW20216 :id=aw20216 | 278 | ### AW20216 :id=aw20216 |
247 | There is basic support for addressable RGB matrix lighting with the SPI AW20216 RGB controller. To enable it, add this to your `rules.mk`: | 279 | There is basic support for addressable RGB matrix lighting with the SPI AW20216 RGB controller. To enable it, add this to your `rules.mk`: |
248 | 280 | ||
249 | ```makefile | 281 | ```make |
250 | RGB_MATRIX_ENABLE = yes | 282 | RGB_MATRIX_ENABLE = yes |
251 | RGB_MATRIX_DRIVER = AW20216 | 283 | RGB_MATRIX_DRIVER = AW20216 |
252 | ``` | 284 | ``` |
@@ -340,7 +372,7 @@ x = 224 / (NUMBER_OF_COLS - 1) * COL_POSITION | |||
340 | y = 64 / (NUMBER_OF_ROWS - 1) * ROW_POSITION | 372 | y = 64 / (NUMBER_OF_ROWS - 1) * ROW_POSITION |
341 | ``` | 373 | ``` |
342 | 374 | ||
343 | Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout. | 375 | Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout. |
344 | 376 | ||
345 | As mentioned earlier, the center of the keyboard by default is expected to be `{ 112, 32 }`, but this can be changed if you want to more accurately calculate the LED's physical `{ x, y }` positions. Keyboard designers can implement `#define RGB_MATRIX_CENTER { 112, 32 }` in their config.h file with the new center point of the keyboard, or where they want it to be allowing more possibilities for the `{ x, y }` values. Do note that the maximum value for x or y is 255, and the recommended maximum is 224 as this gives animations runoff room before they reset. | 377 | As mentioned earlier, the center of the keyboard by default is expected to be `{ 112, 32 }`, but this can be changed if you want to more accurately calculate the LED's physical `{ x, y }` positions. Keyboard designers can implement `#define RGB_MATRIX_CENTER { 112, 32 }` in their config.h file with the new center point of the keyboard, or where they want it to be allowing more possibilities for the `{ x, y }` values. Do note that the maximum value for x or y is 255, and the recommended maximum is 224 as this gives animations runoff room before they reset. |
346 | 378 | ||
@@ -383,7 +415,7 @@ All RGB keycodes are currently shared with the RGBLIGHT system: | |||
383 | 415 | ||
384 | * `RGB_MODE_*` keycodes will generally work, but not all of the modes are currently mapped to the correct effects for the RGB Matrix system. | 416 | * `RGB_MODE_*` keycodes will generally work, but not all of the modes are currently mapped to the correct effects for the RGB Matrix system. |
385 | 417 | ||
386 | `RGB_MODE_PLAIN`, `RGB_MODE_BREATHE`, `RGB_MODE_RAINBOW`, and `RGB_MATRIX_SWIRL` are the only ones that are mapped properly. The rest don't have a direct equivalent, and are not mapped. | 418 | `RGB_MODE_PLAIN`, `RGB_MODE_BREATHE`, `RGB_MODE_RAINBOW`, and `RGB_MATRIX_SWIRL` are the only ones that are mapped properly. The rest don't have a direct equivalent, and are not mapped. |
387 | 419 | ||
388 | !> By default, if you have both the [RGB Light](feature_rgblight.md) and the RGB Matrix feature enabled, these keycodes will work for both features, at the same time. You can disable the keycode functionality by defining the `*_DISABLE_KEYCODES` option for the specific feature. | 420 | !> By default, if you have both the [RGB Light](feature_rgblight.md) and the RGB Matrix feature enabled, these keycodes will work for both features, at the same time. You can disable the keycode functionality by defining the `*_DISABLE_KEYCODES` option for the specific feature. |
389 | 421 | ||
@@ -420,7 +452,9 @@ enum rgb_matrix_effects { | |||
420 | RGB_MATRIX_JELLYBEAN_RAINDROPS, // Randomly changes a single key's hue and saturation | 452 | RGB_MATRIX_JELLYBEAN_RAINDROPS, // Randomly changes a single key's hue and saturation |
421 | RGB_MATRIX_HUE_BREATHING, // Hue shifts up a slight ammount at the same time, then shifts back | 453 | RGB_MATRIX_HUE_BREATHING, // Hue shifts up a slight ammount at the same time, then shifts back |
422 | RGB_MATRIX_HUE_PENDULUM, // Hue shifts up a slight ammount in a wave to the right, then back to the left | 454 | RGB_MATRIX_HUE_PENDULUM, // Hue shifts up a slight ammount in a wave to the right, then back to the left |
423 | RGB_MATRIX_HUE_WAVE, // Hue shifts up a slight ammount and then back down in a wave to the right | 455 | RGB_MATRIX_HUE_WAVE, // Hue shifts up a slight ammount and then back down in a wave to the right |
456 | RGB_MATRIX_PIXEL_FRACTAL, // Single hue fractal filled keys pulsing horizontally out to edges | ||
457 | RGB_MATRIX_PIXEL_RAIN, // Randomly light keys with random hues | ||
424 | #if define(RGB_MATRIX_FRAMEBUFFER_EFFECTS) | 458 | #if define(RGB_MATRIX_FRAMEBUFFER_EFFECTS) |
425 | RGB_MATRIX_TYPING_HEATMAP, // How hot is your WPM! | 459 | RGB_MATRIX_TYPING_HEATMAP, // How hot is your WPM! |
426 | RGB_MATRIX_DIGITAL_RAIN, // That famous computer simulation | 460 | RGB_MATRIX_DIGITAL_RAIN, // That famous computer simulation |
@@ -443,51 +477,66 @@ enum rgb_matrix_effects { | |||
443 | }; | 477 | }; |
444 | ``` | 478 | ``` |
445 | 479 | ||
446 | You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `config.h`: | 480 | You can enable a single effect by defining `ENABLE_[EFFECT_NAME]` in your `config.h`: |
447 | 481 | ||
448 | 482 | ||
449 | |Define |Description | | 483 | |Define |Description | |
450 | |-------------------------------------------------------|-----------------------------------------------| | 484 | |------------------------------------------------------|----------------------------------------------| |
451 | |`#define DISABLE_RGB_MATRIX_ALPHAS_MODS` |Disables `RGB_MATRIX_ALPHAS_MODS` | | 485 | |`#define ENABLE_RGB_MATRIX_ALPHAS_MODS` |Enables `RGB_MATRIX_ALPHAS_MODS` | |
452 | |`#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN` |Disables `RGB_MATRIX_GRADIENT_UP_DOWN` | | 486 | |`#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN` |Enables `RGB_MATRIX_GRADIENT_UP_DOWN` | |
453 | |`#define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT` |Disables `MATRIX_GRADIENT_LEFT_RIGHT` | | 487 | |`#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT` |Enables `RGB_MATRIX_GRADIENT_LEFT_RIGHT` | |
454 | |`#define DISABLE_RGB_MATRIX_BREATHING` |Disables `RGB_MATRIX_BREATHING` | | 488 | |`#define ENABLE_RGB_MATRIX_BREATHING` |Enables `RGB_MATRIX_BREATHING` | |
455 | |`#define DISABLE_RGB_MATRIX_BAND_SAT` |Disables `RGB_MATRIX_BAND_SAT` | | 489 | |`#define ENABLE_RGB_MATRIX_BAND_SAT` |Enables `RGB_MATRIX_BAND_SAT` | |
456 | |`#define DISABLE_RGB_MATRIX_BAND_VAL` |Disables `RGB_MATRIX_BAND_VAL` | | 490 | |`#define ENABLE_RGB_MATRIX_BAND_VAL` |Enables `RGB_MATRIX_BAND_VAL` | |
457 | |`#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT` |Disables `RGB_MATRIX_BAND_PINWHEEL_SAT` | | 491 | |`#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT` |Enables `RGB_MATRIX_BAND_PINWHEEL_SAT` | |
458 | |`#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL` |Disables `RGB_MATRIX_BAND_PINWHEEL_VAL` | | 492 | |`#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL` |Enables `RGB_MATRIX_BAND_PINWHEEL_VAL` | |
459 | |`#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT` |Disables `RGB_MATRIX_BAND_SPIRAL_SAT` | | 493 | |`#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT` |Enables `RGB_MATRIX_BAND_SPIRAL_SAT` | |
460 | |`#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL` |Disables `RGB_MATRIX_BAND_SPIRAL_VAL` | | 494 | |`#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL` |Enables `RGB_MATRIX_BAND_SPIRAL_VAL` | |
461 | |`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` | | 495 | |`#define ENABLE_RGB_MATRIX_CYCLE_ALL` |Enables `RGB_MATRIX_CYCLE_ALL` | |
462 | |`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` | | 496 | |`#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Enables `RGB_MATRIX_CYCLE_LEFT_RIGHT` | |
463 | |`#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` | | 497 | |`#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Enables `RGB_MATRIX_CYCLE_UP_DOWN` | |
464 | |`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON` | | 498 | |`#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |Enables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON` | |
465 | |`#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN` |Disables `RGB_MATRIX_CYCLE_OUT_IN` | | 499 | |`#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN` |Enables `RGB_MATRIX_CYCLE_OUT_IN` | |
466 | |`#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL` |Disables `RGB_MATRIX_CYCLE_OUT_IN_DUAL` | | 500 | |`#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL` |Enables `RGB_MATRIX_CYCLE_OUT_IN_DUAL` | |
467 | |`#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL` |Disables `RGB_MATRIX_CYCLE_PINWHEEL` | | 501 | |`#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL` |Enables `RGB_MATRIX_CYCLE_PINWHEEL` | |
468 | |`#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL` |Disables `RGB_MATRIX_CYCLE_SPIRAL` | | 502 | |`#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL` |Enables `RGB_MATRIX_CYCLE_SPIRAL` | |
469 | |`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` | | 503 | |`#define ENABLE_RGB_MATRIX_DUAL_BEACON` |Enables `RGB_MATRIX_DUAL_BEACON` | |
470 | |`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` | | 504 | |`#define ENABLE_RGB_MATRIX_RAINBOW_BEACON` |Enables `RGB_MATRIX_RAINBOW_BEACON` | |
471 | |`#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Disables `RGB_MATRIX_RAINBOW_PINWHEELS` | | 505 | |`#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Enables `RGB_MATRIX_RAINBOW_PINWHEELS` | |
472 | |`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` | | 506 | |`#define ENABLE_RGB_MATRIX_RAINDROPS` |Enables `RGB_MATRIX_RAINDROPS` | |
473 | |`#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Disables `RGB_MATRIX_JELLYBEAN_RAINDROPS` | | 507 | |`#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Enables `RGB_MATRIX_JELLYBEAN_RAINDROPS` | |
474 | |`#define DISABLE_RGB_MATRIX_HUE_BREATHING` |Disables `RGB_MATRIX_HUE_BREATHING` | | 508 | |`#define ENABLE_RGB_MATRIX_HUE_BREATHING` |Enables `RGB_MATRIX_HUE_BREATHING` | |
475 | |`#define DISABLE_RGB_MATRIX_HUE_PENDULUM` |Disables `RGB_MATRIX_HUE_PENDULUM` | | 509 | |`#define ENABLE_RGB_MATRIX_HUE_PENDULUM` |Enables `RGB_MATRIX_HUE_PENDULUM` | |
476 | |`#define DISABLE_RGB_MATRIX_HUE_WAVE ` |Disables `RGB_MATRIX_HUE_WAVE ` | | 510 | |`#define ENABLE_RGB_MATRIX_HUE_WAVE` |Enables `RGB_MATRIX_HUE_WAVE ` | |
477 | |`#define DISABLE_RGB_MATRIX_TYPING_HEATMAP` |Disables `RGB_MATRIX_TYPING_HEATMAP` | | 511 | |`#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL` |Enables `RGB_MATRIX_PIXEL_FRACTAL` | |
478 | |`#define DISABLE_RGB_MATRIX_DIGITAL_RAIN` |Disables `RGB_MATRIX_DIGITAL_RAIN` | | 512 | |`#define ENABLE_RGB_MATRIX_PIXEL_RAIN` |Enables `RGB_MATRIX_PIXEL_RAIN` | |
479 | |`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |Disables `RGB_MATRIX_SOLID_REACTIVE_SIMPLE` | | 513 | |
480 | |`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE` |Disables `RGB_MATRIX_SOLID_REACTIVE` | | 514 | ?> These modes don't require any additional defines. |
481 | |`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE` |Disables `RGB_MATRIX_SOLID_REACTIVE_WIDE` | | 515 | |
482 | |`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE` |Disables `RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE` | | 516 | |Framebuffer Defines |Description | |
483 | |`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS` |Disables `RGB_MATRIX_SOLID_REACTIVE_CROSS` | | 517 | |------------------------------------------------------|----------------------------------------------| |
484 | |`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS` |Disables `RGB_MATRIX_SOLID_REACTIVE_MULTICROSS`| | 518 | |`#define ENABLE_RGB_MATRIX_TYPING_HEATMAP` |Enables `RGB_MATRIX_TYPING_HEATMAP` | |
485 | |`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS` |Disables `RGB_MATRIX_SOLID_REACTIVE_NEXUS` | | 519 | |`#define ENABLE_RGB_MATRIX_DIGITAL_RAIN` |Enables `RGB_MATRIX_DIGITAL_RAIN` | |
486 | |`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS` |Disables `RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS`| | 520 | |
487 | |`#define DISABLE_RGB_MATRIX_SPLASH` |Disables `RGB_MATRIX_SPLASH` | | 521 | ?> These modes also require the `RGB_MATRIX_FRAMEBUFFER_EFFECTS` define to be available. |
488 | |`#define DISABLE_RGB_MATRIX_MULTISPLASH` |Disables `RGB_MATRIX_MULTISPLASH` | | 522 | |
489 | |`#define DISABLE_RGB_MATRIX_SOLID_SPLASH` |Disables `RGB_MATRIX_SOLID_SPLASH` | | 523 | |Reactive Defines |Description | |
490 | |`#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH` |Disables `RGB_MATRIX_SOLID_MULTISPLASH` | | 524 | |------------------------------------------------------|----------------------------------------------| |
525 | |`#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |Enables `RGB_MATRIX_SOLID_REACTIVE_SIMPLE` | | ||
526 | |`#define ENABLE_RGB_MATRIX_SOLID_REACTIVE` |Enables `RGB_MATRIX_SOLID_REACTIVE` | | ||
527 | |`#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE` |Enables `RGB_MATRIX_SOLID_REACTIVE_WIDE` | | ||
528 | |`#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE` |Enables `RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE` | | ||
529 | |`#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS` |Enables `RGB_MATRIX_SOLID_REACTIVE_CROSS` | | ||
530 | |`#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS` |Enables `RGB_MATRIX_SOLID_REACTIVE_MULTICROSS`| | ||
531 | |`#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS` |Enables `RGB_MATRIX_SOLID_REACTIVE_NEXUS` | | ||
532 | |`#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS` |Enables `RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS`| | ||
533 | |`#define ENABLE_RGB_MATRIX_SPLASH` |Enables `RGB_MATRIX_SPLASH` | | ||
534 | |`#define ENABLE_RGB_MATRIX_MULTISPLASH` |Enables `RGB_MATRIX_MULTISPLASH` | | ||
535 | |`#define ENABLE_RGB_MATRIX_SOLID_SPLASH` |Enables `RGB_MATRIX_SOLID_SPLASH` | | ||
536 | |`#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH` |Enables `RGB_MATRIX_SOLID_MULTISPLASH` | | ||
537 | |||
538 | ?> These modes also require the `RGB_MATRIX_KEYPRESSES` or `RGB_MATRIX_KEYRELEASES` define to be available. | ||
539 | |||
491 | 540 | ||
492 | ### RGB Matrix Effect Typing Heatmap :id=rgb-matrix-effect-typing-heatmap | 541 | ### RGB Matrix Effect Typing Heatmap :id=rgb-matrix-effect-typing-heatmap |
493 | 542 | ||
@@ -537,7 +586,7 @@ static bool my_cool_effect(effect_params_t* params) { | |||
537 | for (uint8_t i = led_min; i < led_max; i++) { | 586 | for (uint8_t i = led_min; i < led_max; i++) { |
538 | rgb_matrix_set_color(i, 0xff, 0xff, 0x00); | 587 | rgb_matrix_set_color(i, 0xff, 0xff, 0x00); |
539 | } | 588 | } |
540 | return led_max < DRIVER_LED_TOTAL; | 589 | return rgb_matrix_check_finished_leds(led_max); |
541 | } | 590 | } |
542 | 591 | ||
543 | // e.g: A more complex effect, relying on external methods and state, with | 592 | // e.g: A more complex effect, relying on external methods and state, with |
@@ -551,8 +600,7 @@ static bool my_cool_effect2_complex_run(effect_params_t* params) { | |||
551 | for (uint8_t i = led_min; i < led_max; i++) { | 600 | for (uint8_t i = led_min; i < led_max; i++) { |
552 | rgb_matrix_set_color(i, 0xff, some_global_state++, 0xff); | 601 | rgb_matrix_set_color(i, 0xff, some_global_state++, 0xff); |
553 | } | 602 | } |
554 | 603 | return rgb_matrix_check_finished_leds(led_max); | |
555 | return led_max < DRIVER_LED_TOTAL; | ||
556 | } | 604 | } |
557 | static bool my_cool_effect2(effect_params_t* params) { | 605 | static bool my_cool_effect2(effect_params_t* params) { |
558 | if (params->init) my_cool_effect2_complex_init(params); | 606 | if (params->init) my_cool_effect2_complex_init(params); |
@@ -694,7 +742,7 @@ Where `28` is an unused index from `eeconfig.h`. | |||
694 | 742 | ||
695 | ### Indicators :id=indicators | 743 | ### Indicators :id=indicators |
696 | 744 | ||
697 | If you want to set custom indicators, such as an LED for Caps Lock, or layer indication, you can use the `rgb_matrix_indicators_kb` or `rgb_matrix_indicators_user` function for that: | 745 | If you want to set custom indicators, such as an LED for Caps Lock, or layer indication, you can use the `rgb_matrix_indicators_kb` or `rgb_matrix_indicators_user` function for that: |
698 | ```c | 746 | ```c |
699 | void rgb_matrix_indicators_kb(void) { | 747 | void rgb_matrix_indicators_kb(void) { |
700 | rgb_matrix_set_color(index, red, green, blue); | 748 | rgb_matrix_set_color(index, red, green, blue); |
@@ -749,18 +797,18 @@ This example sets the modifiers to be a specific color based on the layer state. | |||
749 | ```c | 797 | ```c |
750 | void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { | 798 | void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { |
751 | HSV hsv = {0, 255, 255}; | 799 | HSV hsv = {0, 255, 255}; |
752 | 800 | ||
753 | if (layer_state_is(layer_state, 2)) { | 801 | if (layer_state_is(layer_state, 2)) { |
754 | hsv = {130, 255, 255}; | 802 | hsv = {130, 255, 255}; |
755 | } else { | 803 | } else { |
756 | hsv = {30, 255, 255}; | 804 | hsv = {30, 255, 255}; |
757 | } | 805 | } |
758 | 806 | ||
759 | if (hsv.v > rgb_matrix_get_val()) { | 807 | if (hsv.v > rgb_matrix_get_val()) { |
760 | hsv.v = rgb_matrix_get_val(); | 808 | hsv.v = rgb_matrix_get_val(); |
761 | } | 809 | } |
762 | RGB rgb = hsv_to_rgb(hsv); | 810 | RGB rgb = hsv_to_rgb(hsv); |
763 | 811 | ||
764 | for (uint8_t i = led_min; i <= led_max; i++) { | 812 | for (uint8_t i = led_min; i <= led_max; i++) { |
765 | if (HAS_FLAGS(g_led_config.flags[i], 0x01)) { // 0x01 == LED_FLAG_MODIFIER | 813 | if (HAS_FLAGS(g_led_config.flags[i], 0x01)) { // 0x01 == LED_FLAG_MODIFIER |
766 | rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); | 814 | rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); |
@@ -769,7 +817,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { | |||
769 | } | 817 | } |
770 | ``` | 818 | ``` |
771 | 819 | ||
772 | If you want to indicate a Host LED status (caps lock, num lock, etc), you can use something like this to light up the caps lock key: | 820 | If you want to indicate a Host LED status (caps lock, num lock, etc), you can use something like this to light up the caps lock key: |
773 | 821 | ||
774 | ```c | 822 | ```c |
775 | void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { | 823 | void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { |
diff --git a/docs/feature_stenography.md b/docs/feature_stenography.md index d5445b7f8..691d83f97 100644 --- a/docs/feature_stenography.md +++ b/docs/feature_stenography.md | |||
@@ -32,7 +32,7 @@ GeminiPR encodes 42 keys into a 6-byte packet. While TX Bolt contains everything | |||
32 | 32 | ||
33 | Firstly, enable steno in your keymap's Makefile. You may also need disable mousekeys, extra keys, or another USB endpoint to prevent conflicts. The builtin USB stack for some processors only supports a certain number of USB endpoints and the virtual serial port needed for steno fills 3 of them. | 33 | Firstly, enable steno in your keymap's Makefile. You may also need disable mousekeys, extra keys, or another USB endpoint to prevent conflicts. The builtin USB stack for some processors only supports a certain number of USB endpoints and the virtual serial port needed for steno fills 3 of them. |
34 | 34 | ||
35 | ```makefile | 35 | ```make |
36 | STENO_ENABLE = yes | 36 | STENO_ENABLE = yes |
37 | MOUSEKEY_ENABLE = no | 37 | MOUSEKEY_ENABLE = no |
38 | ``` | 38 | ``` |
diff --git a/docs/feature_swap_hands.md b/docs/feature_swap_hands.md index cbc574b6b..b0239bb80 100644 --- a/docs/feature_swap_hands.md +++ b/docs/feature_swap_hands.md | |||
@@ -6,7 +6,7 @@ The swap-hands action allows support for one-handed typing without requiring a s | |||
6 | 6 | ||
7 | The configuration table is a simple 2-dimensional array to map from column/row to new column/row. Example `hand_swap_config` for Planck: | 7 | The configuration table is a simple 2-dimensional array to map from column/row to new column/row. Example `hand_swap_config` for Planck: |
8 | 8 | ||
9 | ```C | 9 | ```c |
10 | const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { | 10 | const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { |
11 | {{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, | 11 | {{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, |
12 | {{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, | 12 | {{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, |
diff --git a/docs/feature_tap_dance.md b/docs/feature_tap_dance.md index d1988b9b7..40f9802db 100644 --- a/docs/feature_tap_dance.md +++ b/docs/feature_tap_dance.md | |||
@@ -299,7 +299,7 @@ void x_finished(qk_tap_dance_state_t *state, void *user_data) { | |||
299 | xtap_state.state = cur_dance(state); | 299 | xtap_state.state = cur_dance(state); |
300 | switch (xtap_state.state) { | 300 | switch (xtap_state.state) { |
301 | case TD_SINGLE_TAP: register_code(KC_X); break; | 301 | case TD_SINGLE_TAP: register_code(KC_X); break; |
302 | case TD_SINGLE_HOLD: register_code(KC_LCTRL); break; | 302 | case TD_SINGLE_HOLD: register_code(KC_LCTL); break; |
303 | case TD_DOUBLE_TAP: register_code(KC_ESC); break; | 303 | case TD_DOUBLE_TAP: register_code(KC_ESC); break; |
304 | case TD_DOUBLE_HOLD: register_code(KC_LALT); break; | 304 | case TD_DOUBLE_HOLD: register_code(KC_LALT); break; |
305 | // Last case is for fast typing. Assuming your key is `f`: | 305 | // Last case is for fast typing. Assuming your key is `f`: |
@@ -312,7 +312,7 @@ void x_finished(qk_tap_dance_state_t *state, void *user_data) { | |||
312 | void x_reset(qk_tap_dance_state_t *state, void *user_data) { | 312 | void x_reset(qk_tap_dance_state_t *state, void *user_data) { |
313 | switch (xtap_state.state) { | 313 | switch (xtap_state.state) { |
314 | case TD_SINGLE_TAP: unregister_code(KC_X); break; | 314 | case TD_SINGLE_TAP: unregister_code(KC_X); break; |
315 | case TD_SINGLE_HOLD: unregister_code(KC_LCTRL); break; | 315 | case TD_SINGLE_HOLD: unregister_code(KC_LCTL); break; |
316 | case TD_DOUBLE_TAP: unregister_code(KC_ESC); break; | 316 | case TD_DOUBLE_TAP: unregister_code(KC_ESC); break; |
317 | case TD_DOUBLE_HOLD: unregister_code(KC_LALT); | 317 | case TD_DOUBLE_HOLD: unregister_code(KC_LALT); |
318 | case TD_DOUBLE_SINGLE_TAP: unregister_code(KC_X); | 318 | case TD_DOUBLE_SINGLE_TAP: unregister_code(KC_X); |
diff --git a/docs/feature_userspace.md b/docs/feature_userspace.md index 8b001e3ce..8c617fe33 100644 --- a/docs/feature_userspace.md +++ b/docs/feature_userspace.md | |||
@@ -240,7 +240,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
240 | 240 | ||
241 | For boards that may not have a shift button (such as on a macro pad), we need a way to always include the bootloader option. To do that, add the following to the `rules.mk` in your userspace folder: | 241 | For boards that may not have a shift button (such as on a macro pad), we need a way to always include the bootloader option. To do that, add the following to the `rules.mk` in your userspace folder: |
242 | 242 | ||
243 | ```make | 243 | ```make |
244 | ifeq ($(strip $(FLASH_BOOTLOADER)), yes) | 244 | ifeq ($(strip $(FLASH_BOOTLOADER)), yes) |
245 | OPT_DEFS += -DFLASH_BOOTLOADER | 245 | OPT_DEFS += -DFLASH_BOOTLOADER |
246 | endif | 246 | endif |
@@ -252,4 +252,4 @@ Also, holding Shift will add the flash target (`:flash`) to the command. Holdin | |||
252 | 252 | ||
253 | And for the boards that lack a shift key, or that you want to always attempt the flashing part, you can add `FLASH_BOOTLOADER = yes` to the `rules.mk` of that keymap. | 253 | And for the boards that lack a shift key, or that you want to always attempt the flashing part, you can add `FLASH_BOOTLOADER = yes` to the `rules.mk` of that keymap. |
254 | 254 | ||
255 | ?> This should flash the newly compiled firmware automatically, using the correct utility, based on the bootloader settings (or default to just generating the HEX file). However, it should be noted that this may not work on all systems. AVRDUDE doesn't work on WSL, namely. And this doesn't support BootloadHID or mdloader. | 255 | ?> This should flash the newly compiled firmware automatically, using the correct utility, based on the bootloader settings (or default to just generating the HEX file). However, it should be noted that this may not work on all systems. AVRDUDE doesn't work on WSL, namely. |
diff --git a/docs/feature_velocikey.md b/docs/feature_velocikey.md index 93dd7de94..14d4be314 100644 --- a/docs/feature_velocikey.md +++ b/docs/feature_velocikey.md | |||
@@ -6,7 +6,6 @@ Velocikey is a feature that lets you control the speed of lighting effects (like | |||
6 | For Velocikey to take effect, there are two steps. First, when compiling your keyboard, you'll need to set `VELOCIKEY_ENABLE=yes` in `rules.mk`, e.g.: | 6 | For Velocikey to take effect, there are two steps. First, when compiling your keyboard, you'll need to set `VELOCIKEY_ENABLE=yes` in `rules.mk`, e.g.: |
7 | 7 | ||
8 | ``` | 8 | ``` |
9 | BOOTMAGIC_ENABLE = no | ||
10 | MOUSEKEY_ENABLE = no | 9 | MOUSEKEY_ENABLE = no |
11 | STENO_ENABLE = no | 10 | STENO_ENABLE = no |
12 | EXTRAKEY_ENABLE = yes | 11 | EXTRAKEY_ENABLE = yes |
diff --git a/docs/feature_wpm.md b/docs/feature_wpm.md index e2fac1ece..87145c97e 100644 --- a/docs/feature_wpm.md +++ b/docs/feature_wpm.md | |||
@@ -10,11 +10,23 @@ For split keyboards using soft serial, the computed WPM score will be available | |||
10 | 10 | ||
11 | ## Configuration | 11 | ## Configuration |
12 | 12 | ||
13 | |Define |Default | Description | | 13 | | Define | Default | Description | |
14 | |-----------------------------|--------------|------------------------------------------------------------------------------------------| | 14 | |------------------------------|---------------|------------------------------------------------------------------------------------------| |
15 | |`WPM_SMOOTHING` |`0.0487` | Sets the smoothing to about 40 keystrokes | | 15 | | `WPM_ESTIMATED_WORD_SIZE` | `5` | This is the value used when estimating average word size (for regression and normal use) | |
16 | |`WPM_ESTIMATED_WORD_SIZE` |`5` | This is the value used when estimating average word size (for regression and normal use) | | 16 | | `WPM_ALLOW_COUNT_REGRESSION` | _Not defined_ | If defined allows the WPM to be decreased when hitting Delete or Backspace | |
17 | |`WPM_ALLOW_COUNT_REGRESSOIN` |_Not defined_ | If defined allows the WPM to be decreased when hitting Delete or Backspace | | 17 | | `WPM_UNFILTERED` | _Not defined_ | If undefined (the default), WPM values will be smoothed to avoid sudden changes in value | |
18 | | `WPM_SAMPLE_SECONDS` | `5` | This defines how many seconds of typing to average, when calculating WPM | | ||
19 | | `WPM_SAMPLE_PERIODS` | `50` | This defines how many sampling periods to use when calculating WPM | | ||
20 | | `WPM_LAUNCH_CONTROL` | _Not defined_ | If defined, WPM values will be calculated using partial buffers when typing begins | | ||
21 | |||
22 | 'WPM_UNFILTERED' is potentially useful if you're filtering data in some other way (and also because it reduces the code required for the WPM feature), or if reducing measurement latency to a minimum is important for you. | ||
23 | |||
24 | Increasing 'WPM_SAMPLE_SECONDS' will give more smoothly changing WPM values at the expense of slightly more latency to the WPM calculation. | ||
25 | |||
26 | Increasing 'WPM_SAMPLE_PERIODS' will improve the smoothness at which WPM decays once typing stops, at a cost of approximately this many bytes of firmware space. | ||
27 | |||
28 | If 'WPM_LAUNCH_CONTROL' is defined, whenever WPM drops to zero, the next time typing begins WPM will be calculated based only on the time since that typing began, instead of the whole period of time specified by WPM_SAMPLE_SECONDS. This results in reaching an accurate WPM value much faster, even when filtering is enabled and a large WPM_SAMPLE_SECONDS value is specified. | ||
29 | |||
18 | ## Public Functions | 30 | ## Public Functions |
19 | 31 | ||
20 | |Function |Description | | 32 | |Function |Description | |
@@ -35,7 +47,7 @@ bool wpm_keycode_user(uint16_t keycode) { | |||
35 | } else if (keycode > 0xFF) { | 47 | } else if (keycode > 0xFF) { |
36 | keycode = 0; | 48 | keycode = 0; |
37 | } | 49 | } |
38 | if ((keycode >= KC_A && keycode <= KC_0) || (keycode >= KC_TAB && keycode <= KC_SLASH)) { | 50 | if ((keycode >= KC_A && keycode <= KC_0) || (keycode >= KC_TAB && keycode <= KC_SLSH)) { |
39 | return true; | 51 | return true; |
40 | } | 52 | } |
41 | 53 | ||
diff --git a/docs/flashing_bootloadhid.md b/docs/flashing_bootloadhid.md index 9879ec999..213c7c132 100644 --- a/docs/flashing_bootloadhid.md +++ b/docs/flashing_bootloadhid.md | |||
@@ -44,7 +44,7 @@ For native Windows flashing, the `bootloadHID.exe` can be used outside of the MS | |||
44 | 44 | ||
45 | ### Linux Manual Installation | 45 | ### Linux Manual Installation |
46 | 1. Install libusb development dependency: | 46 | 1. Install libusb development dependency: |
47 | ```bash | 47 | ``` |
48 | # This depends on OS - for Debian the following works | 48 | # This depends on OS - for Debian the following works |
49 | sudo apt-get install libusb-dev | 49 | sudo apt-get install libusb-dev |
50 | ``` | 50 | ``` |
diff --git a/docs/fr-fr/cli.md b/docs/fr-fr/cli.md index bfa060f2a..917a9315b 100644 --- a/docs/fr-fr/cli.md +++ b/docs/fr-fr/cli.md | |||
@@ -48,25 +48,6 @@ Nous recherchons des gens pour créer et maintenir un paquet `qmk` pour plus de | |||
48 | * Installez en utilisant un virtualenv | 48 | * Installez en utilisant un virtualenv |
49 | * Expliquez à l'utilisateur de définir la variable d'environnement `QMK_Home` pour "check out" les sources du firmware à un autre endroit que `~/qmk_firmware`. | 49 | * Expliquez à l'utilisateur de définir la variable d'environnement `QMK_Home` pour "check out" les sources du firmware à un autre endroit que `~/qmk_firmware`. |
50 | 50 | ||
51 | # CLI locale | ||
52 | |||
53 | Si vous ne voulez pas utiliser la CLI globale, il y a une CLI locale empaquetée avec `qmk_firmware`. Vous pouvez le trouver dans `qmk_firmware/bin/qmk`. Vous pouvez lancer la commande `qmk` depuis n'importe quel répertoire et elle fonctionnera toujours sur cette copie de `qmk_firmware`. | ||
54 | |||
55 | **Exemple**: | ||
56 | |||
57 | ``` | ||
58 | $ ~/qmk_firmware/bin/qmk hello | ||
59 | Ψ Hello, World! | ||
60 | ``` | ||
61 | |||
62 | ## Limitations de la CLI locale | ||
63 | |||
64 | Il y a quelques limitations à la CLI locale comparé à la globale: | ||
65 | |||
66 | * La CLI locale ne supporte pas `qmk setup` ou `qmk clone` | ||
67 | * La CLI locale n'opère pas sur le même arbre `qmk_firmware`, même si vous avez plusieurs dépôts clonés. | ||
68 | * La CLI locale ne s'exécute pas dans un virtualenv, donc il y a des risques que des dépendances seront en conflit | ||
69 | |||
70 | # Les commandes CLI | 51 | # Les commandes CLI |
71 | 52 | ||
72 | ## `qmk compile` | 53 | ## `qmk compile` |
diff --git a/docs/fr-fr/faq_debug.md b/docs/fr-fr/faq_debug.md index 3b13b96b5..8868744f7 100644 --- a/docs/fr-fr/faq_debug.md +++ b/docs/fr-fr/faq_debug.md | |||
@@ -85,10 +85,6 @@ Premièrement, vous devez compiler le firmware avec l'option de compilation `NKR | |||
85 | 85 | ||
86 | Essayez la commande `Magic` **N** (`LShift+RShift+N` par défaut) si **NKRO** ne fonctionne toujours pas. Vous pouvez utiliser cette commande pour basculer temporairement entre le mode **NKRO** et **6KRO**. Sous certaines conditions, **NKRO** ne fonctionnera pas et vous devrez basculer en **6KRO**, en particulier lorsque vous êtes dans le BIOS. | 86 | Essayez la commande `Magic` **N** (`LShift+RShift+N` par défaut) si **NKRO** ne fonctionne toujours pas. Vous pouvez utiliser cette commande pour basculer temporairement entre le mode **NKRO** et **6KRO**. Sous certaines conditions, **NKRO** ne fonctionnera pas et vous devrez basculer en **6KRO**, en particulier lorsque vous êtes dans le BIOS. |
87 | 87 | ||
88 | Si votre firmware est compilé avec `BOOTMAGIC_ENABLE` vous devrez l'activer avec la commande `BootMagic` **N** (`Espace+N` par défaut). Cette option est enregistrée dans l'EEPROM et sera gardé entre deux cycles de démarrage. | ||
89 | |||
90 | https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch | ||
91 | |||
92 | ## Le TrackPoint a besoin Circuit de réinitialisation (Support de souris PS/2) | 88 | ## Le TrackPoint a besoin Circuit de réinitialisation (Support de souris PS/2) |
93 | 89 | ||
94 | Sans circuit de réinitialisation vous allez avoir des résultats inconsistants à cause de la mauvaise initialisation du matériel. Regardez le schéma du circuit du TPM754. | 90 | Sans circuit de réinitialisation vous allez avoir des résultats inconsistants à cause de la mauvaise initialisation du matériel. Regardez le schéma du circuit du TPM754. |
diff --git a/docs/fr-fr/getting_started_github.md b/docs/fr-fr/getting_started_github.md index 0f3982ea2..522b09a03 100644 --- a/docs/fr-fr/getting_started_github.md +++ b/docs/fr-fr/getting_started_github.md | |||
@@ -32,7 +32,6 @@ Submodule path 'lib/chibios': checked out '587968d6cbc2b0e1c7147540872f2a67e59ca | |||
32 | Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' | 32 | Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' |
33 | Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' | 33 | Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' |
34 | Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' | 34 | Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' |
35 | Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2' | ||
36 | ``` | 35 | ``` |
37 | 36 | ||
38 | Vous avez maintenant votre fork QMK sur votre machine locale, vous pouvez ajouter votre keymap, la compiler et la flasher sur votre board. Une fois heureux avec vos changements, vous pouvez les ajouter, commit, et pousser vers votre fork comme suit: | 37 | Vous avez maintenant votre fork QMK sur votre machine locale, vous pouvez ajouter votre keymap, la compiler et la flasher sur votre board. Une fois heureux avec vos changements, vous pouvez les ajouter, commit, et pousser vers votre fork comme suit: |
diff --git a/docs/getting_started_docker.md b/docs/getting_started_docker.md index f9c3b366a..c4da8af96 100644 --- a/docs/getting_started_docker.md +++ b/docs/getting_started_docker.md | |||
@@ -12,13 +12,13 @@ The main prerequisite is a working `docker` or `podman` install. | |||
12 | 12 | ||
13 | Acquire a local copy of the QMK's repository (including submodules): | 13 | Acquire a local copy of the QMK's repository (including submodules): |
14 | 14 | ||
15 | ```bash | 15 | ``` |
16 | git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git | 16 | git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git |
17 | cd qmk_firmware | 17 | cd qmk_firmware |
18 | ``` | 18 | ``` |
19 | 19 | ||
20 | Run the following command to build a keymap: | 20 | Run the following command to build a keymap: |
21 | ```bash | 21 | ``` |
22 | util/docker_build.sh <keyboard>:<keymap> | 22 | util/docker_build.sh <keyboard>:<keymap> |
23 | # For example: util/docker_build.sh planck/rev6:default | 23 | # For example: util/docker_build.sh planck/rev6:default |
24 | ``` | 24 | ``` |
@@ -27,14 +27,14 @@ This will compile the desired keyboard/keymap and leave the resulting `.hex` or | |||
27 | 27 | ||
28 | There is also support for building _and_ flashing the keyboard straight from Docker by specifying the `target` as well: | 28 | There is also support for building _and_ flashing the keyboard straight from Docker by specifying the `target` as well: |
29 | 29 | ||
30 | ```bash | 30 | ``` |
31 | util/docker_build.sh keyboard:keymap:target | 31 | util/docker_build.sh keyboard:keymap:target |
32 | # For example: util/docker_build.sh planck/rev6:default:flash | 32 | # For example: util/docker_build.sh planck/rev6:default:flash |
33 | ``` | 33 | ``` |
34 | 34 | ||
35 | You can also start the script without any parameters, in which case it will ask you to input the build parameters one by one, which you may find easier to use: | 35 | You can also start the script without any parameters, in which case it will ask you to input the build parameters one by one, which you may find easier to use: |
36 | 36 | ||
37 | ```bash | 37 | ``` |
38 | util/docker_build.sh | 38 | util/docker_build.sh |
39 | # Reads parameters as input (leave blank for all keyboards/keymaps) | 39 | # Reads parameters as input (leave blank for all keyboards/keymaps) |
40 | ``` | 40 | ``` |
@@ -42,7 +42,7 @@ util/docker_build.sh | |||
42 | You can manually set which container runtime you want to use by setting the `RUNTIME` environment variable to it's name or path. | 42 | You can manually set which container runtime you want to use by setting the `RUNTIME` environment variable to it's name or path. |
43 | By default docker or podman are automatically detected and docker is preferred over podman. | 43 | By default docker or podman are automatically detected and docker is preferred over podman. |
44 | 44 | ||
45 | ```bash | 45 | ``` |
46 | RUNTIME="podman" util/docker_build.sh keyboard:keymap:target | 46 | RUNTIME="podman" util/docker_build.sh keyboard:keymap:target |
47 | ``` | 47 | ``` |
48 | 48 | ||
diff --git a/docs/getting_started_github.md b/docs/getting_started_github.md index e3720b886..9232bc622 100644 --- a/docs/getting_started_github.md +++ b/docs/getting_started_github.md | |||
@@ -32,7 +32,6 @@ Submodule path 'lib/chibios': checked out '587968d6cbc2b0e1c7147540872f2a67e59ca | |||
32 | Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' | 32 | Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' |
33 | Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' | 33 | Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' |
34 | Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' | 34 | Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' |
35 | Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2' | ||
36 | ``` | 35 | ``` |
37 | 36 | ||
38 | You now have your QMK fork on your local machine, and you can add your keymap, compile it and flash it to your board. Once you're happy with your changes, you can add, commit, and push them to your fork like this: | 37 | You now have your QMK fork on your local machine, and you can add your keymap, compile it and flash it to your board. Once you're happy with your changes, you can add, commit, and push them to your fork like this: |
diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md index 70390a510..1a7e27609 100644 --- a/docs/getting_started_make_guide.md +++ b/docs/getting_started_make_guide.md | |||
@@ -55,7 +55,7 @@ Set these variables to `no` to disable them, and `yes` to enable them. | |||
55 | 55 | ||
56 | `BOOTMAGIC_ENABLE` | 56 | `BOOTMAGIC_ENABLE` |
57 | 57 | ||
58 | This allows you to hold a key and the salt key (space by default) and have access to a various EEPROM settings that persist over power loss. It's advised you keep this disabled, as the settings are often changed by accident, and produce confusing results that makes it difficult to debug. It's one of the more common problems encountered in help sessions. | 58 | This allows you to hold a key (usually Escape by default) to reset the EEPROM settings that persist over power loss and ready your keyboard to accept new firmware. |
59 | 59 | ||
60 | `MOUSEKEY_ENABLE` | 60 | `MOUSEKEY_ENABLE` |
61 | 61 | ||
@@ -125,10 +125,6 @@ This allows you output audio on the C6 pin (needs abstracting). See the [audio p | |||
125 | 125 | ||
126 | Use this to debug changes to variable values, see the [tracing variables](unit_testing.md#tracing-variables) section of the Unit Testing page for more information. | 126 | Use this to debug changes to variable values, see the [tracing variables](unit_testing.md#tracing-variables) section of the Unit Testing page for more information. |
127 | 127 | ||
128 | `API_SYSEX_ENABLE` | ||
129 | |||
130 | This enables using the Quantum SYSEX API to send strings (somewhere?) | ||
131 | |||
132 | `KEY_LOCK_ENABLE` | 128 | `KEY_LOCK_ENABLE` |
133 | 129 | ||
134 | This enables [key lock](feature_key_lock.md). | 130 | This enables [key lock](feature_key_lock.md). |
@@ -149,6 +145,10 @@ Lets you replace the default matrix scanning routine with your own code. For fur | |||
149 | 145 | ||
150 | Lets you replace the default key debouncing routine with an alternative one. If `custom` you will need to provide your own implementation. | 146 | Lets you replace the default key debouncing routine with an alternative one. If `custom` you will need to provide your own implementation. |
151 | 147 | ||
148 | `DEFERRED_EXEC_ENABLE` | ||
149 | |||
150 | Enables deferred executor support -- timed delays before callbacks are invoked. See [deferred execution](custom_quantum_functions.md#deferred-execution) for more information. | ||
151 | |||
152 | ## Customizing Makefile Options on a Per-Keymap Basis | 152 | ## Customizing Makefile Options on a Per-Keymap Basis |
153 | 153 | ||
154 | If your keymap directory has a file called `rules.mk` any options you set in that file will take precedence over other `rules.mk` options for your particular keyboard. | 154 | If your keymap directory has a file called `rules.mk` any options you set in that file will take precedence over other `rules.mk` options for your particular keyboard. |
diff --git a/docs/getting_started_vagrant.md b/docs/getting_started_vagrant.md index 114f87567..b5b5ce153 100644 --- a/docs/getting_started_vagrant.md +++ b/docs/getting_started_vagrant.md | |||
@@ -31,26 +31,26 @@ The development environment is configured to run the QMK Docker image, `qmkfm/qm | |||
31 | ### Why am I seeing issues under Virtualbox? | 31 | ### Why am I seeing issues under Virtualbox? |
32 | Certain versions of Virtualbox 5 appear to have an incompatibility with the Virtualbox extensions installed in the boxes in this Vagrantfile. If you encounter any issues with the /vagrant mount not succeeding, please upgrade your version of Virtualbox to at least 5.0.12. **Alternately, you can try running the following command:** | 32 | Certain versions of Virtualbox 5 appear to have an incompatibility with the Virtualbox extensions installed in the boxes in this Vagrantfile. If you encounter any issues with the /vagrant mount not succeeding, please upgrade your version of Virtualbox to at least 5.0.12. **Alternately, you can try running the following command:** |
33 | 33 | ||
34 | ```console | 34 | ``` |
35 | vagrant plugin install vagrant-vbguest | 35 | vagrant plugin install vagrant-vbguest |
36 | ``` | 36 | ``` |
37 | 37 | ||
38 | ### How do I remove an existing environment? | 38 | ### How do I remove an existing environment? |
39 | Finished with your environment? From anywhere inside the folder where you checked out this project, Execute: | 39 | Finished with your environment? From anywhere inside the folder where you checked out this project, Execute: |
40 | 40 | ||
41 | ```console | 41 | ``` |
42 | vagrant destroy | 42 | vagrant destroy |
43 | ``` | 43 | ``` |
44 | 44 | ||
45 | ### What if I want to use Docker directly? | 45 | ### What if I want to use Docker directly? |
46 | Want to benefit from the Vagrant workflow without a virtual machine? The Vagrantfile is configured to bypass running a virtual machine, and run the container directly. Execute the following when bringing up the environment to force the use of Docker: | 46 | Want to benefit from the Vagrant workflow without a virtual machine? The Vagrantfile is configured to bypass running a virtual machine, and run the container directly. Execute the following when bringing up the environment to force the use of Docker: |
47 | ```console | 47 | ``` |
48 | vagrant up --provider=docker | 48 | vagrant up --provider=docker |
49 | ``` | 49 | ``` |
50 | 50 | ||
51 | ### How do I access the virtual machine instead of the Docker container? | 51 | ### How do I access the virtual machine instead of the Docker container? |
52 | Execute the following to bypass the `vagrant` user booting directly to the official qmk builder image: | 52 | Execute the following to bypass the `vagrant` user booting directly to the official qmk builder image: |
53 | 53 | ||
54 | ```console | 54 | ``` |
55 | vagrant ssh -c 'sudo -i' | 55 | vagrant ssh -c 'sudo -i' |
56 | ``` | 56 | ``` |
diff --git a/docs/hardware_drivers.md b/docs/hardware_drivers.md index 7e89c0d2b..a15750132 100644 --- a/docs/hardware_drivers.md +++ b/docs/hardware_drivers.md | |||
@@ -18,10 +18,6 @@ Support for addressing pins on the ProMicro by their Arduino name rather than th | |||
18 | 18 | ||
19 | Support for SSD1306 based OLED displays. For more information see the [OLED Driver Feature](feature_oled_driver.md) page. | 19 | Support for SSD1306 based OLED displays. For more information see the [OLED Driver Feature](feature_oled_driver.md) page. |
20 | 20 | ||
21 | ## uGFX | ||
22 | |||
23 | You can make use of uGFX within QMK to drive character and graphic LCDs, LED arrays, OLED, TFT, and other display technologies. This needs to be better documented, if you are trying to do this and reading the code doesn't help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) and we can help you through the process. | ||
24 | |||
25 | ## WS2812 | 21 | ## WS2812 |
26 | 22 | ||
27 | Support for WS2811/WS2812{a,b,c} LED's. For more information see the [RGB Light](feature_rgblight.md) page. | 23 | Support for WS2811/WS2812{a,b,c} LED's. For more information see the [RGB Light](feature_rgblight.md) page. |
diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index 7630b44e0..be55356b1 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md | |||
@@ -144,10 +144,38 @@ The `rules.mk` file can also be placed in a sub-folder, and its reading order is | |||
144 | * `keyboards/top_folder/sub_1/sub_2/sub_3/sub_4/rules.mk` | 144 | * `keyboards/top_folder/sub_1/sub_2/sub_3/sub_4/rules.mk` |
145 | * `keyboards/top_folder/keymaps/a_keymap/rules.mk` | 145 | * `keyboards/top_folder/keymaps/a_keymap/rules.mk` |
146 | * `users/a_user_folder/rules.mk` | 146 | * `users/a_user_folder/rules.mk` |
147 | * `keyboards/top_folder/sub_1/sub_2/sub_3/sub_4/post_rules.mk` | ||
148 | * `keyboards/top_folder/sub_1/sub_2/sub_3/post_rules.mk` | ||
149 | * `keyboards/top_folder/sub_1/sub_2/post_rules.mk` | ||
150 | * `keyboards/top_folder/sub_1/post_rules.mk` | ||
151 | * `keyboards/top_folder/post_rules.mk` | ||
147 | * `common_features.mk` | 152 | * `common_features.mk` |
148 | 153 | ||
149 | Many of the settings written in the `rules.mk` file are interpreted by `common_features.mk`, which sets the necessary source files and compiler options. | 154 | Many of the settings written in the `rules.mk` file are interpreted by `common_features.mk`, which sets the necessary source files and compiler options. |
150 | 155 | ||
156 | The `post_rules.mk` file can interpret `features` of a keyboard-level before `common_features.mk`. For example, when your designed keyboard has the option to implement backlighting or underglow using rgblight.c, writing the following in the `post_rules.mk` makes it easier for the user to configure the `rules.mk`. | ||
157 | |||
158 | * `keyboards/top_folder/keymaps/a_keymap/rules.mk` | ||
159 | ```make | ||
160 | # Please set the following according to the selection of the hardware implementation option. | ||
161 | RGBLED_OPTION_TYPE = backlight ## none, backlight or underglow | ||
162 | ``` | ||
163 | * `keyboards/top_folder/post_rules.mk` | ||
164 | ```make | ||
165 | ifeq ($(filter $(strip $(RGBLED_OPTION_TYPE))x, nonex backlightx underglowx x),) | ||
166 | $(error unknown RGBLED_OPTION_TYPE value "$(RGBLED_OPTION_TYPE)") | ||
167 | endif | ||
168 | |||
169 | ifeq ($(strip $(RGBLED_OPTION_TYPE)),backlight) | ||
170 | RGBLIGHT_ENABLE = yes | ||
171 | OPT_DEFS += -DRGBLED_NUM=30 | ||
172 | endif | ||
173 | ifeq ($(strip $(RGBLED_OPTION_TYPE)),underglow) | ||
174 | RGBLIGHT_ENABLE = yes | ||
175 | OPT_DEFS += -DRGBLED_NUM=6 | ||
176 | endif | ||
177 | ``` | ||
178 | |||
151 | ?> See `build_keyboard.mk` and `common_features.mk` for more details. | 179 | ?> See `build_keyboard.mk` and `common_features.mk` for more details. |
152 | 180 | ||
153 | ### `<keyboard_name.c>` | 181 | ### `<keyboard_name.c>` |
@@ -227,8 +255,6 @@ The year should be the first year the file is created. If work was done to that | |||
227 | 255 | ||
228 | The core of QMK is licensed under the [GNU General Public License](https://www.gnu.org/licenses/licenses.en.html). If you are shipping binaries for AVR processors you may choose either [GPLv2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html) or [GPLv3](https://www.gnu.org/licenses/gpl.html). If you are shipping binaries for ARM processors you must choose [GPL Version 3](https://www.gnu.org/licenses/gpl.html) to comply with the [ChibiOS](https://www.chibios.org) GPLv3 license. | 256 | The core of QMK is licensed under the [GNU General Public License](https://www.gnu.org/licenses/licenses.en.html). If you are shipping binaries for AVR processors you may choose either [GPLv2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html) or [GPLv3](https://www.gnu.org/licenses/gpl.html). If you are shipping binaries for ARM processors you must choose [GPL Version 3](https://www.gnu.org/licenses/gpl.html) to comply with the [ChibiOS](https://www.chibios.org) GPLv3 license. |
229 | 257 | ||
230 | If your keyboard makes use of the [uGFX](https://ugfx.io) features within QMK you must comply with the [uGFX License](https://ugfx.io/license.html), which requires a separate commercial license before selling a device containing uGFX. | ||
231 | |||
232 | ## Technical Details | 258 | ## Technical Details |
233 | 259 | ||
234 | If you're looking for more information on making your keyboard work with QMK, [check out the hardware section](hardware.md)! | 260 | If you're looking for more information on making your keyboard work with QMK, [check out the hardware section](hardware.md)! |
diff --git a/docs/he-il/getting_started_github.md b/docs/he-il/getting_started_github.md index 900852eff..ca79e40f9 100644 --- a/docs/he-il/getting_started_github.md +++ b/docs/he-il/getting_started_github.md | |||
@@ -35,7 +35,6 @@ Submodule path 'lib/chibios': checked out '587968d6cbc2b0e1c7147540872f2a67e59ca | |||
35 | Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' | 35 | Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' |
36 | Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' | 36 | Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' |
37 | Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' | 37 | Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' |
38 | Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2' | ||
39 | ``` | 38 | ``` |
40 | 39 | ||
41 | </div> | 40 | </div> |
diff --git a/docs/how_keyboards_work.md b/docs/how_keyboards_work.md index 3dcbc6452..36cbfb4d9 100644 --- a/docs/how_keyboards_work.md +++ b/docs/how_keyboards_work.md | |||
@@ -9,7 +9,7 @@ firmware directly. | |||
9 | Whenever you type on 1 particular key, here is the chain of actions taking | 9 | Whenever you type on 1 particular key, here is the chain of actions taking |
10 | place: | 10 | place: |
11 | 11 | ||
12 | ``` text | 12 | ``` |
13 | +------+ +-----+ +----------+ +----------+ +----+ | 13 | +------+ +-----+ +----------+ +----------+ +----+ |
14 | | User |-------->| Key |------>| Firmware |----->| USB wire |---->| OS | | 14 | | User |-------->| Key |------>| Firmware |----->| USB wire |---->| OS | |
15 | +------+ +-----+ +----------+ +----------+ +----+ | 15 | +------+ +-----+ +----------+ +----------+ +----+ |
diff --git a/docs/i2c_driver.md b/docs/i2c_driver.md index 3ec34a0f8..95c588af4 100644 --- a/docs/i2c_driver.md +++ b/docs/i2c_driver.md | |||
@@ -62,16 +62,13 @@ Then, modify your board's `mcuconf.h` to enable the peripheral you've chosen, fo | |||
62 | 62 | ||
63 | Configuration-wise, you'll need to set up the peripheral as per your MCU's datasheet -- the defaults match the pins for a Proton-C, i.e. STM32F303. | 63 | Configuration-wise, you'll need to set up the peripheral as per your MCU's datasheet -- the defaults match the pins for a Proton-C, i.e. STM32F303. |
64 | 64 | ||
65 | |`config.h` Overrride |Description |Default| | 65 | |`config.h` Overrride |Description |Default| |
66 | |------------------------|-------------------------------------------------------------------------------------------|-------| | 66 | |------------------------|--------------------------------------------------------------|-------| |
67 | |`I2C_DRIVER` |I2C peripheral to use - I2C1 -> `I2CD1`, I2C2 -> `I2CD2` etc. |`I2CD1`| | 67 | |`I2C_DRIVER` |I2C peripheral to use - I2C1 -> `I2CD1`, I2C2 -> `I2CD2` etc. |`I2CD1`| |
68 | |`I2C1_BANK` (deprecated)|The bank of pins (`GPIOA`, `GPIOB`, `GPIOC`), superseded by `I2C1_SCL_BANK`/`I2C1_SDA_BANK`|`GPIOB`| | 68 | |`I2C1_SCL_PIN` |The pin definition for SCL |`B6` | |
69 | |`I2C1_SCL_BANK` |The bank of pins (`GPIOA`, `GPIOB`, `GPIOC`) to use for SCL |`GPIOB`| | 69 | |`I2C1_SCL_PAL_MODE` |The alternate function mode for SCL |`4` | |
70 | |`I2C1_SCL` |The pin number for SCL (0-15) |`6` | | 70 | |`I2C1_SDA_PIN` |The pin definition for SDA |`B7` | |
71 | |`I2C1_SCL_PAL_MODE` |The alternate function mode for SCL |`4` | | 71 | |`I2C1_SDA_PAL_MODE` |The alternate function mode for SDA |`4` | |
72 | |`I2C1_SDA_BANK` |The bank of pins (`GPIOA`, `GPIOB`, `GPIOC`) to use for SDA |`GPIOB`| | ||
73 | |`I2C1_SDA` |The pin number for SDA (0-15) |`7` | | ||
74 | |`I2C1_SDA_PAL_MODE` |The alternate function mode for SDA |`4` | | ||
75 | 72 | ||
76 | The following configuration values depend on the specific MCU in use. | 73 | The following configuration values depend on the specific MCU in use. |
77 | 74 | ||
@@ -190,7 +187,7 @@ Receive multiple bytes from the selected SPI device. | |||
190 | 187 | ||
191 | ### `i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)` | 188 | ### `i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)` |
192 | 189 | ||
193 | Writes to a register on the I2C device. | 190 | Writes to a register with an 8-bit address on the I2C device. |
194 | 191 | ||
195 | #### Arguments | 192 | #### Arguments |
196 | 193 | ||
@@ -211,9 +208,32 @@ Writes to a register on the I2C device. | |||
211 | 208 | ||
212 | --- | 209 | --- |
213 | 210 | ||
211 | ### `i2c_status_t i2c_writeReg16(uint8_t devaddr, uint16_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)` | ||
212 | |||
213 | Writes to a register with a 16-bit address (big endian) on the I2C device. | ||
214 | |||
215 | #### Arguments | ||
216 | |||
217 | - `uint8_t devaddr` | ||
218 | The 7-bit I2C address of the device. | ||
219 | - `uint16_t regaddr` | ||
220 | The register address to write to. | ||
221 | - `uint8_t *data` | ||
222 | A pointer to the data to transmit. | ||
223 | - `uint16_t length` | ||
224 | The number of bytes to write. Take care not to overrun the length of `data`. | ||
225 | - `uint16_t timeout` | ||
226 | The time in milliseconds to wait for a response from the target device. | ||
227 | |||
228 | #### Return Value | ||
229 | |||
230 | `I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`. | ||
231 | |||
232 | --- | ||
233 | |||
214 | ### `i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)` | 234 | ### `i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)` |
215 | 235 | ||
216 | Reads from a register on the I2C device. | 236 | Reads from a register with an 8-bit address on the I2C device. |
217 | 237 | ||
218 | #### Arguments | 238 | #### Arguments |
219 | 239 | ||
@@ -232,6 +252,27 @@ Reads from a register on the I2C device. | |||
232 | 252 | ||
233 | --- | 253 | --- |
234 | 254 | ||
255 | ### `i2c_status_t i2c_readReg16(uint8_t devaddr, uint16_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)` | ||
256 | |||
257 | Reads from a register with a 16-bit address (big endian) on the I2C device. | ||
258 | |||
259 | #### Arguments | ||
260 | |||
261 | - `uint8_t devaddr` | ||
262 | The 7-bit I2C address of the device. | ||
263 | - `uint16_t regaddr` | ||
264 | The register address to read from. | ||
265 | - `uint16_t length` | ||
266 | The number of bytes to read. Take care not to overrun the length of `data`. | ||
267 | - `uint16_t timeout` | ||
268 | The time in milliseconds to wait for a response from the target device. | ||
269 | |||
270 | #### Return Value | ||
271 | |||
272 | `I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`. | ||
273 | |||
274 | --- | ||
275 | |||
235 | ### `i2c_status_t i2c_stop(void)` | 276 | ### `i2c_status_t i2c_stop(void)` |
236 | 277 | ||
237 | Stop the current I2C transaction. | 278 | Stop the current I2C transaction. |
diff --git a/docs/ja/compatible_microcontrollers.md b/docs/ja/compatible_microcontrollers.md index 7a3484fa8..23f32bbb6 100644 --- a/docs/ja/compatible_microcontrollers.md +++ b/docs/ja/compatible_microcontrollers.md | |||
@@ -32,6 +32,7 @@ QMK は十分な容量のフラッシュメモリを備えた USB 対応 AVR ま | |||
32 | * [STM32F103](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html) | 32 | * [STM32F103](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html) |
33 | * [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html) | 33 | * [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html) |
34 | * [STM32F401](https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html) | 34 | * [STM32F401](https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html) |
35 | * [STM32F405](https://www.st.com/en/microcontrollers-microprocessors/stm32f405-415.html) | ||
35 | * [STM32F407](https://www.st.com/en/microcontrollers-microprocessors/stm32f407-417.html) | 36 | * [STM32F407](https://www.st.com/en/microcontrollers-microprocessors/stm32f407-417.html) |
36 | * [STM32F411](https://www.st.com/en/microcontrollers-microprocessors/stm32f411.html) | 37 | * [STM32F411](https://www.st.com/en/microcontrollers-microprocessors/stm32f411.html) |
37 | * [STM32F446](https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html) | 38 | * [STM32F446](https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html) |
diff --git a/docs/ja/config_options.md b/docs/ja/config_options.md index 18fe9489b..fb43d015f 100644 --- a/docs/ja/config_options.md +++ b/docs/ja/config_options.md | |||
@@ -358,7 +358,7 @@ QMK での全ての利用可能な設定にはデフォルトがあります。 | |||
358 | これらを使って特定の機能のビルドを有効または無効にします。有効にすればするほどファームウェアが大きくなり、MCU には大きすぎるファームウェアを構築するリスクがあります。 | 358 | これらを使って特定の機能のビルドを有効または無効にします。有効にすればするほどファームウェアが大きくなり、MCU には大きすぎるファームウェアを構築するリスクがあります。 |
359 | 359 | ||
360 | * `BOOTMAGIC_ENABLE` | 360 | * `BOOTMAGIC_ENABLE` |
361 | * 仮 DIP ッ設 | 361 | * マッイトを有にします |
362 | * `MOUSEKEY_ENABLE` | 362 | * `MOUSEKEY_ENABLE` |
363 | * マウスキー | 363 | * マウスキー |
364 | * `EXTRAKEY_ENABLE` | 364 | * `EXTRAKEY_ENABLE` |
diff --git a/docs/ja/faq_misc.md b/docs/ja/faq_misc.md index e9a35ef32..38917df2e 100644 --- a/docs/ja/faq_misc.md +++ b/docs/ja/faq_misc.md | |||
@@ -39,10 +39,6 @@ Size after: | |||
39 | 39 | ||
40 | **NKRO** がまだ動作しない場合は、`Magic` **N** コマンド(デフォルトでは `LShift+RShift+N`)を試してみてください。**NKRO** モードと **6KRO** モード間を一時的に切り替えるためにこのコマンドを使うことができます。**NKRO** が機能しない状況、特に BIOS の場合は **6KRO** モードに切り替える必要があります。 | 40 | **NKRO** がまだ動作しない場合は、`Magic` **N** コマンド(デフォルトでは `LShift+RShift+N`)を試してみてください。**NKRO** モードと **6KRO** モード間を一時的に切り替えるためにこのコマンドを使うことができます。**NKRO** が機能しない状況、特に BIOS の場合は **6KRO** モードに切り替える必要があります。 |
41 | 41 | ||
42 | ファームウェアを `BOOTMAGIC_ENABLE` でビルドした場合、`ブートマジック` **N** コマンドで切り替える必要があります(デフォルトでは `Space+N`)。この設定は EEPROM に格納され、電源を入れ直しても保持されます。 | ||
43 | |||
44 | https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch | ||
45 | |||
46 | 42 | ||
47 | ## トラックポイントははリセット回路が必要です (PS/2 マウスサポート) | 43 | ## トラックポイントははリセット回路が必要です (PS/2 マウスサポート) |
48 | リセット回路が無いとハードウェアの不適切な初期化のために一貫性の無い結果になります。TPM754 の回路図を見てください: | 44 | リセット回路が無いとハードウェアの不適切な初期化のために一貫性の無い結果になります。TPM754 の回路図を見てください: |
diff --git a/docs/ja/feature_haptic_feedback.md b/docs/ja/feature_haptic_feedback.md index 158079725..687788014 100644 --- a/docs/ja/feature_haptic_feedback.md +++ b/docs/ja/feature_haptic_feedback.md | |||
@@ -9,9 +9,12 @@ | |||
9 | 9 | ||
10 | 現在のところ、`rules.mk` で触覚フィードバック用に以下のオプションを利用可能です: | 10 | 現在のところ、`rules.mk` で触覚フィードバック用に以下のオプションを利用可能です: |
11 | 11 | ||
12 | `HAPTIC_ENABLE += DRV2605L` | 12 | ``` |
13 | HAPTIC_ENABLE = yes | ||
13 | 14 | ||
14 | `HAPTIC_ENABLE += SOLENOID` | 15 | HAPTIC_DRIVER += DRV2605L |
16 | HAPTIC_DRIVER += SOLENOID | ||
17 | ``` | ||
15 | 18 | ||
16 | ## サポートされる既知のハードウェア | 19 | ## サポートされる既知のハードウェア |
17 | 20 | ||
diff --git a/docs/ja/feature_ps2_mouse.md b/docs/ja/feature_ps2_mouse.md index 3d6941130..569934c18 100644 --- a/docs/ja/feature_ps2_mouse.md +++ b/docs/ja/feature_ps2_mouse.md | |||
@@ -43,14 +43,8 @@ PS2_USE_BUSYWAIT = yes | |||
43 | 43 | ||
44 | ```c | 44 | ```c |
45 | #ifdef PS2_USE_BUSYWAIT | 45 | #ifdef PS2_USE_BUSYWAIT |
46 | # define PS2_CLOCK_PORT PORTD | 46 | # define PS2_CLOCK_PIN D1 |
47 | # define PS2_CLOCK_PIN PIND | 47 | # define PS2_DATA_PIN D2 |
48 | # define PS2_CLOCK_DDR DDRD | ||
49 | # define PS2_CLOCK_BIT 1 | ||
50 | # define PS2_DATA_PORT PORTD | ||
51 | # define PS2_DATA_PIN PIND | ||
52 | # define PS2_DATA_DDR DDRD | ||
53 | # define PS2_DATA_BIT 2 | ||
54 | #endif | 48 | #endif |
55 | ``` | 49 | ``` |
56 | 50 | ||
@@ -69,14 +63,8 @@ PS2_USE_INT = yes | |||
69 | 63 | ||
70 | ```c | 64 | ```c |
71 | #ifdef PS2_USE_INT | 65 | #ifdef PS2_USE_INT |
72 | #define PS2_CLOCK_PORT PORTD | 66 | #define PS2_CLOCK_PIN D2 |
73 | #define PS2_CLOCK_PIN PIND | 67 | #define PS2_DATA_PIN D5 |
74 | #define PS2_CLOCK_DDR DDRD | ||
75 | #define PS2_CLOCK_BIT 2 | ||
76 | #define PS2_DATA_PORT PORTD | ||
77 | #define PS2_DATA_PIN PIND | ||
78 | #define PS2_DATA_DDR DDRD | ||
79 | #define PS2_DATA_BIT 5 | ||
80 | 68 | ||
81 | #define PS2_INT_INIT() do { \ | 69 | #define PS2_INT_INIT() do { \ |
82 | EICRA |= ((1<<ISC21) | \ | 70 | EICRA |= ((1<<ISC21) | \ |
@@ -107,14 +95,9 @@ PS2_USE_USART = yes | |||
107 | 95 | ||
108 | ```c | 96 | ```c |
109 | #ifdef PS2_USE_USART | 97 | #ifdef PS2_USE_USART |
110 | #define PS2_CLOCK_PORT PORTD | 98 | #ifdef PS2_USE_USART |
111 | #define PS2_CLOCK_PIN PIND | 99 | #define PS2_CLOCK_PIN D5 |
112 | #define PS2_CLOCK_DDR DDRD | 100 | #define PS2_DATA_PIN D2 |
113 | #define PS2_CLOCK_BIT 5 | ||
114 | #define PS2_DATA_PORT PORTD | ||
115 | #define PS2_DATA_PIN PIND | ||
116 | #define PS2_DATA_DDR DDRD | ||
117 | #define PS2_DATA_BIT 2 | ||
118 | 101 | ||
119 | /* 同期、奇数パリティ、1-bit ストップ、8-bit データ、立ち下がりエッジでサンプル */ | 102 | /* 同期、奇数パリティ、1-bit ストップ、8-bit データ、立ち下がりエッジでサンプル */ |
120 | /* CLOCK の DDR を入力としてスレーブに設定 */ | 103 | /* CLOCK の DDR を入力としてスレーブに設定 */ |
diff --git a/docs/ja/feature_velocikey.md b/docs/ja/feature_velocikey.md index f9b6e73bd..b13969a19 100644 --- a/docs/ja/feature_velocikey.md +++ b/docs/ja/feature_velocikey.md | |||
@@ -11,7 +11,6 @@ Velocikey は入力の速度を使って(レインボー渦巻効果のような | |||
11 | Velocikey を使うためには、2つのステップがあります。最初に、キーボードをコンパイルする時に、`rules.mk` に `VELOCIKEY_ENABLE=yes` を設定する必要があります。例えば: | 11 | Velocikey を使うためには、2つのステップがあります。最初に、キーボードをコンパイルする時に、`rules.mk` に `VELOCIKEY_ENABLE=yes` を設定する必要があります。例えば: |
12 | 12 | ||
13 | ``` | 13 | ``` |
14 | BOOTMAGIC_ENABLE = no | ||
15 | MOUSEKEY_ENABLE = no | 14 | MOUSEKEY_ENABLE = no |
16 | STENO_ENABLE = no | 15 | STENO_ENABLE = no |
17 | EXTRAKEY_ENABLE = yes | 16 | EXTRAKEY_ENABLE = yes |
diff --git a/docs/ja/getting_started_github.md b/docs/ja/getting_started_github.md index 6d9b70c41..640701148 100644 --- a/docs/ja/getting_started_github.md +++ b/docs/ja/getting_started_github.md | |||
@@ -37,7 +37,6 @@ Submodule path 'lib/chibios': checked out '587968d6cbc2b0e1c7147540872f2a67e59ca | |||
37 | Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' | 37 | Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' |
38 | Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' | 38 | Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' |
39 | Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' | 39 | Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' |
40 | Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2' | ||
41 | ``` | 40 | ``` |
42 | 41 | ||
43 | ローカルマシンに QMK のフォークができるので、キーマップの追加、コンパイル、キーボードへの書き込みができます。変更に満足したら、以下のようにそれらをフォークへ追加、コミットおよびプッシュすることができます: | 42 | ローカルマシンに QMK のフォークができるので、キーマップの追加、コンパイル、キーボードへの書き込みができます。変更に満足したら、以下のようにそれらをフォークへ追加、コミットおよびプッシュすることができます: |
diff --git a/docs/ja/hardware_drivers.md b/docs/ja/hardware_drivers.md index f77b48ba8..e0061cb32 100644 --- a/docs/ja/hardware_drivers.md +++ b/docs/ja/hardware_drivers.md | |||
@@ -24,10 +24,6 @@ ProMicro のピンを AVR の名前ではなく、Arduino の名前で指定で | |||
24 | 24 | ||
25 | SSD1306 ベースの OLED ディスプレイのサポート。詳しくは[OLED ドライバ](ja/feature_oled_driver.md)を参照して下さい。 | 25 | SSD1306 ベースの OLED ディスプレイのサポート。詳しくは[OLED ドライバ](ja/feature_oled_driver.md)を参照して下さい。 |
26 | 26 | ||
27 | ## uGFX | ||
28 | |||
29 | QMK 内で uGFX を使用して、キャラクタ LCD やグラフィック LCD、LED アレイ、OLED ディスプレイ、TFT 液晶や他のディスプレイを制御できます。この部分はより詳しく文書化される必要があります。もしこれを使用したい場合にコードを読んでも分からない場合、[issue を開く](https://github.com/qmk/qmk_firmware/issues/new)を通して助けることができるかもしれません。 | ||
30 | |||
31 | ## WS2812 | 27 | ## WS2812 |
32 | 28 | ||
33 | WS2811/WS2812{a,b,c} LED のサポート。 詳しくは [RGB ライト](ja/feature_rgblight.md)を参照して下さい。 | 29 | WS2811/WS2812{a,b,c} LED のサポート。 詳しくは [RGB ライト](ja/feature_rgblight.md)を参照して下さい。 |
diff --git a/docs/ja/hardware_keyboard_guidelines.md b/docs/ja/hardware_keyboard_guidelines.md index 8a9127abc..c0e7c18be 100644 --- a/docs/ja/hardware_keyboard_guidelines.md +++ b/docs/ja/hardware_keyboard_guidelines.md | |||
@@ -234,8 +234,6 @@ QMK が提供する機能の量を考えれば、新しいユーザーが混乱 | |||
234 | 234 | ||
235 | QMK のコア部分は [GNU General Public License](https://www.gnu.org/licenses/licenses.en.html) でライセンスされます。AVR マイコン用のバイナリを提供する場合は、[GPLv2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html) か、[GPLv3](https://www.gnu.org/licenses/gpl.html) のどちらかから選択出来ます。ARM マイコン用のバイナリを提供する場合は、 [ChibiOS](https://www.chibios.org) の GPLv3 ライセンスに準拠するため、[GPL Version 3](https://www.gnu.org/licenses/gpl.html) を選択しなければいけません。 | 235 | QMK のコア部分は [GNU General Public License](https://www.gnu.org/licenses/licenses.en.html) でライセンスされます。AVR マイコン用のバイナリを提供する場合は、[GPLv2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html) か、[GPLv3](https://www.gnu.org/licenses/gpl.html) のどちらかから選択出来ます。ARM マイコン用のバイナリを提供する場合は、 [ChibiOS](https://www.chibios.org) の GPLv3 ライセンスに準拠するため、[GPL Version 3](https://www.gnu.org/licenses/gpl.html) を選択しなければいけません。 |
236 | 236 | ||
237 | [uGFX](https://ugfx.io) を使用している場合は、[uGFX License](https://ugfx.io/license.html) に準拠する必要があります。uGFX を利用したデバイスを販売するには個別に商用ライセンスを取得しなければいけません。 | ||
238 | |||
239 | ## 技術的な詳細 | 237 | ## 技術的な詳細 |
240 | 238 | ||
241 | キーボードを QMK で動作させるための詳細は[ハードウェア](ja/hardware.md)を参照して下さい! | 239 | キーボードを QMK で動作させるための詳細は[ハードウェア](ja/hardware.md)を参照して下さい! |
diff --git a/docs/ja/i2c_driver.md b/docs/ja/i2c_driver.md index 9d348d580..1d8f70e16 100644 --- a/docs/ja/i2c_driver.md +++ b/docs/ja/i2c_driver.md | |||
@@ -79,13 +79,10 @@ ARM MCU 用の設定はしばしば非常に複雑です。これは、多くの | |||
79 | 79 | ||
80 | STM32 MCU では、使用するハードウェアドライバにより、さまざまなピンを I2C ピンとして設定できます。標準では `B6`, `B7` ピンが I2C 用のピンです。 I2C 用のピンを設定するために次の定義が使えます: | 80 | STM32 MCU では、使用するハードウェアドライバにより、さまざまなピンを I2C ピンとして設定できます。標準では `B6`, `B7` ピンが I2C 用のピンです。 I2C 用のピンを設定するために次の定義が使えます: |
81 | 81 | ||
82 | | 変数 | 説明 | 既定値 | | 82 | | 変数 | 説明 | 既定値 | |
83 | |-----------------------|--------------------------------------------------------------------------------------------------|---------| | 83 | |-----------------------|-------------------------------------------------------------------------------------------|---------| |
84 | | `I2C1_SCL_BANK` | SCL に使うピンのバンク (`GPIOA`, `GPIOB`, `GPIOC`) | `GPIOB` | | 84 | | `I2C1_SCL_PIN` | SCL のピン番号 | `B6` | |
85 | | `I2C1_SDA_BANK` | SDA に使うピンのバンク (`GPIOA`, `GPIOB`, `GPIOC`) | `GPIOB` | | 85 | | `I2C1_SDA_PIN` | SDA のピン番号 | `B7` | |
86 | | `I2C1_SCL` | SCL のピン番号 (0-15) | `6` | | ||
87 | | `I2C1_SDA` | SDA のピン番号 (0-15) | `7` | | ||
88 | | `I2C1_BANK`(非推奨) | 使用するピンのバンク (`GPIOA`, `GPIOB`, `GPIOC`)。後継は `I2C1_SCL_BANK`, `I2C1_SDA_BANK` です。 | `GPIOB` | | ||
89 | 86 | ||
90 | ChibiOS I2C ドライバの設定項目は STM32 MCU の種類に依存します。 | 87 | ChibiOS I2C ドライバの設定項目は STM32 MCU の種類に依存します。 |
91 | 88 | ||
diff --git a/docs/ja/understanding_qmk.md b/docs/ja/understanding_qmk.md index 109876961..1654f8e00 100644 --- a/docs/ja/understanding_qmk.md +++ b/docs/ja/understanding_qmk.md | |||
@@ -184,10 +184,6 @@ FIXME: This needs to be written | |||
184 | 184 | ||
185 | FIXME: This needs to be written | 185 | FIXME: This needs to be written |
186 | 186 | ||
187 | #### Visualizer | ||
188 | |||
189 | FIXME: This needs to be written | ||
190 | |||
191 | #### Keyboard state LEDs (Caps Lock, Num Lock, Scroll Lock) | 187 | #### Keyboard state LEDs (Caps Lock, Num Lock, Scroll Lock) |
192 | 188 | ||
193 | FIXME: This needs to be written | 189 | FIXME: This needs to be written |
diff --git a/docs/keycodes.md b/docs/keycodes.md index 9f61447dc..926d4fdce 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md | |||
@@ -8,205 +8,205 @@ This is a reference only. Each group of keys links to the page documenting their | |||
8 | 8 | ||
9 | See also: [Basic Keycodes](keycodes_basic.md) | 9 | See also: [Basic Keycodes](keycodes_basic.md) |
10 | 10 | ||
11 | |Key |Aliases |Description |Windows |macOS |Linux<sup>1</sup>| | 11 | |Key |Aliases |Description |Windows |macOS |Linux<sup>1</sup>| |
12 | |-----------------------|------------------------------|-----------------------------------------------|-------------|-------------|-----------------| | 12 | |------------------------|-------------------------------|---------------------------------------|-------------|-------------|-----------------| |
13 | |`KC_NO` |`XXXXXXX` |Ignore this key (NOOP) |*N/A* |*N/A* |*N/A* | | 13 | |`KC_NO` |`XXXXXXX` |Ignore this key (NOOP) |*N/A* |*N/A* |*N/A* | |
14 | |`KC_TRANSPARENT` |`KC_TRNS`, `_______` |Use the next lowest non-transparent key |*N/A* |*N/A* |*N/A* | | 14 | |`KC_TRANSPARENT` |`KC_TRNS`, `_______` |Use the next lowest non-transparent key|*N/A* |*N/A* |*N/A* | |
15 | |`KC_A` | |`a` and `A` |✔ |✔ |✔ | | 15 | |`KC_A` | |`a` and `A` |✔ |✔ |✔ | |
16 | |`KC_B` | |`b` and `B` |✔ |✔ |✔ | | 16 | |`KC_B` | |`b` and `B` |✔ |✔ |✔ | |
17 | |`KC_C` | |`c` and `C` |✔ |✔ |✔ | | 17 | |`KC_C` | |`c` and `C` |✔ |✔ |✔ | |
18 | |`KC_D` | |`d` and `D` |✔ |✔ |✔ | | 18 | |`KC_D` | |`d` and `D` |✔ |✔ |✔ | |
19 | |`KC_E` | |`e` and `E` |✔ |✔ |✔ | | 19 | |`KC_E` | |`e` and `E` |✔ |✔ |✔ | |
20 | |`KC_F` | |`f` and `F` |✔ |✔ |✔ | | 20 | |`KC_F` | |`f` and `F` |✔ |✔ |✔ | |
21 | |`KC_G` | |`g` and `G` |✔ |✔ |✔ | | 21 | |`KC_G` | |`g` and `G` |✔ |✔ |✔ | |
22 | |`KC_H` | |`h` and `H` |✔ |✔ |✔ | | 22 | |`KC_H` | |`h` and `H` |✔ |✔ |✔ | |
23 | |`KC_I` | |`i` and `I` |✔ |✔ |✔ | | 23 | |`KC_I` | |`i` and `I` |✔ |✔ |✔ | |
24 | |`KC_J` | |`j` and `J` |✔ |✔ |✔ | | 24 | |`KC_J` | |`j` and `J` |✔ |✔ |✔ | |
25 | |`KC_K` | |`k` and `K` |✔ |✔ |✔ | | 25 | |`KC_K` | |`k` and `K` |✔ |✔ |✔ | |
26 | |`KC_L` | |`l` and `L` |✔ |✔ |✔ | | 26 | |`KC_L` | |`l` and `L` |✔ |✔ |✔ | |
27 | |`KC_M` | |`m` and `M` |✔ |✔ |✔ | | 27 | |`KC_M` | |`m` and `M` |✔ |✔ |✔ | |
28 | |`KC_N` | |`n` and `N` |✔ |✔ |✔ | | 28 | |`KC_N` | |`n` and `N` |✔ |✔ |✔ | |
29 | |`KC_O` | |`o` and `O` |✔ |✔ |✔ | | 29 | |`KC_O` | |`o` and `O` |✔ |✔ |✔ | |
30 | |`KC_P` | |`p` and `P` |✔ |✔ |✔ | | 30 | |`KC_P` | |`p` and `P` |✔ |✔ |✔ | |
31 | |`KC_Q` | |`q` and `Q` |✔ |✔ |✔ | | 31 | |`KC_Q` | |`q` and `Q` |✔ |✔ |✔ | |
32 | |`KC_R` | |`r` and `R` |✔ |✔ |✔ | | 32 | |`KC_R` | |`r` and `R` |✔ |✔ |✔ | |
33 | |`KC_S` | |`s` and `S` |✔ |✔ |✔ | | 33 | |`KC_S` | |`s` and `S` |✔ |✔ |✔ | |
34 | |`KC_T` | |`t` and `T` |✔ |✔ |✔ | | 34 | |`KC_T` | |`t` and `T` |✔ |✔ |✔ | |
35 | |`KC_U` | |`u` and `U` |✔ |✔ |✔ | | 35 | |`KC_U` | |`u` and `U` |✔ |✔ |✔ | |
36 | |`KC_V` | |`v` and `V` |✔ |✔ |✔ | | 36 | |`KC_V` | |`v` and `V` |✔ |✔ |✔ | |
37 | |`KC_W` | |`w` and `W` |✔ |✔ |✔ | | 37 | |`KC_W` | |`w` and `W` |✔ |✔ |✔ | |
38 | |`KC_X` | |`x` and `X` |✔ |✔ |✔ | | 38 | |`KC_X` | |`x` and `X` |✔ |✔ |✔ | |
39 | |`KC_Y` | |`y` and `Y` |✔ |✔ |✔ | | 39 | |`KC_Y` | |`y` and `Y` |✔ |✔ |✔ | |
40 | |`KC_Z` | |`z` and `Z` |✔ |✔ |✔ | | 40 | |`KC_Z` | |`z` and `Z` |✔ |✔ |✔ | |
41 | |`KC_1` | |`1` and `!` |✔ |✔ |✔ | | 41 | |`KC_1` | |`1` and `!` |✔ |✔ |✔ | |
42 | |`KC_2` | |`2` and `@` |✔ |✔ |✔ | | 42 | |`KC_2` | |`2` and `@` |✔ |✔ |✔ | |
43 | |`KC_3` | |`3` and `#` |✔ |✔ |✔ | | 43 | |`KC_3` | |`3` and `#` |✔ |✔ |✔ | |
44 | |`KC_4` | |`4` and `$` |✔ |✔ |✔ | | 44 | |`KC_4` | |`4` and `$` |✔ |✔ |✔ | |
45 | |`KC_5` | |`5` and `%` |✔ |✔ |✔ | | 45 | |`KC_5` | |`5` and `%` |✔ |✔ |✔ | |
46 | |`KC_6` | |`6` and `^` |✔ |✔ |✔ | | 46 | |`KC_6` | |`6` and `^` |✔ |✔ |✔ | |
47 | |`KC_7` | |`7` and `&` |✔ |✔ |✔ | | 47 | |`KC_7` | |`7` and `&` |✔ |✔ |✔ | |
48 | |`KC_8` | |`8` and `*` |✔ |✔ |✔ | | 48 | |`KC_8` | |`8` and `*` |✔ |✔ |✔ | |
49 | |`KC_9` | |`9` and `(` |✔ |✔ |✔ | | 49 | |`KC_9` | |`9` and `(` |✔ |✔ |✔ | |
50 | |`KC_0` | |`0` and `)` |✔ |✔ |✔ | | 50 | |`KC_0` | |`0` and `)` |✔ |✔ |✔ | |
51 | |`KC_ENTER` |`KC_ENT` |Return (Enter) |✔ |✔ |✔ | | 51 | |`KC_ENTER` |`KC_ENT` |Return (Enter) |✔ |✔ |✔ | |
52 | |`KC_ESCAPE` |`KC_ESC` |Escape |✔ |✔ |✔ | | 52 | |`KC_ESCAPE` |`KC_ESC` |Escape |✔ |✔ |✔ | |
53 | |`KC_BSPACE` |`KC_BSPC` |Delete (Backspace) |✔ |✔ |✔ | | 53 | |`KC_BACKSPACE` |`KC_BSPC` |Delete (Backspace) |✔ |✔ |✔ | |
54 | |`KC_TAB` | |Tab |✔ |✔ |✔ | | 54 | |`KC_TAB` | |Tab |✔ |✔ |✔ | |
55 | |`KC_SPACE` |`KC_SPC` |Spacebar |✔ |✔ |✔ | | 55 | |`KC_SPACE` |`KC_SPC` |Spacebar |✔ |✔ |✔ | |
56 | |`KC_MINUS` |`KC_MINS` |`-` and `_` |✔ |✔ |✔ | | 56 | |`KC_MINUS` |`KC_MINS` |`-` and `_` |✔ |✔ |✔ | |
57 | |`KC_EQUAL` |`KC_EQL` |`=` and `+` |✔ |✔ |✔ | | 57 | |`KC_EQUAL` |`KC_EQL` |`=` and `+` |✔ |✔ |✔ | |
58 | |`KC_LBRACKET` |`KC_LBRC` |`[` and `{` |✔ |✔ |✔ | | 58 | |`KC_LEFT_BRACKET` |`KC_LBRC` |`[` and `{` |✔ |✔ |✔ | |
59 | |`KC_RBRACKET` |`KC_RBRC` |`]` and `}` |✔ |✔ |✔ | | 59 | |`KC_RIGHT_BRACKET` |`KC_RBRC` |`]` and `}` |✔ |✔ |✔ | |
60 | |`KC_BSLASH` |`KC_BSLS` |`\` and `\|` |✔ |✔ |✔ | | 60 | |`KC_BACKSLASH` |`KC_BSLS` |`\` and `\|` |✔ |✔ |✔ | |
61 | |`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` |✔ |✔ |✔ | | 61 | |`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` |✔ |✔ |✔ | |
62 | |`KC_SCOLON` |`KC_SCLN` |`;` and `:` |✔ |✔ |✔ | | 62 | |`KC_SEMICOLON` |`KC_SCLN` |`;` and `:` |✔ |✔ |✔ | |
63 | |`KC_QUOTE` |`KC_QUOT` |`'` and `"` |✔ |✔ |✔ | | 63 | |`KC_QUOTE` |`KC_QUOT` |`'` and `"` |✔ |✔ |✔ | |
64 | |`KC_GRAVE` |`KC_GRV`, `KC_ZKHK` |<code>`</code> and `~`, JIS Zenkaku/Hankaku|✔ |✔ |✔ | | 64 | |`KC_GRAVE` |`KC_GRV` |<code>`</code> and `~` |✔ |✔ |✔ | |
65 | |`KC_COMMA` |`KC_COMM` |`,` and `<` |✔ |✔ |✔ | | 65 | |`KC_COMMA` |`KC_COMM` |`,` and `<` |✔ |✔ |✔ | |
66 | |`KC_DOT` | |`.` and `>` |✔ |✔ |✔ | | 66 | |`KC_DOT` | |`.` and `>` |✔ |✔ |✔ | |
67 | |`KC_SLASH` |`KC_SLSH` |`/` and `?` |✔ |✔ |✔ | | 67 | |`KC_SLASH` |`KC_SLSH` |`/` and `?` |✔ |✔ |✔ | |
68 | |`KC_CAPSLOCK` |`KC_CLCK`, `KC_CAPS` |Caps Lock |✔ |✔ |✔ | | 68 | |`KC_CAPS_LOCK` |`KC_CAPS` |Caps Lock |✔ |✔ |✔ | |
69 | |`KC_F1` | |F1 |✔ |✔ |✔ | | 69 | |`KC_F1` | |F1 |✔ |✔ |✔ | |
70 | |`KC_F2` | |F2 |✔ |✔ |✔ | | 70 | |`KC_F2` | |F2 |✔ |✔ |✔ | |
71 | |`KC_F3` | |F3 |✔ |✔ |✔ | | 71 | |`KC_F3` | |F3 |✔ |✔ |✔ | |
72 | |`KC_F4` | |F4 |✔ |✔ |✔ | | 72 | |`KC_F4` | |F4 |✔ |✔ |✔ | |
73 | |`KC_F5` | |F5 |✔ |✔ |✔ | | 73 | |`KC_F5` | |F5 |✔ |✔ |✔ | |
74 | |`KC_F6` | |F6 |✔ |✔ |✔ | | 74 | |`KC_F6` | |F6 |✔ |✔ |✔ | |
75 | |`KC_F7` | |F7 |✔ |✔ |✔ | | 75 | |`KC_F7` | |F7 |✔ |✔ |✔ | |
76 | |`KC_F8` | |F8 |✔ |✔ |✔ | | 76 | |`KC_F8` | |F8 |✔ |✔ |✔ | |
77 | |`KC_F9` | |F9 |✔ |✔ |✔ | | 77 | |`KC_F9` | |F9 |✔ |✔ |✔ | |
78 | |`KC_F10` | |F10 |✔ |✔ |✔ | | 78 | |`KC_F10` | |F10 |✔ |✔ |✔ | |
79 | |`KC_F11` | |F11 |✔ |✔ |✔ | | 79 | |`KC_F11` | |F11 |✔ |✔ |✔ | |
80 | |`KC_F12` | |F12 |✔ |✔ |✔ | | 80 | |`KC_F12` | |F12 |✔ |✔ |✔ | |
81 | |`KC_PSCREEN` |`KC_PSCR` |Print Screen |✔ |✔<sup>2</sup>|✔ | | 81 | |`KC_PRINT_SCREEN` |`KC_PSCR` |Print Screen |✔ |✔<sup>2</sup>|✔ | |
82 | |`KC_SCROLLLOCK` |`KC_SLCK`, `KC_BRMD` |Scroll Lock, Brightness Down (macOS) |✔ |✔<sup>2</sup>|✔ | | 82 | |`KC_SCROLL_LOCK` |`KC_SCRL`, `KC_BRMD` |Scroll Lock, Brightness Down (macOS) |✔ |✔<sup>2</sup>|✔ | |
83 | |`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU`|Pause, Brightness Up (macOS) |✔ |✔<sup>2</sup>|✔ | | 83 | |`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU` |Pause, Brightness Up (macOS) |✔ |✔<sup>2</sup>|✔ | |
84 | |`KC_INSERT` |`KC_INS` |Insert |✔ | |✔ | | 84 | |`KC_INSERT` |`KC_INS` |Insert |✔ | |✔ | |
85 | |`KC_HOME` | |Home |✔ |✔ |✔ | | 85 | |`KC_HOME` | |Home |✔ |✔ |✔ | |
86 | |`KC_PGUP` | |Page Up |✔ |✔ |✔ | | 86 | |`KC_PAGE_UP` |`KC_PGUP` |Page Up |✔ |✔ |✔ | |
87 | |`KC_DELETE` |`KC_DEL` |Forward Delete |✔ |✔ |✔ | | 87 | |`KC_DELETE` |`KC_DEL` |Forward Delete |✔ |✔ |✔ | |
88 | |`KC_END` | |End |✔ |✔ |✔ | | 88 | |`KC_END` | |End |✔ |✔ |✔ | |
89 | |`KC_PGDOWN` |`KC_PGDN` |Page Down |✔ |✔ |✔ | | 89 | |`KC_PAGE_DOWN` |`KC_PGDN` |Page Down |✔ |✔ |✔ | |
90 | |`KC_RIGHT` |`KC_RGHT` |Right Arrow |✔ |✔ |✔ | | 90 | |`KC_RIGHT` |`KC_RGHT` |Right Arrow |✔ |✔ |✔ | |
91 | |`KC_LEFT` | |Left Arrow |✔ |✔ |✔ | | 91 | |`KC_LEFT` | |Left Arrow |✔ |✔ |✔ | |
92 | |`KC_DOWN` | |Down Arrow |✔ |✔ |✔ | | 92 | |`KC_DOWN` | |Down Arrow |✔ |✔ |✔ | |
93 | |`KC_UP` | |Up Arrow |✔ |✔ |✔ | | 93 | |`KC_UP` | |Up Arrow |✔ |✔ |✔ | |
94 | |`KC_NUMLOCK` |`KC_NLCK` |Keypad Num Lock and Clear |✔ |✔ |✔ | | 94 | |`KC_NUM_LOCK` |`KC_NUM` |Keypad Num Lock and Clear |✔ |✔ |✔ | |
95 | |`KC_KP_SLASH` |`KC_PSLS` |Keypad `/` |✔ |✔ |✔ | | 95 | |`KC_KP_SLASH` |`KC_PSLS` |Keypad `/` |✔ |✔ |✔ | |
96 | |`KC_KP_ASTERISK` |`KC_PAST` |Keypad `*` |✔ |✔ |✔ | | 96 | |`KC_KP_ASTERISK` |`KC_PAST` |Keypad `*` |✔ |✔ |✔ | |
97 | |`KC_KP_MINUS` |`KC_PMNS` |Keypad `-` |✔ |✔ |✔ | | 97 | |`KC_KP_MINUS` |`KC_PMNS` |Keypad `-` |✔ |✔ |✔ | |
98 | |`KC_KP_PLUS` |`KC_PPLS` |Keypad `+` |✔ |✔ |✔ | | 98 | |`KC_KP_PLUS` |`KC_PPLS` |Keypad `+` |✔ |✔ |✔ | |
99 | |`KC_KP_ENTER` |`KC_PENT` |Keypad Enter |✔ |✔ |✔ | | 99 | |`KC_KP_ENTER` |`KC_PENT` |Keypad Enter |✔ |✔ |✔ | |
100 | |`KC_KP_1` |`KC_P1` |Keypad `1` and End |✔ |✔ |✔ | | 100 | |`KC_KP_1` |`KC_P1` |Keypad `1` and End |✔ |✔ |✔ | |
101 | |`KC_KP_2` |`KC_P2` |Keypad `2` and Down Arrow |✔ |✔ |✔ | | 101 | |`KC_KP_2` |`KC_P2` |Keypad `2` and Down Arrow |✔ |✔ |✔ | |
102 | |`KC_KP_3` |`KC_P3` |Keypad `3` and Page Down |✔ |✔ |✔ | | 102 | |`KC_KP_3` |`KC_P3` |Keypad `3` and Page Down |✔ |✔ |✔ | |
103 | |`KC_KP_4` |`KC_P4` |Keypad `4` and Left Arrow |✔ |✔ |✔ | | 103 | |`KC_KP_4` |`KC_P4` |Keypad `4` and Left Arrow |✔ |✔ |✔ | |
104 | |`KC_KP_5` |`KC_P5` |Keypad `5` |✔ |✔ |✔ | | 104 | |`KC_KP_5` |`KC_P5` |Keypad `5` |✔ |✔ |✔ | |
105 | |`KC_KP_6` |`KC_P6` |Keypad `6` and Right Arrow |✔ |✔ |✔ | | 105 | |`KC_KP_6` |`KC_P6` |Keypad `6` and Right Arrow |✔ |✔ |✔ | |
106 | |`KC_KP_7` |`KC_P7` |Keypad `7` and Home |✔ |✔ |✔ | | 106 | |`KC_KP_7` |`KC_P7` |Keypad `7` and Home |✔ |✔ |✔ | |
107 | |`KC_KP_8` |`KC_P8` |Keypad `8` and Up Arrow |✔ |✔ |✔ | | 107 | |`KC_KP_8` |`KC_P8` |Keypad `8` and Up Arrow |✔ |✔ |✔ | |
108 | |`KC_KP_9` |`KC_P9` |Keypad `9` and Page Up |✔ |✔ |✔ | | 108 | |`KC_KP_9` |`KC_P9` |Keypad `9` and Page Up |✔ |✔ |✔ | |
109 | |`KC_KP_0` |`KC_P0` |Keypad `0` and Insert |✔ |✔ |✔ | | 109 | |`KC_KP_0` |`KC_P0` |Keypad `0` and Insert |✔ |✔ |✔ | |
110 | |`KC_KP_DOT` |`KC_PDOT` |Keypad `.` and Delete |✔ |✔ |✔ | | 110 | |`KC_KP_DOT` |`KC_PDOT` |Keypad `.` and Delete |✔ |✔ |✔ | |
111 | |`KC_NONUS_BSLASH` |`KC_NUBS` |Non-US `\` and `\|` |✔ |✔ |✔ | | 111 | |`KC_NONUS_BACKSLASH` |`KC_NUBS` |Non-US `\` and `\|` |✔ |✔ |✔ | |
112 | |`KC_APPLICATION` |`KC_APP` |Application (Windows Context Menu Key) |✔ | |✔ | | 112 | |`KC_APPLICATION` |`KC_APP` |Application (Windows Context Menu Key) |✔ | |✔ | |
113 | |`KC_POWER` | |System Power | |✔<sup>3</sup>|✔ | | 113 | |`KC_KB_POWER` | |System Power | |✔<sup>3</sup>|✔ | |
114 | |`KC_KP_EQUAL` |`KC_PEQL` |Keypad `=` |✔ |✔ |✔ | | 114 | |`KC_KP_EQUAL` |`KC_PEQL` |Keypad `=` |✔ |✔ |✔ | |
115 | |`KC_F13` | |F13 |✔ |✔ |✔ | | 115 | |`KC_F13` | |F13 |✔ |✔ |✔ | |
116 | |`KC_F14` | |F14 |✔ |✔ |✔ | | 116 | |`KC_F14` | |F14 |✔ |✔ |✔ | |
117 | |`KC_F15` | |F15 |✔ |✔ |✔ | | 117 | |`KC_F15` | |F15 |✔ |✔ |✔ | |
118 | |`KC_F16` | |F16 |✔ |✔ |✔ | | 118 | |`KC_F16` | |F16 |✔ |✔ |✔ | |
119 | |`KC_F17` | |F17 |✔ |✔ |✔ | | 119 | |`KC_F17` | |F17 |✔ |✔ |✔ | |
120 | |`KC_F18` | |F18 |✔ |✔ |✔ | | 120 | |`KC_F18` | |F18 |✔ |✔ |✔ | |
121 | |`KC_F19` | |F19 |✔ |✔ |✔ | | 121 | |`KC_F19` | |F19 |✔ |✔ |✔ | |
122 | |`KC_F20` | |F20 |✔ | |✔ | | 122 | |`KC_F20` | |F20 |✔ | |✔ | |
123 | |`KC_F21` | |F21 |✔ | |✔ | | 123 | |`KC_F21` | |F21 |✔ | |✔ | |
124 | |`KC_F22` | |F22 |✔ | |✔ | | 124 | |`KC_F22` | |F22 |✔ | |✔ | |
125 | |`KC_F23` | |F23 |✔ | |✔ | | 125 | |`KC_F23` | |F23 |✔ | |✔ | |
126 | |`KC_F24` | |F24 |✔ | |✔ | | 126 | |`KC_F24` | |F24 |✔ | |✔ | |
127 | |`KC_EXECUTE` |`KC_EXEC` |Execute | | |✔ | | 127 | |`KC_EXECUTE` |`KC_EXEC` |Execute | | |✔ | |
128 | |`KC_HELP` | |Help | | |✔ | | 128 | |`KC_HELP` | |Help | | |✔ | |
129 | |`KC_MENU` | |Menu | | |✔ | | 129 | |`KC_MENU` | |Menu | | |✔ | |
130 | |`KC_SELECT` |`KC_SLCT` |Select | | |✔ | | 130 | |`KC_SELECT` |`KC_SLCT` |Select | | |✔ | |
131 | |`KC_STOP` | |Stop | | |✔ | | 131 | |`KC_STOP` | |Stop | | |✔ | |
132 | |`KC_AGAIN` |`KC_AGIN` |Again | | |✔ | | 132 | |`KC_AGAIN` |`KC_AGIN` |Again | | |✔ | |
133 | |`KC_UNDO` | |Undo | | |✔ | | 133 | |`KC_UNDO` | |Undo | | |✔ | |
134 | |`KC_CUT` | |Cut | | |✔ | | 134 | |`KC_CUT` | |Cut | | |✔ | |
135 | |`KC_COPY` | |Copy | | |✔ | | 135 | |`KC_COPY` | |Copy | | |✔ | |
136 | |`KC_PASTE` |`KC_PSTE` |Paste | | |✔ | | 136 | |`KC_PASTE` |`KC_PSTE` |Paste | | |✔ | |
137 | |`KC_FIND` | |Find | | |✔ | | 137 | |`KC_FIND` | |Find | | |✔ | |
138 | |`KC__MUTE` | |Mute | |✔ |✔ | | 138 | |`KC_KB_MUTE` | |Mute | |✔ |✔ | |
139 | |`KC__VOLUP` | |Volume Up | |✔ |✔ | | 139 | |`KC_KB_VOLUME_UP` | |Volume Up | |✔ |✔ | |
140 | |`KC__VOLDOWN` | |Volume Down | |✔ |✔ | | 140 | |`KC_KB_VOLUME_DOWN` | |Volume Down | |✔ |✔ | |
141 | |`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock |✔ |✔ | | | 141 | |`KC_LOCKING_CAPS_LOCK` |`KC_LCAP` |Locking Caps Lock |✔ |✔ | | |
142 | |`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock |✔ |✔ | | | 142 | |`KC_LOCKING_NUM_LOCK` |`KC_LNUM` |Locking Num Lock |✔ |✔ | | |
143 | |`KC_LOCKING_SCROLL` |`KC_LSCR` |Locking Scroll Lock |✔ |✔ | | | 143 | |`KC_LOCKING_SCROLL_LOCK`|`KC_LSCR` |Locking Scroll Lock |✔ |✔ | | |
144 | |`KC_KP_COMMA` |`KC_PCMM` |Keypad `,` | | |✔ | | 144 | |`KC_KP_COMMA` |`KC_PCMM` |Keypad `,` | | |✔ | |
145 | |`KC_KP_EQUAL_AS400` | |Keypad `=` on AS/400 keyboards | | | | | 145 | |`KC_KP_EQUAL_AS400` | |Keypad `=` on AS/400 keyboards | | | | |
146 | |`KC_INT1` |`KC_RO` |JIS `\` and `_` |✔ | |✔ | | 146 | |`KC_INTERNATIONAL_1` |`KC_INT1` |International 1 |✔ | |✔ | |
147 | |`KC_INT2` |`KC_KANA` |JIS Katakana/Hiragana |✔ | |✔ | | 147 | |`KC_INTERNATIONAL_2` |`KC_INT2` |International 2 |✔ | |✔ | |
148 | |`KC_INT3` |`KC_JYEN` |JIS `¥` and `\|` |✔ | |✔ | | 148 | |`KC_INTERNATIONAL_3` |`KC_INT3` |International 3 |✔ | |✔ | |
149 | |`KC_INT4` |`KC_HENK` |JIS Henkan |✔ | |✔ | | 149 | |`KC_INTERNATIONAL_4` |`KC_INT4` |International 4 |✔ | |✔ | |
150 | |`KC_INT5` |`KC_MHEN` |JIS Muhenkan |✔ | |✔ | | 150 | |`KC_INTERNATIONAL_5` |`KC_INT5` |International 5 |✔ | |✔ | |
151 | |`KC_INT6` | |JIS Numpad `,` | | |✔ | | 151 | |`KC_INTERNATIONAL_6` |`KC_INT6` |International 6 | | |✔ | |
152 | |`KC_INT7` | |International 7 | | | | | 152 | |`KC_INTERNATIONAL_7` |`KC_INT7` |International 7 | | | | |
153 | |`KC_INT8` | |International 8 | | | | | 153 | |`KC_INTERNATIONAL_8` |`KC_INT8` |International 8 | | | | |
154 | |`KC_INT9` | |International 9 | | | | | 154 | |`KC_INTERNATIONAL_9` |`KC_INT9` |International 9 | | | | |
155 | |`KC_LANG1` |`KC_HAEN` |Hangul/English | | |✔ | | 155 | |`KC_LANGUAGE_1` |`KC_LNG1` |Language 1 | | |✔ | |
156 | |`KC_LANG2` |`KC_HANJ` |Hanja | | |✔ | | 156 | |`KC_LANGUAGE_2` |`KC_LNG2` |Language 2 | | |✔ | |
157 | |`KC_LANG3` | |JIS Katakana | | |✔ | | 157 | |`KC_LANGUAGE_3` |`KC_LNG3` |Language 3 | | |✔ | |
158 | |`KC_LANG4` | |JIS Hiragana | | |✔ | | 158 | |`KC_LANGUAGE_4` |`KC_LNG4` |Language 4 | | |✔ | |
159 | |`KC_LANG5` | |JIS Zenkaku/Hankaku | | |✔ | | 159 | |`KC_LANGUAGE_5` |`KC_LNG5` |Language 5 | | |✔ | |
160 | |`KC_LANG6` | |Language 6 | | | | | 160 | |`KC_LANGUAGE_6` |`KC_LNG6` |Language 6 | | | | |
161 | |`KC_LANG7` | |Language 7 | | | | | 161 | |`KC_LANGUAGE_7` |`KC_LNG7` |Language 7 | | | | |
162 | |`KC_LANG8` | |Language 8 | | | | | 162 | |`KC_LANGUAGE_8` |`KC_LNG8` |Language 8 | | | | |
163 | |`KC_LANG9` | |Language 9 | | | | | 163 | |`KC_LANGUAGE_9` |`KC_LNG9` |Language 9 | | | | |
164 | |`KC_ALT_ERASE` |`KC_ERAS` |Alternate Erase | | | | | 164 | |`KC_ALTERNATE_ERASE` |`KC_ERAS` |Alternate Erase | | | | |
165 | |`KC_SYSREQ` | |SysReq/Attention | | | | | 165 | |`KC_SYSTEM_REQUEST` |`KC_SYRQ` |SysReq/Attention | | | | |
166 | |`KC_CANCEL` | |Cancel | | | | | 166 | |`KC_CANCEL` |`KC_CNCL` |Cancel | | | | |
167 | |`KC_CLEAR` |`KC_CLR` |Clear | | |✔ | | 167 | |`KC_CLEAR` |`KC_CLR` |Clear | | |✔ | |
168 | |`KC_PRIOR` | |Prior | | | | | 168 | |`KC_PRIOR` |`KC_PRIR` |Prior | | | | |
169 | |`KC_RETURN` | |Return | | | | | 169 | |`KC_RETURN` |`KC_RETN` |Return | | | | |
170 | |`KC_SEPARATOR` | |Separator | | | | | 170 | |`KC_SEPARATOR` |`KC_SEPR` |Separator | | | | |
171 | |`KC_OUT` | |Out | | | | | 171 | |`KC_OUT` | |Out | | | | |
172 | |`KC_OPER` | |Oper | | | | | 172 | |`KC_OPER` | |Oper | | | | |
173 | |`KC_CLEAR_AGAIN` | |Clear/Again | | | | | 173 | |`KC_CLEAR_AGAIN` |`KC_CLAG` |Clear/Again | | | | |
174 | |`KC_CRSEL` | |CrSel/Props | | | | | 174 | |`KC_CRSEL` |`KC_CRSL` |CrSel/Props | | | | |
175 | |`KC_EXSEL` | |ExSel | | | | | 175 | |`KC_EXSEL` |`KC_EXSL` |ExSel | | | | |
176 | |`KC_LCTRL` |`KC_LCTL` |Left Control |✔ |✔ |✔ | | 176 | |`KC_LEFT_CTRL` |`KC_LCTL` |Left Control |✔ |✔ |✔ | |
177 | |`KC_LSHIFT` |`KC_LSFT` |Left Shift |✔ |✔ |✔ | | 177 | |`KC_LEFT_SHIFT` |`KC_LSFT` |Left Shift |✔ |✔ |✔ | |
178 | |`KC_LALT` |`KC_LOPT` |Left Alt (Option) |✔ |✔ |✔ | | 178 | |`KC_LEFT_ALT` |`KC_LALT`, `KC_LOPT` |Left Alt (Option) |✔ |✔ |✔ | |
179 | |`KC_LGUI` |`KC_LCMD`, `KC_LWIN` |Left GUI (Windows/Command/Meta key) |✔ |✔ |✔ | | 179 | |`KC_LEFT_GUI` |`KC_LGUI`, `KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) |✔ |✔ |✔ | |
180 | |`KC_RCTRL` |`KC_RCTL` |Right Control |✔ |✔ |✔ | | 180 | |`KC_RIGHT_CTRL` |`KC_RCTL` |Right Control |✔ |✔ |✔ | |
181 | |`KC_RSHIFT` |`KC_RSFT` |Right Shift |✔ |✔ |✔ | | 181 | |`KC_RIGHT_SHIFT` |`KC_RSFT` |Right Shift |✔ |✔ |✔ | |
182 | |`KC_RALT` |`KC_ROPT`, `KC_ALGR` |Right Alt (Option/AltGr) |✔ |✔ |✔ | | 182 | |`KC_RIGHT_ALT` |`KC_RALT`, `KC_ROPT`, `KC_ALGR`|Right Alt (Option/AltGr) |✔ |✔ |✔ | |
183 | |`KC_RGUI` |`KC_RCMD`, `KC_RWIN` |Right GUI (Windows/Command/Meta key) |✔ |✔ |✔ | | 183 | |`KC_RIGHT_GUI` |`KC_RGUI`, `KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key) |✔ |✔ |✔ | |
184 | |`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down |✔ |✔<sup>3</sup>|✔ | | 184 | |`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down |✔ |✔<sup>3</sup>|✔ | |
185 | |`KC_SYSTEM_SLEEP` |`KC_SLEP` |System Sleep |✔ |✔<sup>3</sup>|✔ | | 185 | |`KC_SYSTEM_SLEEP` |`KC_SLEP` |System Sleep |✔ |✔<sup>3</sup>|✔ | |
186 | |`KC_SYSTEM_WAKE` |`KC_WAKE` |System Wake | |✔<sup>3</sup>|✔ | | 186 | |`KC_SYSTEM_WAKE` |`KC_WAKE` |System Wake | |✔<sup>3</sup>|✔ | |
187 | |`KC_AUDIO_MUTE` |`KC_MUTE` |Mute |✔ |✔ |✔ | | 187 | |`KC_AUDIO_MUTE` |`KC_MUTE` |Mute |✔ |✔ |✔ | |
188 | |`KC_AUDIO_VOL_UP` |`KC_VOLU` |Volume Up |✔ |✔<sup>4</sup>|✔ | | 188 | |`KC_AUDIO_VOL_UP` |`KC_VOLU` |Volume Up |✔ |✔<sup>4</sup>|✔ | |
189 | |`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |Volume Down |✔ |✔<sup>4</sup>|✔ | | 189 | |`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |Volume Down |✔ |✔<sup>4</sup>|✔ | |
190 | |`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |Next Track |✔ |✔<sup>5</sup>|✔ | | 190 | |`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |Next Track |✔ |✔<sup>5</sup>|✔ | |
191 | |`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |Previous Track |✔ |✔<sup>5</sup>|✔ | | 191 | |`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |Previous Track |✔ |✔<sup>5</sup>|✔ | |
192 | |`KC_MEDIA_STOP` |`KC_MSTP` |Stop Track |✔ | |✔ | | 192 | |`KC_MEDIA_STOP` |`KC_MSTP` |Stop Track |✔ | |✔ | |
193 | |`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |Play/Pause Track |✔ |✔ |✔ | | 193 | |`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |Play/Pause Track |✔ |✔ |✔ | |
194 | |`KC_MEDIA_SELECT` |`KC_MSEL` |Launch Media Player |✔ | |✔ | | 194 | |`KC_MEDIA_SELECT` |`KC_MSEL` |Launch Media Player |✔ | |✔ | |
195 | |`KC_MEDIA_EJECT` |`KC_EJCT` |Eject | |✔ |✔ | | 195 | |`KC_MEDIA_EJECT` |`KC_EJCT` |Eject | |✔ |✔ | |
196 | |`KC_MAIL` | |Launch Mail |✔ | |✔ | | 196 | |`KC_MAIL` | |Launch Mail |✔ | |✔ | |
197 | |`KC_CALCULATOR` |`KC_CALC` |Launch Calculator |✔ | |✔ | | 197 | |`KC_CALCULATOR` |`KC_CALC` |Launch Calculator |✔ | |✔ | |
198 | |`KC_MY_COMPUTER` |`KC_MYCM` |Launch My Computer |✔ | |✔ | | 198 | |`KC_MY_COMPUTER` |`KC_MYCM` |Launch My Computer |✔ | |✔ | |
199 | |`KC_WWW_SEARCH` |`KC_WSCH` |Browser Search |✔ | |✔ | | 199 | |`KC_WWW_SEARCH` |`KC_WSCH` |Browser Search |✔ | |✔ | |
200 | |`KC_WWW_HOME` |`KC_WHOM` |Browser Home |✔ | |✔ | | 200 | |`KC_WWW_HOME` |`KC_WHOM` |Browser Home |✔ | |✔ | |
201 | |`KC_WWW_BACK` |`KC_WBAK` |Browser Back |✔ | |✔ | | 201 | |`KC_WWW_BACK` |`KC_WBAK` |Browser Back |✔ | |✔ | |
202 | |`KC_WWW_FORWARD` |`KC_WFWD` |Browser Forward |✔ | |✔ | | 202 | |`KC_WWW_FORWARD` |`KC_WFWD` |Browser Forward |✔ | |✔ | |
203 | |`KC_WWW_STOP` |`KC_WSTP` |Browser Stop |✔ | |✔ | | 203 | |`KC_WWW_STOP` |`KC_WSTP` |Browser Stop |✔ | |✔ | |
204 | |`KC_WWW_REFRESH` |`KC_WREF` |Browser Refresh |✔ | |✔ | | 204 | |`KC_WWW_REFRESH` |`KC_WREF` |Browser Refresh |✔ | |✔ | |
205 | |`KC_WWW_FAVORITES` |`KC_WFAV` |Browser Favorites |✔ | |✔ | | 205 | |`KC_WWW_FAVORITES` |`KC_WFAV` |Browser Favorites |✔ | |✔ | |
206 | |`KC_MEDIA_FAST_FORWARD`|`KC_MFFD` |Next Track |✔ |✔<sup>5</sup>|✔ | | 206 | |`KC_MEDIA_FAST_FORWARD` |`KC_MFFD` |Next Track |✔ |✔<sup>5</sup>|✔ | |
207 | |`KC_MEDIA_REWIND` |`KC_MRWD` |Previous Track |✔<sup>6</sup>|✔<sup>5</sup>|✔ | | 207 | |`KC_MEDIA_REWIND` |`KC_MRWD` |Previous Track |✔<sup>6</sup>|✔<sup>5</sup>|✔ | |
208 | |`KC_BRIGHTNESS_UP` |`KC_BRIU` |Brightness Up |✔ |✔ |✔ | | 208 | |`KC_BRIGHTNESS_UP` |`KC_BRIU` |Brightness Up |✔ |✔ |✔ | |
209 | |`KC_BRIGHTNESS_DOWN` |`KC_BRID` |Brightness Down |✔ |✔ |✔ | | 209 | |`KC_BRIGHTNESS_DOWN` |`KC_BRID` |Brightness Down |✔ |✔ |✔ | |
210 | 210 | ||
211 | <sup>1. The Linux kernel HID driver recognizes [nearly all keycodes](https://github.com/torvalds/linux/blob/master/drivers/hid/hid-input.c), but the default bindings depend on the DE/WM.</sup><br/> | 211 | <sup>1. The Linux kernel HID driver recognizes [nearly all keycodes](https://github.com/torvalds/linux/blob/master/drivers/hid/hid-input.c), but the default bindings depend on the DE/WM.</sup><br/> |
212 | <sup>2. Treated as F13-F15.</sup><br/> | 212 | <sup>2. Treated as F13-F15.</sup><br/> |
@@ -678,6 +678,46 @@ See also: [One Shot Keys](one_shot_keys.md) | |||
678 | |`OS_OFF` |Turns One Shot keys off | | 678 | |`OS_OFF` |Turns One Shot keys off | |
679 | |`OS_TOGG` |Toggles One Shot keys status | | 679 | |`OS_TOGG` |Toggles One Shot keys status | |
680 | 680 | ||
681 | ## Programmable Button Support :id=programmable-button | ||
682 | |||
683 | See also: [Programmable Button](feature_programmable_button.md) | ||
684 | |||
685 | |Key |Description | | ||
686 | |------------------------|----------------------| | ||
687 | |`PROGRAMMABLE_BUTTON_1` |Programmable button 1 | | ||
688 | |`PROGRAMMABLE_BUTTON_2` |Programmable button 2 | | ||
689 | |`PROGRAMMABLE_BUTTON_3` |Programmable button 3 | | ||
690 | |`PROGRAMMABLE_BUTTON_4` |Programmable button 4 | | ||
691 | |`PROGRAMMABLE_BUTTON_5` |Programmable button 5 | | ||
692 | |`PROGRAMMABLE_BUTTON_6` |Programmable button 6 | | ||
693 | |`PROGRAMMABLE_BUTTON_7` |Programmable button 7 | | ||
694 | |`PROGRAMMABLE_BUTTON_8` |Programmable button 8 | | ||
695 | |`PROGRAMMABLE_BUTTON_9` |Programmable button 9 | | ||
696 | |`PROGRAMMABLE_BUTTON_10`|Programmable button 10| | ||
697 | |`PROGRAMMABLE_BUTTON_11`|Programmable button 11| | ||
698 | |`PROGRAMMABLE_BUTTON_12`|Programmable button 12| | ||
699 | |`PROGRAMMABLE_BUTTON_13`|Programmable button 13| | ||
700 | |`PROGRAMMABLE_BUTTON_14`|Programmable button 14| | ||
701 | |`PROGRAMMABLE_BUTTON_15`|Programmable button 15| | ||
702 | |`PROGRAMMABLE_BUTTON_16`|Programmable button 16| | ||
703 | |`PROGRAMMABLE_BUTTON_17`|Programmable button 17| | ||
704 | |`PROGRAMMABLE_BUTTON_18`|Programmable button 18| | ||
705 | |`PROGRAMMABLE_BUTTON_19`|Programmable button 19| | ||
706 | |`PROGRAMMABLE_BUTTON_20`|Programmable button 20| | ||
707 | |`PROGRAMMABLE_BUTTON_21`|Programmable button 21| | ||
708 | |`PROGRAMMABLE_BUTTON_22`|Programmable button 22| | ||
709 | |`PROGRAMMABLE_BUTTON_23`|Programmable button 23| | ||
710 | |`PROGRAMMABLE_BUTTON_24`|Programmable button 24| | ||
711 | |`PROGRAMMABLE_BUTTON_25`|Programmable button 25| | ||
712 | |`PROGRAMMABLE_BUTTON_26`|Programmable button 26| | ||
713 | |`PROGRAMMABLE_BUTTON_27`|Programmable button 27| | ||
714 | |`PROGRAMMABLE_BUTTON_28`|Programmable button 28| | ||
715 | |`PROGRAMMABLE_BUTTON_29`|Programmable button 29| | ||
716 | |`PROGRAMMABLE_BUTTON_30`|Programmable button 30| | ||
717 | |`PROGRAMMABLE_BUTTON_31`|Programmable button 31| | ||
718 | |`PROGRAMMABLE_BUTTON_32`|Programmable button 32| | ||
719 | |`PB_1` to `PB_32` |Aliases for keymaps | | ||
720 | |||
681 | ## Space Cadet :id=space-cadet | 721 | ## Space Cadet :id=space-cadet |
682 | 722 | ||
683 | See also: [Space Cadet](feature_space_cadet.md) | 723 | See also: [Space Cadet](feature_space_cadet.md) |
diff --git a/docs/keycodes_basic.md b/docs/keycodes_basic.md index 6a31204f3..6f6ef7a3f 100644 --- a/docs/keycodes_basic.md +++ b/docs/keycodes_basic.md | |||
@@ -74,118 +74,118 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07 | |||
74 | 74 | ||
75 | ## Punctuation | 75 | ## Punctuation |
76 | 76 | ||
77 | |Key |Aliases |Description | | 77 | |Key |Aliases |Description | |
78 | |-----------------|-------------------|-----------------------------------------------| | 78 | |--------------------|---------|--------------------------| |
79 | |`KC_ENTER` |`KC_ENT` |Return (Enter) | | 79 | |`KC_ENTER` |`KC_ENT` |Return (Enter) | |
80 | |`KC_ESCAPE` |`KC_ESC` |Escape | | 80 | |`KC_ESCAPE` |`KC_ESC` |Escape | |
81 | |`KC_BSPACE` |`KC_BSPC` |Delete (Backspace) | | 81 | |`KC_BACKSPACE` |`KC_BSPC`|Delete (Backspace) | |
82 | |`KC_TAB` | |Tab | | 82 | |`KC_TAB` | |Tab | |
83 | |`KC_SPACE` |`KC_SPC` |Spacebar | | 83 | |`KC_SPACE` |`KC_SPC` |Spacebar | |
84 | |`KC_MINUS` |`KC_MINS` |`-` and `_` | | 84 | |`KC_MINUS` |`KC_MINS`|`-` and `_` | |
85 | |`KC_EQUAL` |`KC_EQL` |`=` and `+` | | 85 | |`KC_EQUAL` |`KC_EQL` |`=` and `+` | |
86 | |`KC_LBRACKET` |`KC_LBRC` |`[` and `{` | | 86 | |`KC_LEFT_BRACKET` |`KC_LBRC`|`[` and `{` | |
87 | |`KC_RBRACKET` |`KC_RBRC` |`]` and `}` | | 87 | |`KC_RIGHT_BRACKET` |`KC_RBRC`|`]` and `}` | |
88 | |`KC_BSLASH` |`KC_BSLS` |`\` and `\|` | | 88 | |`KC_BACKSLASH` |`KC_BSLS`|`\` and `\|` | |
89 | |`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` | | 89 | |`KC_NONUS_HASH` |`KC_NUHS`|Non-US `#` and `~` | |
90 | |`KC_SCOLON` |`KC_SCLN` |`;` and `:` | | 90 | |`KC_SEMICOLON` |`KC_SCLN`|`;` and `:` | |
91 | |`KC_QUOTE` |`KC_QUOT` |`'` and `"` | | 91 | |`KC_QUOTE` |`KC_QUOT`|`'` and `"` | |
92 | |`KC_GRAVE` |`KC_GRV`, `KC_ZKHK`|<code>`</code> and `~`, JIS Zenkaku/Hankaku| | 92 | |`KC_GRAVE` |`KC_GRV` |<code>`</code> and `~`| |
93 | |`KC_COMMA` |`KC_COMM` |`,` and `<` | | 93 | |`KC_COMMA` |`KC_COMM`|`,` and `<` | |
94 | |`KC_DOT` | |`.` and `>` | | 94 | |`KC_DOT` | |`.` and `>` | |
95 | |`KC_SLASH` |`KC_SLSH` |`/` and `?` | | 95 | |`KC_SLASH` |`KC_SLSH`|`/` and `?` | |
96 | |`KC_NONUS_BSLASH`|`KC_NUBS` |Non-US `\` and `\|` | | 96 | |`KC_NONUS_BACKSLASH`|`KC_NUBS`|Non-US `\` and `\|` | |
97 | 97 | ||
98 | ## Lock Keys | 98 | ## Lock Keys |
99 | 99 | ||
100 | |Key |Aliases |Description | | 100 | |Key |Aliases |Description | |
101 | |-------------------|--------------------|------------------------------------| | 101 | |------------------------|--------------------|------------------------------------| |
102 | |`KC_CAPSLOCK` |`KC_CLCK`, `KC_CAPS`|Caps Lock | | 102 | |`KC_CAPS_LOCK` |`KC_CAPS` |Caps Lock | |
103 | |`KC_SCROLLLOCK` |`KC_SLCK`, `KC_BRMD`|Scroll Lock, Brightness Down (macOS)| | 103 | |`KC_SCROLL_LOCK` |`KC_SCRL`, `KC_BRMD`|Scroll Lock, Brightness Down (macOS)| |
104 | |`KC_NUMLOCK` |`KC_NLCK` |Keypad Num Lock and Clear | | 104 | |`KC_NUM_LOCK` |`KC_NUM` |Keypad Num Lock and Clear | |
105 | |`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock | | 105 | |`KC_LOCKING_CAPS_LOCK` |`KC_LCAP` |Locking Caps Lock | |
106 | |`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock | | 106 | |`KC_LOCKING_NUM_LOCK` |`KC_LNUM` |Locking Num Lock | |
107 | |`KC_LOCKING_SCROLL`|`KC_LSCR` |Locking Scroll Lock | | 107 | |`KC_LOCKING_SCROLL_LOCK`|`KC_LSCR` |Locking Scroll Lock | |
108 | 108 | ||
109 | ## Modifiers | 109 | ## Modifiers |
110 | 110 | ||
111 | |Key |Aliases |Description | | 111 | |Key |Aliases |Description | |
112 | |-----------|--------------------|------------------------------------| | 112 | |----------------|-------------------------------|------------------------------------| |
113 | |`KC_LCTRL` |`KC_LCTL` |Left Control | | 113 | |`KC_LEFT_CTRL` |`KC_LCTL` |Left Control | |
114 | |`KC_LSHIFT`|`KC_LSFT` |Left Shift | | 114 | |`KC_LEFT_SHIFT` |`KC_LSFT` |Left Shift | |
115 | |`KC_LALT` |`KC_LOPT` |Left Alt (Option) | | 115 | |`KC_LEFT_ALT` |`KC_LALT`, `KC_LOPT` |Left Alt (Option) | |
116 | |`KC_LGUI` |`KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) | | 116 | |`KC_LEFT_GUI` |`KC_LGUI`, `KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) | |
117 | |`KC_RCTRL` |`KC_RCTL` |Right Control | | 117 | |`KC_RIGHT_CTRL` |`KC_RCTL` |Right Control | |
118 | |`KC_RSHIFT`|`KC_RSFT` |Right Shift | | 118 | |`KC_RIGHT_SHIFT`|`KC_RSFT` |Right Shift | |
119 | |`KC_RALT` |`KC_ROPT`, `KC_ALGR`|Right Alt (Option/AltGr) | | 119 | |`KC_RIGHT_ALT` |`KC_RALT`, `KC_ROPT`, `KC_ALGR`|Right Alt (Option/AltGr) | |
120 | |`KC_RGUI` |`KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key)| | 120 | |`KC_RIGHT_GUI` |`KC_RGUI`, `KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key)| |
121 | 121 | ||
122 | ## International | 122 | ## International |
123 | 123 | ||
124 | |Key |Aliases |Description | | 124 | |Key |Aliases |Description | |
125 | |----------|---------|---------------------| | 125 | |--------------------|---------|---------------------| |
126 | |`KC_INT1` |`KC_RO` |JIS `\` and `_` | | 126 | |`KC_INTERNATIONAL_1`|`KC_INT1`|JIS `\` and `_` | |
127 | |`KC_INT2` |`KC_KANA`|JIS Katakana/Hiragana| | 127 | |`KC_INTERNATIONAL_2`|`KC_INT2`|JIS Katakana/Hiragana| |
128 | |`KC_INT3` |`KC_JYEN`|JIS `¥` and `\|` | | 128 | |`KC_INTERNATIONAL_3`|`KC_INT3`|JIS `¥` and `\|` | |
129 | |`KC_INT4` |`KC_HENK`|JIS Henkan | | 129 | |`KC_INTERNATIONAL_4`|`KC_INT4`|JIS Henkan | |
130 | |`KC_INT5` |`KC_MHEN`|JIS Muhenkan | | 130 | |`KC_INTERNATIONAL_5`|`KC_INT5`|JIS Muhenkan | |
131 | |`KC_INT6` | |JIS Numpad `,` | | 131 | |`KC_INTERNATIONAL_6`|`KC_INT6`|JIS Numpad `,` | |
132 | |`KC_INT7` | |International 7 | | 132 | |`KC_INTERNATIONAL_7`|`KC_INT7`|International 7 | |
133 | |`KC_INT8` | |International 8 | | 133 | |`KC_INTERNATIONAL_8`|`KC_INT8`|International 8 | |
134 | |`KC_INT9` | |International 9 | | 134 | |`KC_INTERNATIONAL_9`|`KC_INT9`|International 9 | |
135 | |`KC_LANG1`|`KC_HAEN`|Hangul/English | | 135 | |`KC_LANGUAGE_1` |`KC_LNG1`|Hangul/English | |
136 | |`KC_LANG2`|`KC_HANJ`|Hanja | | 136 | |`KC_LANGUAGE_2` |`KC_LNG2`|Hanja | |
137 | |`KC_LANG3`| |JIS Katakana | | 137 | |`KC_LANGUAGE_3` |`KC_LNG3`|JIS Katakana | |
138 | |`KC_LANG4`| |JIS Hiragana | | 138 | |`KC_LANGUAGE_4` |`KC_LNG4`|JIS Hiragana | |
139 | |`KC_LANG5`| |JIS Zenkaku/Hankaku | | 139 | |`KC_LANGUAGE_5` |`KC_LNG5`|JIS Zenkaku/Hankaku | |
140 | |`KC_LANG6`| |Language 6 | | 140 | |`KC_LANGUAGE_6` |`KC_LNG6`|Language 6 | |
141 | |`KC_LANG7`| |Language 7 | | 141 | |`KC_LANGUAGE_7` |`KC_LNG7`|Language 7 | |
142 | |`KC_LANG8`| |Language 8 | | 142 | |`KC_LANGUAGE_8` |`KC_LNG8`|Language 8 | |
143 | |`KC_LANG9`| |Language 9 | | 143 | |`KC_LANGUAGE_9` |`KC_LNG9`|Language 9 | |
144 | 144 | ||
145 | ## Commands | 145 | ## Commands |
146 | 146 | ||
147 | |Key |Aliases |Description | | 147 | |Key |Aliases |Description | |
148 | |------------------|------------------------------|--------------------------------------| | 148 | |--------------------|------------------------------|--------------------------------------| |
149 | |`KC_PSCREEN` |`KC_PSCR` |Print Screen | | 149 | |`KC_PRINT_SCREEN` |`KC_PSCR` |Print Screen | |
150 | |`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU`|Pause, Brightness Up (macOS) | | 150 | |`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU`|Pause, Brightness Up (macOS) | |
151 | |`KC_INSERT` |`KC_INS` |Insert | | 151 | |`KC_INSERT` |`KC_INS` |Insert | |
152 | |`KC_HOME` | |Home | | 152 | |`KC_HOME` | |Home | |
153 | |`KC_PGUP` | |Page Up | | 153 | |`KC_PAGE_UP` |`KC_PGUP` |Page Up | |
154 | |`KC_DELETE` |`KC_DEL` |Forward Delete | | 154 | |`KC_DELETE` |`KC_DEL` |Forward Delete | |
155 | |`KC_END` | |End | | 155 | |`KC_END` | |End | |
156 | |`KC_PGDOWN` |`KC_PGDN` |Page Down | | 156 | |`KC_PAGE_DOWN` |`KC_PGDN` |Page Down | |
157 | |`KC_RIGHT` |`KC_RGHT` |Right Arrow | | 157 | |`KC_RIGHT` |`KC_RGHT` |Right Arrow | |
158 | |`KC_LEFT` | |Left Arrow | | 158 | |`KC_LEFT` | |Left Arrow | |
159 | |`KC_DOWN` | |Down Arrow | | 159 | |`KC_DOWN` | |Down Arrow | |
160 | |`KC_UP` | |Up Arrow | | 160 | |`KC_UP` | |Up Arrow | |
161 | |`KC_APPLICATION` |`KC_APP` |Application (Windows Context Menu Key)| | 161 | |`KC_APPLICATION` |`KC_APP` |Application (Windows Context Menu Key)| |
162 | |`KC_POWER` | |System Power | | 162 | |`KC_KB_POWER` | |System Power | |
163 | |`KC_EXECUTE` |`KC_EXEC` |Execute | | 163 | |`KC_EXECUTE` |`KC_EXEC` |Execute | |
164 | |`KC_HELP` | |Help | | 164 | |`KC_HELP` | |Help | |
165 | |`KC_MENU` | |Menu | | 165 | |`KC_MENU` | |Menu | |
166 | |`KC_SELECT` |`KC_SLCT` |Select | | 166 | |`KC_SELECT` |`KC_SLCT` |Select | |
167 | |`KC_STOP` | |Stop | | 167 | |`KC_STOP` | |Stop | |
168 | |`KC_AGAIN` |`KC_AGIN` |Again | | 168 | |`KC_AGAIN` |`KC_AGIN` |Again | |
169 | |`KC_UNDO` | |Undo | | 169 | |`KC_UNDO` | |Undo | |
170 | |`KC_CUT` | |Cut | | 170 | |`KC_CUT` | |Cut | |
171 | |`KC_COPY` | |Copy | | 171 | |`KC_COPY` | |Copy | |
172 | |`KC_PASTE` |`KC_PSTE` |Paste | | 172 | |`KC_PASTE` |`KC_PSTE` |Paste | |
173 | |`KC_FIND` | |Find | | 173 | |`KC_FIND` | |Find | |
174 | |`KC__MUTE` | |Mute | | 174 | |`KC_KB_MUTE` | |Mute | |
175 | |`KC__VOLUP` | |Volume Up | | 175 | |`KC_KB_VOLUME_UP` | |Volume Up | |
176 | |`KC__VOLDOWN` | |Volume Down | | 176 | |`KC_KB_VOLUME_DOWN` | |Volume Down | |
177 | |`KC_ALT_ERASE` |`KC_ERAS` |Alternate Erase | | 177 | |`KC_ALTERNATE_ERASE`|`KC_ERAS` |Alternate Erase | |
178 | |`KC_SYSREQ` | |SysReq/Attention | | 178 | |`KC_SYSTEM_REQUEST` |`KC_SYRQ` |SysReq/Attention | |
179 | |`KC_CANCEL` | |Cancel | | 179 | |`KC_CANCEL` |`KC_CNCL` |Cancel | |
180 | |`KC_CLEAR` |`KC_CLR` |Clear | | 180 | |`KC_CLEAR` |`KC_CLR` |Clear | |
181 | |`KC_PRIOR` | |Prior | | 181 | |`KC_PRIOR` |`KC_PRIR` |Prior | |
182 | |`KC_RETURN` | |Return | | 182 | |`KC_RETURN` |`KC_RETN` |Return | |
183 | |`KC_SEPARATOR` | |Separator | | 183 | |`KC_SEPARATOR` |`KC_SEPR` |Separator | |
184 | |`KC_OUT` | |Out | | 184 | |`KC_OUT` | |Out | |
185 | |`KC_OPER` | |Oper | | 185 | |`KC_OPER` | |Oper | |
186 | |`KC_CLEAR_AGAIN` | |Clear/Again | | 186 | |`KC_CLEAR_AGAIN` |`KC_CLAG` |Clear/Again | |
187 | |`KC_CRSEL` | |CrSel/Props | | 187 | |`KC_CRSEL` |`KC_CRSL` |CrSel/Props | |
188 | |`KC_EXSEL` | |ExSel | | 188 | |`KC_EXSEL` |`KC_EXSL` |ExSel | |
189 | 189 | ||
190 | ## Media Keys | 190 | ## Media Keys |
191 | 191 | ||
diff --git a/docs/keymap.md b/docs/keymap.md index ef476e87f..bec781e68 100644 --- a/docs/keymap.md +++ b/docs/keymap.md | |||
@@ -105,7 +105,7 @@ At the top of the file you'll find this: | |||
105 | #include QMK_KEYBOARD_H | 105 | #include QMK_KEYBOARD_H |
106 | 106 | ||
107 | // Helpful defines | 107 | // Helpful defines |
108 | #define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) | 108 | #define GRAVE_MODS (MOD_BIT(KC_LSFT)|MOD_BIT(KC_RSFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) |
109 | 109 | ||
110 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | 110 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
111 | * You can use _______ in place for KC_TRNS (transparent) * | 111 | * You can use _______ in place for KC_TRNS (transparent) * |
@@ -164,7 +164,7 @@ Our function layer is, from a code point of view, no different from the base lay | |||
164 | 164 | ||
165 | [_FL] = LAYOUT( | 165 | [_FL] = LAYOUT( |
166 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ | 166 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ |
167 | _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ | 167 | _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SCRL, KC_PAUS, _______, _______, _______, _______, \ |
168 | _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ | 168 | _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ |
169 | _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ | 169 | _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ |
170 | _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), | 170 | _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), |
diff --git a/docs/newbs_git_resynchronize_a_branch.md b/docs/newbs_git_resynchronize_a_branch.md index 3e7acdba7..1d0e4dda1 100644 --- a/docs/newbs_git_resynchronize_a_branch.md +++ b/docs/newbs_git_resynchronize_a_branch.md | |||
@@ -8,7 +8,7 @@ Suppose you have committed to your `master` branch, and now need to update your | |||
8 | 8 | ||
9 | No one wants to lose work if it can be helped. If you want to save the changes you've already made to your `master` branch, the simplest way to do so is to simply create a duplicate of your "dirty" `master` branch: | 9 | No one wants to lose work if it can be helped. If you want to save the changes you've already made to your `master` branch, the simplest way to do so is to simply create a duplicate of your "dirty" `master` branch: |
10 | 10 | ||
11 | ```sh | 11 | ``` |
12 | git branch old_master master | 12 | git branch old_master master |
13 | ``` | 13 | ``` |
14 | 14 | ||
@@ -18,7 +18,7 @@ Now you have a branch named `old_master` that is a duplicate of your `master` br | |||
18 | 18 | ||
19 | Now it's time to resynchronize your `master` branch. For this step, you'll want to have QMK's repository configured as a remote in Git. To check your configured remotes, run `git remote -v`, which should return something similar to: | 19 | Now it's time to resynchronize your `master` branch. For this step, you'll want to have QMK's repository configured as a remote in Git. To check your configured remotes, run `git remote -v`, which should return something similar to: |
20 | 20 | ||
21 | ```sh | 21 | ``` |
22 | QMKuser ~/qmk_firmware (master) | 22 | QMKuser ~/qmk_firmware (master) |
23 | $ git remote -v | 23 | $ git remote -v |
24 | origin https://github.com/<your_username>/qmk_firmware.git (fetch) | 24 | origin https://github.com/<your_username>/qmk_firmware.git (fetch) |
@@ -29,7 +29,7 @@ upstream https://github.com/qmk/qmk_firmware.git (push) | |||
29 | 29 | ||
30 | If you only see one fork referenced: | 30 | If you only see one fork referenced: |
31 | 31 | ||
32 | ```sh | 32 | ``` |
33 | QMKuser ~/qmk_firmware (master) | 33 | QMKuser ~/qmk_firmware (master) |
34 | $ git remote -v | 34 | $ git remote -v |
35 | origin https://github.com/qmk/qmk_firmware.git (fetch) | 35 | origin https://github.com/qmk/qmk_firmware.git (fetch) |
@@ -38,31 +38,31 @@ origin https://github.com/qmk/qmk_firmware.git (push) | |||
38 | 38 | ||
39 | add a new remote with: | 39 | add a new remote with: |
40 | 40 | ||
41 | ```sh | 41 | ``` |
42 | git remote add upstream https://github.com/qmk/qmk_firmware.git | 42 | git remote add upstream https://github.com/qmk/qmk_firmware.git |
43 | ``` | 43 | ``` |
44 | 44 | ||
45 | Then, redirect the `origin` remote to your own fork with: | 45 | Then, redirect the `origin` remote to your own fork with: |
46 | 46 | ||
47 | ```sh | 47 | ``` |
48 | git remote set-url origin https://github.com/<your_username>/qmk_firmware.git | 48 | git remote set-url origin https://github.com/<your_username>/qmk_firmware.git |
49 | ``` | 49 | ``` |
50 | 50 | ||
51 | Now that you have both remotes configured, you need to update the references for the upstream repository, which is QMK's, by running: | 51 | Now that you have both remotes configured, you need to update the references for the upstream repository, which is QMK's, by running: |
52 | 52 | ||
53 | ```sh | 53 | ``` |
54 | git fetch upstream | 54 | git fetch upstream |
55 | ``` | 55 | ``` |
56 | 56 | ||
57 | At this point, resynchronize your branch to QMK's by running: | 57 | At this point, resynchronize your branch to QMK's by running: |
58 | 58 | ||
59 | ```sh | 59 | ``` |
60 | git reset --hard upstream/master | 60 | git reset --hard upstream/master |
61 | ``` | 61 | ``` |
62 | 62 | ||
63 | These steps will update the repository on your computer, but your GitHub fork will still be out of sync. To resynchronize your fork on GitHub, you need to push to your fork, instructing Git to override any remote changes that are not reflected in your local repository. To do this, run: | 63 | These steps will update the repository on your computer, but your GitHub fork will still be out of sync. To resynchronize your fork on GitHub, you need to push to your fork, instructing Git to override any remote changes that are not reflected in your local repository. To do this, run: |
64 | 64 | ||
65 | ```sh | 65 | ``` |
66 | git push --force-with-lease | 66 | git push --force-with-lease |
67 | ``` | 67 | ``` |
68 | 68 | ||
diff --git a/docs/reference_configurator_support.md b/docs/reference_configurator_support.md index ba3d49e2b..db6cd80a2 100644 --- a/docs/reference_configurator_support.md +++ b/docs/reference_configurator_support.md | |||
@@ -168,7 +168,7 @@ k33 | {"label":"Enter", "x":3, "y":3, "h":2} | |||
168 | k40 | {"label":"0", "x":0, "y":4, "w":2} | 168 | k40 | {"label":"0", "x":0, "y":4, "w":2} |
169 | k42 | {"label":".", "x":2, "y":4} | 169 | k42 | {"label":".", "x":2, "y":4} |
170 | 170 | ||
171 | When a user selects the top-left key in the Configurator, and assigns Num Lock to it, the Configurator builds a keymap file with `KC_NLCK` as the first key, and so on as the keymap is built. The `label` keys are not used; they are only for the user's reference in identifying specific keys when debugging the `info.json` file. | 171 | When a user selects the top-left key in the Configurator, and assigns Num Lock to it, the Configurator builds a keymap file with `KC_NUM` as the first key, and so on as the keymap is built. The `label` keys are not used; they are only for the user's reference in identifying specific keys when debugging the `info.json` file. |
172 | 172 | ||
173 | 173 | ||
174 | ## Issues and Hazards | 174 | ## Issues and Hazards |
diff --git a/docs/ru-ru/getting_started_github.md b/docs/ru-ru/getting_started_github.md index 120f3c24e..7a70926f5 100644 --- a/docs/ru-ru/getting_started_github.md +++ b/docs/ru-ru/getting_started_github.md | |||
@@ -31,7 +31,6 @@ Submodule path 'lib/chibios': checked out '587968d6cbc2b0e1c7147540872f2a67e59ca | |||
31 | Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' | 31 | Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' |
32 | Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' | 32 | Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' |
33 | Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' | 33 | Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' |
34 | Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2' | ||
35 | ``` | 34 | ``` |
36 | 35 | ||
37 | Теперь у вас есть форк QMK на вашем локальном компьютере, и вы можете добавить свою раскладку, скомпилировать ее и прошить ей свою клавиатуру. Как только вы будете довольны своими изменениями, есть возможность добавить, зафиксировать их и сделать коммит в свой форк следующим образом: | 36 | Теперь у вас есть форк QMK на вашем локальном компьютере, и вы можете добавить свою раскладку, скомпилировать ее и прошить ей свою клавиатуру. Как только вы будете довольны своими изменениями, есть возможность добавить, зафиксировать их и сделать коммит в свой форк следующим образом: |
diff --git a/docs/tap_hold.md b/docs/tap_hold.md index 71bff30ba..5a4c20961 100644 --- a/docs/tap_hold.md +++ b/docs/tap_hold.md | |||
@@ -247,7 +247,7 @@ To enable `retro tapping`, add the following to your `config.h`: | |||
247 | 247 | ||
248 | Holding and releasing a dual function key without pressing another key will result in nothing happening. With retro tapping enabled, releasing the key without pressing another will send the original keycode even if it is outside the tapping term. | 248 | Holding and releasing a dual function key without pressing another key will result in nothing happening. With retro tapping enabled, releasing the key without pressing another will send the original keycode even if it is outside the tapping term. |
249 | 249 | ||
250 | For instance, holding and releasing `LT(2, KC_SPACE)` without hitting another key will result in nothing happening. With this enabled, it will send `KC_SPACE` instead. | 250 | For instance, holding and releasing `LT(2, KC_SPC)` without hitting another key will result in nothing happening. With this enabled, it will send `KC_SPC` instead. |
251 | 251 | ||
252 | For more granular control of this feature, you can add the following to your `config.h`: | 252 | For more granular control of this feature, you can add the following to your `config.h`: |
253 | 253 | ||
@@ -260,7 +260,7 @@ You can then add the following function to your keymap: | |||
260 | ```c | 260 | ```c |
261 | bool get_retro_tapping(uint16_t keycode, keyrecord_t *record) { | 261 | bool get_retro_tapping(uint16_t keycode, keyrecord_t *record) { |
262 | switch (keycode) { | 262 | switch (keycode) { |
263 | case LT(2, KC_SPACE): | 263 | case LT(2, KC_SPC): |
264 | return true; | 264 | return true; |
265 | default: | 265 | default: |
266 | return false; | 266 | return false; |
diff --git a/docs/uart_driver.md b/docs/uart_driver.md index 4d1716975..340b64818 100644 --- a/docs/uart_driver.md +++ b/docs/uart_driver.md | |||
@@ -60,30 +60,56 @@ Initialize the UART driver. This function must be called only once, before any o | |||
60 | 60 | ||
61 | --- | 61 | --- |
62 | 62 | ||
63 | ### `void uart_putchar(uint8_t c)` | 63 | ### `void uart_write(uint8_t data)` |
64 | 64 | ||
65 | Transmit a single byte. | 65 | Transmit a single byte. |
66 | 66 | ||
67 | #### Arguments | 67 | #### Arguments |
68 | 68 | ||
69 | - `uint8_t c` | 69 | - `uint8_t data` |
70 | The byte (character) to send, from 0 to 255. | 70 | The byte to write. |
71 | 71 | ||
72 | --- | 72 | --- |
73 | 73 | ||
74 | ### `uint8_t uart_getchar(void)` | 74 | ### `uint8_t uart_read(void)` |
75 | 75 | ||
76 | Receive a single byte. | 76 | Receive a single byte. |
77 | 77 | ||
78 | #### Return Value | 78 | #### Return Value |
79 | 79 | ||
80 | The byte read from the receive buffer. | 80 | The byte read from the receive buffer. This function will block if the buffer is empty (ie. no data to read). |
81 | |||
82 | --- | ||
83 | |||
84 | ### `void uart_transmit(const uint8_t *data, uint16_t length)` | ||
85 | |||
86 | Transmit multiple bytes. | ||
87 | |||
88 | #### Arguments | ||
89 | |||
90 | - `const uint8_t *data` | ||
91 | A pointer to the data to write from. | ||
92 | - `uint16_t length` | ||
93 | The number of bytes to write. Take care not to overrun the length of `data`. | ||
94 | |||
95 | --- | ||
96 | |||
97 | ### `void uart_receive(char *data, uint16_t length)` | ||
98 | |||
99 | Receive multiple bytes. | ||
100 | |||
101 | #### Arguments | ||
102 | |||
103 | - `uint8_t *data` | ||
104 | A pointer to the buffer to read into. | ||
105 | - `uint16_t length` | ||
106 | The number of bytes to read. Take care not to overrun the length of `data`. | ||
81 | 107 | ||
82 | --- | 108 | --- |
83 | 109 | ||
84 | ### `bool uart_available(void)` | 110 | ### `bool uart_available(void)` |
85 | 111 | ||
86 | Return whether the receive buffer contains data. Call this function to determine if `uart_getchar()` will return meaningful data. | 112 | Return whether the receive buffer contains data. Call this function to determine if `uart_read()` will return data immediately. |
87 | 113 | ||
88 | #### Return Value | 114 | #### Return Value |
89 | 115 | ||
diff --git a/docs/understanding_qmk.md b/docs/understanding_qmk.md index da622044c..e0c2ab7dc 100644 --- a/docs/understanding_qmk.md +++ b/docs/understanding_qmk.md | |||
@@ -29,7 +29,6 @@ Within `keyboard_task()` you'll find code to handle: | |||
29 | * [Matrix Scanning](#matrix-scanning) | 29 | * [Matrix Scanning](#matrix-scanning) |
30 | * Mouse Handling | 30 | * Mouse Handling |
31 | * Serial Link(s) | 31 | * Serial Link(s) |
32 | * Visualizer | ||
33 | * Keyboard status LEDs (Caps Lock, Num Lock, Scroll Lock) | 32 | * Keyboard status LEDs (Caps Lock, Num Lock, Scroll Lock) |
34 | 33 | ||
35 | #### Matrix Scanning | 34 | #### Matrix Scanning |
@@ -67,10 +66,10 @@ At the keyboard level we define a C macro (typically named `LAYOUT()`) which map | |||
67 | k30, k31, k32, k33, \ | 66 | k30, k31, k32, k33, \ |
68 | k40, k42 \ | 67 | k40, k42 \ |
69 | ) { \ | 68 | ) { \ |
70 | { k00, k01, k02, k03, }, \ | 69 | { k00, k01, k02, k03 }, \ |
71 | { k10, k11, k12, k13, }, \ | 70 | { k10, k11, k12, k13 }, \ |
72 | { k20, k21, k22, KC_NO, }, \ | 71 | { k20, k21, k22, KC_NO }, \ |
73 | { k30, k31, k32, k33, }, \ | 72 | { k30, k31, k32, k33 }, \ |
74 | { k40, KC_NO, k42, KC_NO } \ | 73 | { k40, KC_NO, k42, KC_NO } \ |
75 | } | 74 | } |
76 | ``` | 75 | ``` |
@@ -83,14 +82,15 @@ You can also use this macro to handle unusual matrix layouts, for example the [C | |||
83 | 82 | ||
84 | At the keymap level we make use of our `LAYOUT()` macro above to map keycodes to physical locations to matrix locations. It looks like this: | 83 | At the keymap level we make use of our `LAYOUT()` macro above to map keycodes to physical locations to matrix locations. It looks like this: |
85 | 84 | ||
86 | ``` | 85 | ```c |
87 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 86 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
88 | [0] = LAYOUT( | 87 | [0] = LAYOUT( |
89 | KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ | 88 | KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, |
90 | KC_P7, KC_P8, KC_P9, KC_PPLS, \ | 89 | KC_P7, KC_P8, KC_P9, KC_PPLS, |
91 | KC_P4, KC_P5, KC_P6, \ | 90 | KC_P4, KC_P5, KC_P6, |
92 | KC_P1, KC_P2, KC_P3, KC_PENT, \ | 91 | KC_P1, KC_P2, KC_P3, KC_PENT, |
93 | KC_P0, KC_PDOT) | 92 | KC_P0, KC_PDOT |
93 | ) | ||
94 | } | 94 | } |
95 | ``` | 95 | ``` |
96 | 96 | ||
@@ -124,7 +124,7 @@ And when our current scan completes it will look like this: | |||
124 | } | 124 | } |
125 | ``` | 125 | ``` |
126 | 126 | ||
127 | Comparing against our keymap we can see that the pressed key is KC_NLCK. From here we dispatch to the `process_record` set of functions. | 127 | Comparing against our keymap we can see that the pressed key is `KC_NUM`. From here we dispatch to the `process_record` set of functions. |
128 | 128 | ||
129 | <!-- FIXME: Magic happens between here and process_record --> | 129 | <!-- FIXME: Magic happens between here and process_record --> |
130 | 130 | ||
@@ -180,10 +180,6 @@ FIXME: This needs to be written | |||
180 | 180 | ||
181 | FIXME: This needs to be written | 181 | FIXME: This needs to be written |
182 | 182 | ||
183 | #### Visualizer | ||
184 | |||
185 | FIXME: This needs to be written | ||
186 | |||
187 | #### Keyboard state LEDs (Caps Lock, Num Lock, Scroll Lock) | 183 | #### Keyboard state LEDs (Caps Lock, Num Lock, Scroll Lock) |
188 | 184 | ||
189 | FIXME: This needs to be written | 185 | FIXME: This needs to be written |
diff --git a/docs/unit_testing.md b/docs/unit_testing.md index a0eef51cb..47a105579 100644 --- a/docs/unit_testing.md +++ b/docs/unit_testing.md | |||
@@ -20,12 +20,12 @@ One thing to remember, is that you have to append `extern "C"` around all of you | |||
20 | 20 | ||
21 | ## Adding Tests for New or Existing Features | 21 | ## Adding Tests for New or Existing Features |
22 | 22 | ||
23 | If you want to unit test some feature, then take a look at the existing serial_link tests, in the `quantum/serial_link/tests folder`, and follow the steps below to create a similar structure. | 23 | If you want to unit test a feature, take a look at some of the existing tests, for example those in the `quantum/sequencer/tests` folder. Then follow the steps below to create a similar structure. |
24 | 24 | ||
25 | 1. If it doesn't already exist, add a test subfolder to the folder containing the feature. | 25 | 1. If it doesn't already exist, add a test subfolder to the folder containing the feature. |
26 | 2. Create a `testlist.mk` and a `rules.mk` file in that folder. | 26 | 2. Create a `testlist.mk` and a `rules.mk` file in that folder. |
27 | 3. Include those files from the root folder `testlist.mk`and `build_test.mk` respectively. | 27 | 3. Include those files from the root folder `testlist.mk`and `build_test.mk` respectively. |
28 | 4. Add a new name for your testgroup to the `testlist.mk` file. Each group defined there will be a separate executable. And that's how you can support mocking out different parts. Note that it's worth adding some common prefix, just like it's done for the serial_link tests. The reason for that is that the make command allows substring filtering, so this way you can easily run a subset of the tests. | 28 | 4. Add a new name for your testgroup to the `testlist.mk` file. Each group defined there will be a separate executable. And that's how you can support mocking out different parts. Note that it's worth adding some common prefix, just like it's done for the existing tests. The reason for that is that the make command allows substring filtering, so this way you can easily run a subset of the tests. |
29 | 5. Define the source files and required options in the `rules.mk` file. | 29 | 5. Define the source files and required options in the `rules.mk` file. |
30 | * `_SRC` for source files | 30 | * `_SRC` for source files |
31 | * `_DEFS` for additional defines | 31 | * `_DEFS` for additional defines |
@@ -44,7 +44,7 @@ If there are problems with the tests, you can find the executable in the `./buil | |||
44 | 44 | ||
45 | To forward any [debug messages](unit_testing.md#debug-api) to `stderr`, the tests can run with `DEBUG=1`. For example | 45 | To forward any [debug messages](unit_testing.md#debug-api) to `stderr`, the tests can run with `DEBUG=1`. For example |
46 | 46 | ||
47 | ```console | 47 | ``` |
48 | make test:all DEBUG=1 | 48 | make test:all DEBUG=1 |
49 | ``` | 49 | ``` |
50 | 50 | ||
diff --git a/docs/zh-cn/faq_debug.md b/docs/zh-cn/faq_debug.md index 3b6a36900..4dba44c27 100644 --- a/docs/zh-cn/faq_debug.md +++ b/docs/zh-cn/faq_debug.md | |||
@@ -81,11 +81,6 @@ Size after: | |||
81 | 81 | ||
82 | 全键无冲还不好用的话试着用`Magic` **N** 命令(默认是`LShift+RShift+N`)。这个命令会在**全键无冲**和**六键无冲**之间临时切换。有些情况**全键无冲**不好用你就需要使用**六键无冲**模式,尤其是在BIOS中。 | 82 | 全键无冲还不好用的话试着用`Magic` **N** 命令(默认是`LShift+RShift+N`)。这个命令会在**全键无冲**和**六键无冲**之间临时切换。有些情况**全键无冲**不好用你就需要使用**六键无冲**模式,尤其是在BIOS中。 |
83 | 83 | ||
84 | 如果你的固件使用`BOOTMAGIC_ENABLE`编译的你要用`BootMagic` **N** 命令(默认`Space+N`)打开开关。这个设置保存在EEPROM中并保存在电源循环中。 | ||
85 | <!--翻译问题:上面这句翻译的不贴切 --> | ||
86 | |||
87 | https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch | ||
88 | |||
89 | 84 | ||
90 | ## 指点杆需要复位电路(PS/2 鼠标支持) | 85 | ## 指点杆需要复位电路(PS/2 鼠标支持) |
91 | 如果没有复位电路,由于硬件初始化不正确,您将得到不一致的结果。查看TPM754复位电路。 | 86 | 如果没有复位电路,由于硬件初始化不正确,您将得到不一致的结果。查看TPM754复位电路。 |
diff --git a/docs/zh-cn/getting_started_github.md b/docs/zh-cn/getting_started_github.md index 65994754b..b4e8e9fa5 100644 --- a/docs/zh-cn/getting_started_github.md +++ b/docs/zh-cn/getting_started_github.md | |||
@@ -32,7 +32,6 @@ Submodule path 'lib/chibios': checked out '587968d6cbc2b0e1c7147540872f2a67e59ca | |||
32 | Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' | 32 | Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' |
33 | Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' | 33 | Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' |
34 | Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' | 34 | Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' |
35 | Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2' | ||
36 | ``` | 35 | ``` |
37 | 36 | ||
38 | 现在你本地计算机有QMK的分叉了,你可以添加你的布局了, 为你的键盘编译并刷新固件吧。如果你觉得你的修改很不错, 你可以添加,提交,然后想你的分叉推出(pull)你的改变,像这样: | 37 | 现在你本地计算机有QMK的分叉了,你可以添加你的布局了, 为你的键盘编译并刷新固件吧。如果你觉得你的修改很不错, 你可以添加,提交,然后想你的分叉推出(pull)你的改变,像这样: |