diff options
Diffstat (limited to 'docs')
72 files changed, 761 insertions, 637 deletions
diff --git a/docs/_summary.md b/docs/_summary.md index 2f6309e41d..4b528d9967 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -72,6 +72,7 @@ * [Mod-Tap](mod_tap.md) * [Macros](feature_macros.md) * [Mouse Keys](feature_mouse_keys.md) + * [Programmable Button](feature_programmable_button.md) * [Space Cadet Shift](feature_space_cadet.md) * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) diff --git a/docs/audio_driver.md b/docs/audio_driver.md index 7cd5a98d9f..81c3390074 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; Additionally, in the board config, you'll want to make changes to enable the DACs, GPT for Timers 6, 7 and 8: -``` c +```c //halconf.h: #define HAL_USE_DAC TRUE #define HAL_USE_GPT TRUE #include_next <halconf.h> ``` -``` c +```c // mcuconf.h: #include_next <mcuconf.h> #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 Additionally, in the board config, you'll want to make changes to enable the DACs, GPT for Timer 6: -``` c +```c //halconf.h: #define HAL_USE_DAC TRUE #define HAL_USE_GPT TRUE #include_next <halconf.h> ``` -``` c +```c // mcuconf.h: #include_next <mcuconf.h> #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 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. A configuration example for the STM32F103C8 would be: -``` c +```c //halconf.h: #define HAL_USE_PWM TRUE #define HAL_USE_PAL TRUE @@ -161,7 +161,7 @@ A configuration example for the STM32F103C8 would be: #include_next <halconf.h> ``` -``` c +```c // mcuconf.h: #include_next <mcuconf.h> #undef STM32_PWM_USE_TIM1 @@ -177,7 +177,7 @@ If we now target pin A8, looking through the data-sheet of the STM32F103C8, for - TIM1_CH4 = PA11 with all this information, the configuration would contain these lines: -``` c +```c //config.h: #define AUDIO_PIN A8 #define AUDIO_PWM_DRIVER PWMD1 diff --git a/docs/chibios_upgrade_instructions.md b/docs/chibios_upgrade_instructions.md index 40c2faafcf..b0a71142a3 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 * First time around this will take several hours * Subsequent updates will be incremental only * Tagging example (work out which version first!): - * `git tag -a ver20.3.3 -m ver20.3.3 svn/tags/ver20.3.3` - * `git push qmk ver20.3.3` - * `git tag -a breaking_YYYY_qN -m breaking_YYYY_qN svn/tags/ver20.3.3` - * `git push qmk breaking_YYYY_qN` + * `git tag -a ver20.3.4 -m ver20.3.4 svn/tags/ver20.3.4` + * `git push qmk ver20.3.4` + * `git tag -a develop_YYYY_qN -m develop_YYYY_qN svn/tags/ver20.3.4` + * `git push qmk develop_YYYY_qN` ## Getting ChibiOS-Contrib @@ -30,8 +30,8 @@ ChibiOS and ChibiOS-Contrib need to be updated in tandem -- the latter has a bra * `git checkout chibios-20.3.x` * `git pull --ff-only` * `git push origin chibios-20.3.x` - * `git tag -a breaking_YYYY_qN -m breaking_YYYY_qN chibios-20.3.x` - * `git push origin breaking_YYYY_qN` + * `git tag -a develop_YYYY_qN -m develop_YYYY_qN chibios-20.3.x` + * `git push origin develop_YYYY_qN` ## Updating submodules @@ -42,15 +42,18 @@ ChibiOS and ChibiOS-Contrib need to be updated in tandem -- the latter has a bra * `git checkout -b chibios-version-bump` * `cd lib/chibios` * `git fetch --all --tags --prune` - * `git checkout breaking_YYYY_qN` + * `git checkout develop_YYYY_qN` * `cd ../chibios-contrib` * `git fetch --all --tags --prune` - * `git checkout breaking_YYYY_qN` + * `git checkout develop_YYYY_qN` +* Update ChibiOS configs within QMK + * `cd $QMK_FIRMWARE` + * `./util/chibios_conf_updater.sh` * Build everything * `cd $QMK_FIRMWARE` * `qmk multibuild -j4` * Make sure there are no errors * Push to the repo - * `git commit -am 'Update ChibiOS to XXXXXXXXX'` + * `git commit -am 'Update ChibiOS to 99.9.9'` * `git push --set-upstream origin chibios-version-bump` -* Make a PR to qmk_firmware with the new branch
\ No newline at end of file +* Make a PR to qmk_firmware with the new branch diff --git a/docs/cli_commands.md b/docs/cli_commands.md index 8fa7ad41dc..1427b592f5 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md @@ -118,54 +118,6 @@ This command lets you configure the behavior of QMK. For the full `qmk config` d qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN] ``` -## `qmk console` - -This command lets you connect to keyboard consoles to get debugging messages. It only works if your keyboard firmware has been compiled with `CONSOLE_ENABLE=yes`. - -**Usage**: - -``` -qmk console [-d <pid>:<vid>[:<index>]] [-l] [-n] [-t] [-w <seconds>] -``` - -**Examples**: - -Connect to all available keyboards and show their console messages: - -``` -qmk console -``` - -List all devices: - -``` -qmk console -l -``` - -Show only messages from clueboard/66/rev3 keyboards: - -``` -qmk console -d C1ED:2370 -``` - -Show only messages from the second clueboard/66/rev3: - -``` -qmk console -d C1ED:2370:2 -``` - -Show timestamps and VID:PID instead of names: - -``` -qmk console -n -t -``` - -Disable bootloader messages: - -``` -qmk console --no-bootloaders -``` - ## `qmk doctor` This command examines your environment and alerts you to potential build or flash problems. It can fix many of them if you want it to. @@ -368,6 +320,33 @@ qmk format-c qmk format-c -b branch_name ``` +## `qmk generate-compilation-database` + +**Usage**: + +``` +qmk generate-compilation-database [-kb KEYBOARD] [-km KEYMAP] +``` + +Creates a `compile_commands.json` file. + +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. + +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. + +**Example:** + +``` +$ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak +$ qmk generate-compilation-database +Ψ Making clean +Ψ Gathering build instructions from make -n gh60/satan:colemak +Ψ Found 50 compile commands +Ψ Writing build database to /Users/you/src/qmk_firmware/compile_commands.json +``` + +Now open your dev environment and live a squiggly-free life. + ## `qmk docs` 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 0f4f401b33..62be3b3d8c 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 This will allow you to see all available subcommands. **Note:** You will have to install additional requirements: -```bash +``` python3 -m pip install -r requirements-dev.txt ``` diff --git a/docs/compatible_microcontrollers.md b/docs/compatible_microcontrollers.md index 2bf3b0ebb7..39e9061c20 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 * [STM32F103](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html) * [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html) * [STM32F401](https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html) + * [STM32F405](https://www.st.com/en/microcontrollers-microprocessors/stm32f405-415.html) * [STM32F407](https://www.st.com/en/microcontrollers-microprocessors/stm32f407-417.html) * [STM32F411](https://www.st.com/en/microcontrollers-microprocessors/stm32f411.html) * [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 * [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) * [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) * [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) + * [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) ## Atmel ATSAM 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). + +## RISC-V + +### GigaDevice + +[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 cfbe39f0d3..c4e5afb56b 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 * `#define TAP_CODE_DELAY 100` * 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. * `#define TAP_HOLD_CAPS_DELAY 80` - * 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. + * 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. * `#define KEY_OVERRIDE_REPEAT_DELAY 500` * Sets the key repeat interval for [key overrides](feature_key_overrides.md). diff --git a/docs/configurator_default_keymaps.md b/docs/configurator_default_keymaps.md index 30f9fa72f3..d2b14ec411 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: 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: -```shell +``` f14629ed1cd7c7ec9089604d64f29a99981558e8 Remove/migrate action_get_macro()s from default keymaps (#5625) ``` @@ -31,7 +31,7 @@ In this example, `f14629ed1cd7c7ec9089604d64f29a99981558e8` is the value that sh 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`: -```shell +``` user ~/qmk_firmware (master) $ git log -1 --pretty=oneline master -- keyboards/hineybush/h87a/keymaps/default/keymap.c ef8878fba5d3786e3f9c66436da63a560cd36ac9 Hineybush h87a lock indicators (#8237) @@ -46,7 +46,7 @@ Now that we have the commit hash, we need the keymap (edited for readability): const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_all( - 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, + 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, 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, 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, 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 "layout": "LAYOUT_all", "layers": [ [ - "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", + "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", "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", "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", "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 1d68d22d9f..eb033d167f 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -105,7 +105,7 @@ enum my_keycodes { 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: - ./bin/qmk docs + qmk docs or if you only have Python 3 installed: diff --git a/docs/custom_matrix.md b/docs/custom_matrix.md index cfa900a33d..8f6878f94a 100644 --- a/docs/custom_matrix.md +++ b/docs/custom_matrix.md @@ -15,7 +15,7 @@ The reasons to use this feature include: Implementing custom matrix usually involves compilation of an additional source file. It is recommended that for consistency, this file is called `matrix.c`. Add a new file to your keyboard directory: -```text +``` keyboards/<keyboard>/matrix.c ``` diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index 463366ff76..798c346e67 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 * GPIO pin initialisation: `void matrix_init_pins(void)` * 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. * `COL2ROW`-based row reads: `void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)` -* `ROW2COL`-based column reads: `void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)` +* `ROW2COL`-based column reads: `void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col, matrix_row_t row_shifter)` * `DIRECT_PINS`-based reads: `void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)` * 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. diff --git a/docs/de/cli.md b/docs/de/cli.md index 7dc02d505b..259aeecf75 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 * Installiere mit einem [virtualenv](https://virtualenv.pypa.io/en/latest/). * Weise den User an, die Umgebungs-Variable `QMK_HOME` zu setzen, um die Firmware-Quelle anders einzustellen als `~/qmk_firmware`. -# Lokale CLI - -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. - -**Beispiel**: - -``` -$ ~/qmk_firmware/bin/qmk hello -Ψ Hello, World! -``` - -## Einschränkungen der lokalen CLI - -Hier ein Vergleich mit der globalen CLI: - -* Die lokale CLI unterstützt kein `qmk setup` oder `qmk clone`. -* Die lokale CLI arbeitet immer innerhalb der selben `qmk_firmware`-Verzeichnisstruktur, auch wenn Du mehrere Repositories geklont hast. -* Die lokale CLI läuft nicht in einer virtualenv. Daher ist es möglich, dass Abhängigkeiten (dependencies) miteinander in Konflikt kommen/stehen. - # CLI-Befehle ## `qmk compile` diff --git a/docs/driver_installation_zadig.md b/docs/driver_installation_zadig.md index 9155e56e37..003629ba9a 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 |`usbasploader`|USBasp |`16C0:05DC` |libusbK| |`apm32-dfu` |APM32 DFU ISP Mode |`314B:0106` |WinUSB | |`stm32-dfu` |STM32 BOOTLOADER |`0483:DF11` |WinUSB | +|`gd32v-dfu` |GD32V BOOTLOADER |`28E9:0189` |WinUSB | |`kiibohd` |Kiibohd DFU Bootloader |`1C11:B007` |WinUSB | |`stm32duino` |Maple 003 |`1EAF:0003` |WinUSB | |`qmk-hid` |(keyboard name) Bootloader |`03EB:2067` |HidUsb | diff --git a/docs/es/hardware_drivers.md b/docs/es/hardware_drivers.md index e0a9736068..788de2c5ef 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 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). -## uGFX - -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. - ## WS2812 (Solo AVR) 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 a505cc5ce1..298a3b7ce7 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 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. -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. - ## Detalles técnicos 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 1afa38a624..28b8c81759 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) { ``` Example output -```text +``` Waiting for device:....... Listening: 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 ``` Example output -```text +``` > matrix scan frequency: 315 > matrix scan frequency: 313 > matrix scan frequency: 316 diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md index dbeadba710..01ded4f231 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 Sometimes, for readability's sake, it's useful to define custom names for some keycodes. People often define custom names using `#define`. For example: ```c -#define FN_CAPS LT(_FL, KC_CAPSLOCK) +#define FN_CAPS LT(_FL, KC_CAPS) #define ALT_TAB LALT(KC_TAB) ``` @@ -38,8 +38,8 @@ As a quick fix try holding down `Space`+`Backspace` while you plug in your keybo The key found on most modern keyboards that is located between `KC_RGUI` and `KC_RCTL` is actually called `KC_APP`. This is because when that key was invented there was already a key named `MENU` in the relevant standards, so MS chose to call that the `APP` key. -## `KC_SYSREQ` Isn't Working -Use keycode for Print Screen(`KC_PSCREEN` or `KC_PSCR`) instead of `KC_SYSREQ`. Key combination of 'Alt + Print Screen' is recognized as 'System request'. +## `KC_SYSTEM_REQUEST` Isn't Working +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'. See [issue #168](https://github.com/tmk/tmk_keyboard/issues/168) and * https://en.wikipedia.org/wiki/Magic_SysRq_key @@ -47,7 +47,7 @@ See [issue #168](https://github.com/tmk/tmk_keyboard/issues/168) and ## Power Keys Aren't Working -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. +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. 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. @@ -57,7 +57,7 @@ https://github.com/tmk/tmk_keyboard/issues/67 ## Modifier/Layer Stuck Modifier keys or layers can be stuck unless layer switching is configured properly. -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. +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. * https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#31-momentary-switching * 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 After enabling this feature use keycodes `KC_LCAP`, `KC_LNUM` and `KC_LSCR` in your keymap instead. -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`.*** +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`.*** ## Input Special Characters Other Than ASCII like Cédille 'Ç' diff --git a/docs/faq_misc.md b/docs/faq_misc.md index 9ab2b69a80..41d17906bf 100644 --- a/docs/faq_misc.md +++ b/docs/faq_misc.md @@ -36,7 +36,7 @@ Size after: can retry, loading that one - Some of the options you might specify in your keyboard's Makefile consume extra memory; watch out for BOOTMAGIC_ENABLE, - MOUSEKEY_ENABLE, EXTRAKEY_ENABLE, CONSOLE_ENABLE, API_SYSEX_ENABLE + MOUSEKEY_ENABLE, EXTRAKEY_ENABLE, CONSOLE_ENABLE - DFU tools do /not/ allow you to write into the bootloader (unless you throw in an extra fruit salad of options), so there is little risk there. diff --git a/docs/feature_auto_shift.md b/docs/feature_auto_shift.md index ec7eeaaa0c..a54cd79e42 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) { # ifndef NO_AUTO_SHIFT_SPECIAL case KC_TAB: case KC_MINUS ... KC_SLASH: - case KC_NONUS_BSLASH: + case KC_NONUS_BACKSLASH: # endif return true; } diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md index d47ecc6824..79782cf564 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 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: -```makefile +```make BACKLIGHT_ENABLE = yes ``` @@ -54,7 +54,7 @@ If backlight breathing is enabled (see below), the following functions are also To select which driver to use, configure your `rules.mk` with the following: -```makefile +```make BACKLIGHT_DRIVER = software ``` @@ -87,7 +87,7 @@ This functionality is configured at the keyboard level with the `BACKLIGHT_ON_ST The `pwm` driver is configured by default, however the equivalent setting within `rules.mk` would be: -```makefile +```make BACKLIGHT_DRIVER = pwm ``` @@ -143,7 +143,7 @@ The breathing effect is the same as in the hardware PWM implementation. 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: -```makefile +```make BACKLIGHT_DRIVER = pwm ``` @@ -167,7 +167,7 @@ Currently only hardware PWM is supported, not timer assisted, and does not provi 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`: -```makefile +```make BACKLIGHT_DRIVER = software ``` @@ -188,7 +188,7 @@ To activate multiple backlight pins, add something like this to your `config.h`, 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`: -```makefile +```make BACKLIGHT_DRIVER = custom ``` diff --git a/docs/feature_bluetooth.md b/docs/feature_bluetooth.md index 08e5f24ac5..fdf19c1077 100644 --- a/docs/feature_bluetooth.md +++ b/docs/feature_bluetooth.md @@ -4,10 +4,10 @@ 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. -|Board |Bluetooth Protocol |Connection Type |rules.mk |Bluetooth Chip| -|----------------------------------------------------------------|----------------------------|----------------|---------------------------|--------------| -|Roving Networks RN-42 (Sparkfun Bluesmirf) |Bluetooth Classic | UART |`BLUETOOTH = RN42` | RN-42 | -|[Bluefruit LE SPI Friend](https://www.adafruit.com/product/2633)|Bluetooth Low Energy | SPI |`BLUETOOTH = AdafruitBLE` | nRF51822 | +|Board |Bluetooth Protocol |Connection Type|rules.mk |Bluetooth Chip| +|----------------------------------------------------------------|--------------------|---------------|--------------------------------|--------------| +|Roving Networks RN-42 (Sparkfun Bluesmirf) |Bluetooth Classic |UART |`BLUETOOTH_DRIVER = RN42` |RN-42 | +|[Bluefruit LE SPI Friend](https://www.adafruit.com/product/2633)|Bluetooth Low Energy|SPI |`BLUETOOTH_DRIVER = AdafruitBLE`|nRF51822 | Not Supported Yet but possible: * [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: ### Adafruit BLE SPI Friend 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: -* #define AdafruitBleResetPin D4 -* #define AdafruitBleCSPin B4 -* #define AdafruitBleIRQPin E6 +* `#define ADAFRUIT_BLE_RST_PIN D4` +* `#define ADAFRUIT_BLE_CS_PIN B4` +* `#define ADAFRUIT_BLE_IRQ_PIN E6` 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. - <!-- FIXME: Document bluetooth support more completely. --> ## Bluetooth Rules.mk Options 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`. -Use only one of these to enable Bluetooth: -* BLUETOOTH_ENABLE = yes (Legacy Option) -* BLUETOOTH = RN42 -* BLUETOOTH = AdafruitBLE +Add the following to your `rules.mk`: + +```make +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE # or RN42 +``` ## Bluetooth Keycodes diff --git a/docs/feature_combo.md b/docs/feature_combo.md index d98e6f2ac7..b5c22badec 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) { // i.e. the exact array of keys you defined for the combo. // This can be useful if your combos have a common key and you want to apply the // same combo term for all of them. - if (combo->keys[0] == KC_ENTER) { // if first key in the array is KC_ENTER + if (combo->keys[0] == KC_ENT) { // if first key in the array is Enter return 150; } diff --git a/docs/feature_digitizer.md b/docs/feature_digitizer.md index 9b6aeddbaa..ac2d64f977 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 To enable the digitizer interface, add the following line to your rules.mk: -```makefile +```make DIGITIZER_ENABLE = yes ``` diff --git a/docs/feature_grave_esc.md b/docs/feature_grave_esc.md index f57c6042ca..f135b1dede 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 ## Usage -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. +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. ## What Your OS Sees diff --git a/docs/feature_haptic_feedback.md b/docs/feature_haptic_feedback.md index 1f36f5b054..c8c74cb8f0 100644 --- a/docs/feature_haptic_feedback.md +++ b/docs/feature_haptic_feedback.md @@ -4,9 +4,22 @@ The following options are currently available for haptic feedback in `rules.mk`: -`HAPTIC_ENABLE += DRV2605L` +``` +HAPTIC_ENABLE = yes + +HAPTIC_DRIVER += DRV2605L +HAPTIC_DRIVER += SOLENOID +``` + +The following `config.h` settings are available for all types of haptic feedback: -`HAPTIC_ENABLE += SOLENOID` +| Settings | Default | Description | +|--------------------------------------|---------------|---------------------------------------------------------------------------------------------------------------| +|`HAPTIC_ENABLE_PIN` | *Not defined* |Configures a pin to enable a boost converter for some haptic solution, often used with solenoid drivers. | +|`HAPTIC_ENABLE_PIN_ACTIVE_LOW` | *Not defined* |If defined then the haptic enable pin is active-low. | +|`HAPTIC_ENABLE_STATUS_LED` | *Not defined* |Configures a pin to reflect the current enabled/disabled status of haptic feedback. | +|`HAPTIC_ENABLE_STATUS_LED_ACTIVE_LOW` | *Not defined* |If defined then the haptic status led will be active-low. | +|`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. | ## Known Supported Hardware @@ -45,6 +58,7 @@ First you will need a build a circuit to drive the solenoid through a mosfet as | Settings | Default | Description | |----------------------------|----------------------|-------------------------------------------------------| |`SOLENOID_PIN` | *Not defined* |Configures the pin that the Solenoid is connected to. | +|`SOLENOID_PIN_ACTIVE_LOW` | *Not defined* |If defined then the solenoid trigger pin is active low.| |`SOLENOID_DEFAULT_DWELL` | `12` ms |Configures the default dwell time for the solenoid. | |`SOLENOID_MIN_DWELL` | `4` ms |Sets the lower limit for the dwell. | |`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 ### NO_HAPTIC_MOD With the entry of `#define NO_HAPTIC_MOD` in config.h, the following keys will not trigger feedback: -* Usual modifier keys such as Control/Shift/Alt/Gui (For example `KC_LCTRL`) +* Usual modifier keys such as Control/Shift/Alt/Gui (For example `KC_LCTL`) * `MO()` momentary keys. See also [Layers](feature_layers.md). +* `LM()` momentary keys with mod active. * `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. * `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. * `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 95702d6a23..fe33517a16 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. To use analog input you must first enable it in `rules.mk`: -```makefile +```make JOYSTICK_ENABLE = yes JOYSTICK_DRIVER = analog # or 'digital' ``` diff --git a/docs/feature_key_overrides.md b/docs/feature_key_overrides.md index 98036241e3..2417fcf594 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` This shows how the mentioned example of sending `delete` when `shift` + `backspace` are pressed is realized: ```c -const key_override_t delete_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_BSPACE, KC_DELETE); +const key_override_t delete_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_BSPC, KC_DEL); // This globally defines all key overrides to be used 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 ```c // Shift + esc = ~ -const key_override_t tilde_esc_override = ko_make_basic(MOD_MASK_SHIFT, KC_ESC, S(KC_GRAVE)); +const key_override_t tilde_esc_override = ko_make_basic(MOD_MASK_SHIFT, KC_ESC, S(KC_GRV)); // GUI + esc = ` -const key_override_t grave_esc_override = ko_make_basic(MOD_MASK_GUI, KC_ESC, KC_GRAVE); +const key_override_t grave_esc_override = ko_make_basic(MOD_MASK_GUI, KC_ESC, KC_GRV); const key_override_t **key_overrides = (const key_override_t *[]){ &tilde_esc_override, diff --git a/docs/feature_layouts.md b/docs/feature_layouts.md index b34fd442d5..93d040b554 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 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: -```md +```markdown # 60_ansi LAYOUT_60_ansi diff --git a/docs/feature_led_matrix.md b/docs/feature_led_matrix.md index ed92bffd99..d4b20b9aa2 100644 --- a/docs/feature_led_matrix.md +++ b/docs/feature_led_matrix.md @@ -49,6 +49,8 @@ Here is an example using 2 drivers. !> 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`. +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`. + Define these arrays listing all the LEDs in your `<keyboard>.c`: ```c @@ -219,7 +221,7 @@ static bool my_cool_effect(effect_params_t* params) { for (uint8_t i = led_min; i < led_max; i++) { led_matrix_set_value(i, 0xFF); } - return led_max < DRIVER_LED_TOTAL; + return led_matrix_check_finished_leds(led_max); } // 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) { for (uint8_t i = led_min; i < led_max; i++) { led_matrix_set_value(i, some_global_state++); } - - return led_max < DRIVER_LED_TOTAL; + return led_matrix_check_finished_leds(led_max); } static bool my_cool_effect2(effect_params_t* params) { if (params->init) my_cool_effect2_complex_init(params); diff --git a/docs/feature_macros.md b/docs/feature_macros.md index 3660f37755..6807111ca2 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) { void post_process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_A ... KC_F21: //notice how it skips over F22 - case KC_F23 ... KC_EXSEL: //exsel is the last one before the modifier keys + case KC_F23 ... KC_EXSL: //exsel is the last one before the modifier keys if (!record->event.pressed) { f22_tracker--; if (!f22_tracker) { diff --git a/docs/feature_midi.md b/docs/feature_midi.md index ab29d89db6..3da5c4940a 100644 --- a/docs/feature_midi.md +++ b/docs/feature_midi.md @@ -4,7 +4,7 @@ First, enable MIDI by adding the following to your `rules.mk`: -```makefile +```make MIDI_ENABLE = yes ``` diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md index 6d82aa0f59..0c926f6742 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 ```c #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -62,6 +62,8 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + + return false; } #endif ``` @@ -133,13 +135,14 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_logo(); // Renders a static logo oled_scroll_left(); // Turns on scrolling } + return false; } #endif ``` @@ -242,6 +245,7 @@ bool oled_init(oled_rotation_t rotation); // Called at the start of oled_init, weak function overridable by the user // rotation - the value passed into oled_init // Return new oled_rotation_t if you want to override default rotation +oled_rotation_t oled_init_kb(oled_rotation_t rotation); oled_rotation_t oled_init_user(oled_rotation_t rotation); // 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); void oled_task(void); // Called at the start of oled_task, weak function overridable by the user -void oled_task_user(void); +bool oled_task_kb(void); +bool oled_task_user(void); // Set the specific 8 lines rows of the screen to scroll. // 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 905c2a8f95..badeadc12b 100644 --- a/docs/feature_pointing_device.md +++ b/docs/feature_pointing_device.md @@ -4,7 +4,7 @@ Pointing Device is a generic name for a feature intended to be generic: moving t To enable Pointing Device, uncomment the following line in your rules.mk: -```makefile +```make POINTING_DEVICE_ENABLE = yes ``` diff --git a/docs/feature_programmable_button.md b/docs/feature_programmable_button.md new file mode 100644 index 0000000000..b1ef555d16 --- /dev/null +++ b/docs/feature_programmable_button.md @@ -0,0 +1,74 @@ +## Programmable Button + +Programmable button is a feature that can be used to send keys that have no +predefined meaning. +This means they can be processed on the host side by custom software without +colliding without the operating system trying to interpret these keys. + +The keycodes are emitted according to the HID usage +"Telephony Device Page" (0x0B), "Programmable button usage" (0x07). +On Linux (> 5.14) they are handled automatically and translated to `KEY_MACRO#` +keycodes. +(Up to `KEY_MACRO30`) + +### Enabling Programmable Button support + +To enable Programmable Button, add the following line to your keymap’s `rules.mk`: + +```c +PROGRAMMABLE_BUTTON_ENABLE = yes +``` + +### Mapping + +In your keymap you can use the following keycodes to map key presses to Programmable Buttons: + +|Key |Description | +|------------------------|----------------------| +|`PROGRAMMABLE_BUTTON_1` |Programmable button 1 | +|`PROGRAMMABLE_BUTTON_2` |Programmable button 2 | +|`PROGRAMMABLE_BUTTON_3` |Programmable button 3 | +|`PROGRAMMABLE_BUTTON_4` |Programmable button 4 | +|`PROGRAMMABLE_BUTTON_5` |Programmable button 5 | +|`PROGRAMMABLE_BUTTON_6` |Programmable button 6 | +|`PROGRAMMABLE_BUTTON_7` |Programmable button 7 | +|`PROGRAMMABLE_BUTTON_8` |Programmable button 8 | +|`PROGRAMMABLE_BUTTON_9` |Programmable button 9 | +|`PROGRAMMABLE_BUTTON_10`|Programmable button 10| +|`PROGRAMMABLE_BUTTON_11`|Programmable button 11| +|`PROGRAMMABLE_BUTTON_12`|Programmable button 12| +|`PROGRAMMABLE_BUTTON_13`|Programmable button 13| +|`PROGRAMMABLE_BUTTON_14`|Programmable button 14| +|`PROGRAMMABLE_BUTTON_15`|Programmable button 15| +|`PROGRAMMABLE_BUTTON_16`|Programmable button 16| +|`PROGRAMMABLE_BUTTON_17`|Programmable button 17| +|`PROGRAMMABLE_BUTTON_18`|Programmable button 18| +|`PROGRAMMABLE_BUTTON_19`|Programmable button 19| +|`PROGRAMMABLE_BUTTON_20`|Programmable button 20| +|`PROGRAMMABLE_BUTTON_21`|Programmable button 21| +|`PROGRAMMABLE_BUTTON_22`|Programmable button 22| +|`PROGRAMMABLE_BUTTON_23`|Programmable button 23| +|`PROGRAMMABLE_BUTTON_24`|Programmable button 24| +|`PROGRAMMABLE_BUTTON_25`|Programmable button 25| +|`PROGRAMMABLE_BUTTON_26`|Programmable button 26| +|`PROGRAMMABLE_BUTTON_27`|Programmable button 27| +|`PROGRAMMABLE_BUTTON_28`|Programmable button 28| +|`PROGRAMMABLE_BUTTON_29`|Programmable button 29| +|`PROGRAMMABLE_BUTTON_30`|Programmable button 30| +|`PROGRAMMABLE_BUTTON_31`|Programmable button 31| +|`PROGRAMMABLE_BUTTON_32`|Programmable button 32| +|`PB_1` to `PB_32` |Aliases for keymaps | + +### API + +You can also use a dedicated API defined in `programmable_button.h` to interact with this feature: + +``` +void programmable_button_clear(void); +void programmable_button_send(void); +void programmable_button_on(uint8_t code); +void programmable_button_off(uint8_t code); +bool programmable_button_is_on(uint8_t code); +uint32_t programmable_button_get_report(void); +void programmable_button_set_report(uint32_t report); +``` diff --git a/docs/feature_ps2_mouse.md b/docs/feature_ps2_mouse.md index 776a33150e..c980705ae7 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 In rules.mk: -```makefile +```make PS2_MOUSE_ENABLE = yes PS2_USE_BUSYWAIT = yes ``` @@ -39,14 +39,8 @@ In your keyboard config.h: ```c #ifdef PS2_USE_BUSYWAIT -# define PS2_CLOCK_PORT PORTD -# define PS2_CLOCK_PIN PIND -# define PS2_CLOCK_DDR DDRD -# define PS2_CLOCK_BIT 1 -# define PS2_DATA_PORT PORTD -# define PS2_DATA_PIN PIND -# define PS2_DATA_DDR DDRD -# define PS2_DATA_BIT 2 +# define PS2_CLOCK_PIN D1 +# define PS2_DATA_PIN D2 #endif ``` @@ -56,7 +50,7 @@ The following example uses D2 for clock and D5 for data. You can use any INT or In rules.mk: -```makefile +```make PS2_MOUSE_ENABLE = yes PS2_USE_INT = yes ``` @@ -65,14 +59,8 @@ In your keyboard config.h: ```c #ifdef PS2_USE_INT -#define PS2_CLOCK_PORT PORTD -#define PS2_CLOCK_PIN PIND -#define PS2_CLOCK_DDR DDRD -#define PS2_CLOCK_BIT 2 -#define PS2_DATA_PORT PORTD -#define PS2_DATA_PIN PIND -#define PS2_DATA_DDR DDRD -#define PS2_DATA_BIT 5 +#define PS2_CLOCK_PIN D2 +#define PS2_DATA_PIN D5 #define PS2_INT_INIT() do { \ EICRA |= ((1<<ISC21) | \ @@ -102,8 +90,8 @@ PS2_USE_INT = yes In your keyboard config.h: ```c -#define PS2_CLOCK A8 -#define PS2_DATA A9 +#define PS2_CLOCK_PIN A8 +#define PS2_DATA_PIN A9 ``` 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. In rules.mk: -```makefile +```make PS2_MOUSE_ENABLE = yes PS2_USE_USART = yes ``` @@ -127,14 +115,8 @@ In your keyboard config.h: ```c #ifdef PS2_USE_USART -#define PS2_CLOCK_PORT PORTD -#define PS2_CLOCK_PIN PIND -#define PS2_CLOCK_DDR DDRD -#define PS2_CLOCK_BIT 5 -#define PS2_DATA_PORT PORTD -#define PS2_DATA_PIN PIND -#define PS2_DATA_DDR DDRD -#define PS2_DATA_BIT 2 +#define PS2_CLOCK_PIN D5 +#define PS2_DATA_PIN D2 /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */ /* set DDR of CLOCK as input to be slave */ diff --git a/docs/feature_rawhid.md b/docs/feature_rawhid.md index 4a688fcba7..558a23a80f 100644 --- a/docs/feature_rawhid.md +++ b/docs/feature_rawhid.md @@ -15,7 +15,7 @@ RAW_ENABLE = yes In your `keymap.c` include `"raw_hid.h"` and implement the following: -```C +```c void raw_hid_receive(uint8_t *data, uint8_t length) { // Your code goes here. data is the packet received from host. } @@ -23,7 +23,7 @@ void raw_hid_receive(uint8_t *data, uint8_t length) { 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. -```C +```c void raw_hid_receive(uint8_t *data, uint8_t length) { raw_hid_send(data, length); } diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 2dbd32fbdb..6370c637a2 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]( There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`: -```makefile +```make RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = IS31FL3731 ``` @@ -21,6 +21,7 @@ You can use between 1 and 4 IS31FL3731 IC's. Do not specify `DRIVER_ADDR_<N>` de |----------|-------------|---------| | `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 | | `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | +| `ISSI_3731_DEGHOST` | (Optional) Set this define to enable de-ghosting by halving Vcc during blanking time | | | `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | | | `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | | | `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | | @@ -49,6 +50,8 @@ Here is an example using 2 drivers. !> 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`. +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`. + Define these arrays listing all the LEDs in your `<keyboard>.c`: ```c @@ -71,7 +74,7 @@ Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet] There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`: -```makefile +```make RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = IS31FL3733 ``` @@ -82,6 +85,9 @@ You can use between 1 and 4 IS31FL3733 IC's. Do not specify `DRIVER_ADDR_<N>` de |----------|-------------|---------| | `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 | | `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | +| `ISSI_PWM_FREQUENCY` | (Optional) PWM Frequency Setting - IS31FL3733B only | 0 | +| `ISSI_SWPULLUP` | (Optional) Set the value of the SWx lines on-chip de-ghosting resistors | PUR_0R (Disabled) | +| `ISSI_CSPULLUP` | (Optional) Set the value of the CSx lines on-chip de-ghosting resistors | PUR_0R (Disabled) | | `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | | | `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | | | `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 | `DRIVER_SYNC_3` | (Optional) Sync configuration for the third RGB driver | 0 | | `DRIVER_SYNC_4` | (Optional) Sync configuration for the fourth RGB driver | 0 | +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: + +| `ISSI_SWPULLUP/ISSI_CSPULLUP` | Description | +|----------------------|-------------| +| `PUR_0R` | (default) Do not use the on-chip resistors/enable de-ghosting | +| `PUR_05KR` | The 0.5k Ohm resistor used during blanking period (t_NOL) | +| `PUR_3KR` | The 3k Ohm resistor used at all times | +| `PUR_4KR` | The 4k Ohm resistor used at all times | +| `PUR_8KR` | The 8k Ohm resistor used at all times | +| `PUR_16KR` | The 16k Ohm resistor used at all times | +| `PUR_32KR` | The 32k Ohm resistor used during blanking period (t_NOL) | + Here is an example using 2 drivers. ```c @@ -141,7 +159,7 @@ Where `X_Y` is the location of the LED in the matrix defined by [the datasheet]( There is basic support for addressable RGB matrix lighting with the I2C IS31FL3737 RGB controller. To enable it, add this to your `rules.mk`: -```makefile +```make RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = IS31FL3737 ``` @@ -153,11 +171,25 @@ Configure the hardware via your `config.h`: |----------|-------------|---------| | `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 | | `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | +| `ISSI_SWPULLUP` | (Optional) Set the value of the SWx lines on-chip de-ghosting resistors | PUR_0R (Disabled) | +| `ISSI_CSPULLUP` | (Optional) Set the value of the CSx lines on-chip de-ghosting resistors | PUR_0R (Disabled) | | `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | | | `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | | | `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | | | `DRIVER_ADDR_2` | (Optional) Address for the second RGB driver | | +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: + +| `ISSI_SWPULLUP/ISSI_CSPULLUP` | Description | +|----------------------|-------------| +| `PUR_0R` | (default) Do not use the on-chip resistors/enable de-ghosting | +| `PUR_05KR` | The 0.5k Ohm resistor used during blanking period (t_NOL) | +| `PUR_1KR` | The 1k Ohm resistor used during blanking period (t_NOL) | +| `PUR_2KR` | The 2k Ohm resistor used during blanking period (t_NOL) | +| `PUR_4KR` | The 4k Ohm resistor used during blanking period (t_NOL) | +| `PUR_8KR` | The 8k Ohm resistor during blanking period (t_NOL) | +| `PUR_16KR` | The 16k Ohm resistor during blanking period (t_NOL) | +| `PUR_32KR` | The 32k Ohm resistor used during blanking period (t_NOL) | Here is an example using 2 drivers. @@ -181,7 +213,7 @@ Here is an example using 2 drivers. ``` !> 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`. -Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations. +Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations. Define these arrays listing all the LEDs in your `<keyboard>.c`: @@ -206,7 +238,7 @@ Where `X_Y` is the location of the LED in the matrix defined by [the datasheet]( 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`: -```makefile +```make RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 ``` @@ -226,7 +258,7 @@ Configure the hardware via your `config.h`: There is basic support for APA102 based addressable LED strands. To enable it, add this to your `rules.mk`: -```makefile +```make RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = APA102 ``` @@ -246,7 +278,7 @@ Configure the hardware via your `config.h`: ### AW20216 :id=aw20216 There is basic support for addressable RGB matrix lighting with the SPI AW20216 RGB controller. To enable it, add this to your `rules.mk`: -```makefile +```make RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = AW20216 ``` @@ -340,7 +372,7 @@ x = 224 / (NUMBER_OF_COLS - 1) * COL_POSITION y = 64 / (NUMBER_OF_ROWS - 1) * ROW_POSITION ``` -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. +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. 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. @@ -383,7 +415,7 @@ All RGB keycodes are currently shared with the RGBLIGHT system: * `RGB_MODE_*` keycodes will generally work, but not all of the modes are currently mapped to the correct effects for the RGB Matrix system. -`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. +`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. !> 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,7 +452,9 @@ enum rgb_matrix_effects { RGB_MATRIX_JELLYBEAN_RAINDROPS, // Randomly changes a single key's hue and saturation RGB_MATRIX_HUE_BREATHING, // Hue shifts up a slight ammount at the same time, then shifts back RGB_MATRIX_HUE_PENDULUM, // Hue shifts up a slight ammount in a wave to the right, then back to the left - RGB_MATRIX_HUE_WAVE, // Hue shifts up a slight ammount and then back down in a wave to the right + RGB_MATRIX_HUE_WAVE, // Hue shifts up a slight ammount and then back down in a wave to the right + RGB_MATRIX_FRACTAL, // Single hue fractal filled keys pulsing horizontally out to edges + RGB_MATRIX_PIXEL_RAIN, // Randomly light keys with random hues #if define(RGB_MATRIX_FRAMEBUFFER_EFFECTS) RGB_MATRIX_TYPING_HEATMAP, // How hot is your WPM! RGB_MATRIX_DIGITAL_RAIN, // That famous computer simulation @@ -473,7 +507,9 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con |`#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Disables `RGB_MATRIX_JELLYBEAN_RAINDROPS` | |`#define DISABLE_RGB_MATRIX_HUE_BREATHING` |Disables `RGB_MATRIX_HUE_BREATHING` | |`#define DISABLE_RGB_MATRIX_HUE_PENDULUM` |Disables `RGB_MATRIX_HUE_PENDULUM` | -|`#define DISABLE_RGB_MATRIX_HUE_WAVE ` |Disables `RGB_MATRIX_HUE_WAVE ` | +|`#define DISABLE_RGB_MATRIX_HUE_WAVE` |Disables `RGB_MATRIX_HUE_WAVE` | +|`#define DISABLE_RGB_MATRIX_FRACTAL` |Disables `RGB_MATRIX_FRACTAL` | +|`#define DISABLE_RGB_MATRIX_PIXEL_RAIN ` |Disables `RGB_MATRIX_PIXEL_RAIN ` | |`#define DISABLE_RGB_MATRIX_TYPING_HEATMAP` |Disables `RGB_MATRIX_TYPING_HEATMAP` | |`#define DISABLE_RGB_MATRIX_DIGITAL_RAIN` |Disables `RGB_MATRIX_DIGITAL_RAIN` | |`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |Disables `RGB_MATRIX_SOLID_REACTIVE_SIMPLE` | @@ -537,7 +573,7 @@ static bool my_cool_effect(effect_params_t* params) { for (uint8_t i = led_min; i < led_max; i++) { rgb_matrix_set_color(i, 0xff, 0xff, 0x00); } - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } // e.g: A more complex effect, relying on external methods and state, with @@ -551,8 +587,7 @@ static bool my_cool_effect2_complex_run(effect_params_t* params) { for (uint8_t i = led_min; i < led_max; i++) { rgb_matrix_set_color(i, 0xff, some_global_state++, 0xff); } - - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } static bool my_cool_effect2(effect_params_t* params) { if (params->init) my_cool_effect2_complex_init(params); @@ -694,7 +729,7 @@ Where `28` is an unused index from `eeconfig.h`. ### Indicators :id=indicators -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: +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: ```c void rgb_matrix_indicators_kb(void) { rgb_matrix_set_color(index, red, green, blue); @@ -749,18 +784,18 @@ This example sets the modifiers to be a specific color based on the layer state. ```c void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { HSV hsv = {0, 255, 255}; - + if (layer_state_is(layer_state, 2)) { hsv = {130, 255, 255}; } else { hsv = {30, 255, 255}; } - + if (hsv.v > rgb_matrix_get_val()) { hsv.v = rgb_matrix_get_val(); } RGB rgb = hsv_to_rgb(hsv); - + for (uint8_t i = led_min; i <= led_max; i++) { if (HAS_FLAGS(g_led_config.flags[i], 0x01)) { // 0x01 == LED_FLAG_MODIFIER rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); @@ -769,7 +804,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { } ``` -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: +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: ```c 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 8d66034d4b..a7c3f3d9ed 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 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. -```makefile +```make STENO_ENABLE = yes MOUSEKEY_ENABLE = no ``` diff --git a/docs/feature_swap_hands.md b/docs/feature_swap_hands.md index cbc574b6b8..b0239bb802 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 The configuration table is a simple 2-dimensional array to map from column/row to new column/row. Example `hand_swap_config` for Planck: -```C +```c const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{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, 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 d1988b9b7d..40f9802db3 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) { xtap_state.state = cur_dance(state); switch (xtap_state.state) { case TD_SINGLE_TAP: register_code(KC_X); break; - case TD_SINGLE_HOLD: register_code(KC_LCTRL); break; + case TD_SINGLE_HOLD: register_code(KC_LCTL); break; case TD_DOUBLE_TAP: register_code(KC_ESC); break; case TD_DOUBLE_HOLD: register_code(KC_LALT); break; // 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) { void x_reset(qk_tap_dance_state_t *state, void *user_data) { switch (xtap_state.state) { case TD_SINGLE_TAP: unregister_code(KC_X); break; - case TD_SINGLE_HOLD: unregister_code(KC_LCTRL); break; + case TD_SINGLE_HOLD: unregister_code(KC_LCTL); break; case TD_DOUBLE_TAP: unregister_code(KC_ESC); break; case TD_DOUBLE_HOLD: unregister_code(KC_LALT); case TD_DOUBLE_SINGLE_TAP: unregister_code(KC_X); diff --git a/docs/feature_userspace.md b/docs/feature_userspace.md index 8b001e3ce2..8c617fe33a 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) { 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: -```make +```make ifeq ($(strip $(FLASH_BOOTLOADER)), yes) OPT_DEFS += -DFLASH_BOOTLOADER endif @@ -252,4 +252,4 @@ Also, holding Shift will add the flash target (`:flash`) to the command. Holdin 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. -?> 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. +?> 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_wpm.md b/docs/feature_wpm.md index e2fac1ecea..7e465e79b9 100644 --- a/docs/feature_wpm.md +++ b/docs/feature_wpm.md @@ -35,7 +35,7 @@ bool wpm_keycode_user(uint16_t keycode) { } else if (keycode > 0xFF) { keycode = 0; } - if ((keycode >= KC_A && keycode <= KC_0) || (keycode >= KC_TAB && keycode <= KC_SLASH)) { + if ((keycode >= KC_A && keycode <= KC_0) || (keycode >= KC_TAB && keycode <= KC_SLSH)) { return true; } diff --git a/docs/flashing_bootloadhid.md b/docs/flashing_bootloadhid.md index 9879ec999e..213c7c1321 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 ### Linux Manual Installation 1. Install libusb development dependency: - ```bash + ``` # This depends on OS - for Debian the following works sudo apt-get install libusb-dev ``` diff --git a/docs/fr-fr/cli.md b/docs/fr-fr/cli.md index bfa060f2ad..917a9315bc 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 * Installez en utilisant un virtualenv * 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`. -# CLI locale - -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`. - -**Exemple**: - -``` -$ ~/qmk_firmware/bin/qmk hello -Ψ Hello, World! -``` - -## Limitations de la CLI locale - -Il y a quelques limitations à la CLI locale comparé à la globale: - -* La CLI locale ne supporte pas `qmk setup` ou `qmk clone` -* 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. -* La CLI locale ne s'exécute pas dans un virtualenv, donc il y a des risques que des dépendances seront en conflit - # Les commandes CLI ## `qmk compile` diff --git a/docs/fr-fr/getting_started_github.md b/docs/fr-fr/getting_started_github.md index 0f3982ea29..522b09a03e 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 Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' -Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2' ``` 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 f9c3b366a4..c4da8af968 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. Acquire a local copy of the QMK's repository (including submodules): -```bash +``` git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git cd qmk_firmware ``` Run the following command to build a keymap: -```bash +``` util/docker_build.sh <keyboard>:<keymap> # For example: util/docker_build.sh planck/rev6:default ``` @@ -27,14 +27,14 @@ This will compile the desired keyboard/keymap and leave the resulting `.hex` or There is also support for building _and_ flashing the keyboard straight from Docker by specifying the `target` as well: -```bash +``` util/docker_build.sh keyboard:keymap:target # For example: util/docker_build.sh planck/rev6:default:flash ``` 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: -```bash +``` util/docker_build.sh # Reads parameters as input (leave blank for all keyboards/keymaps) ``` @@ -42,7 +42,7 @@ util/docker_build.sh You can manually set which container runtime you want to use by setting the `RUNTIME` environment variable to it's name or path. By default docker or podman are automatically detected and docker is preferred over podman. -```bash +``` RUNTIME="podman" util/docker_build.sh keyboard:keymap:target ``` diff --git a/docs/getting_started_github.md b/docs/getting_started_github.md index e3720b8869..9232bc6229 100644 --- a/docs/getting_started_github.md +++ b/docs/getting_started_github.md @@ -32,7 +32,6 @@ Submodule path 'lib/chibios': checked out '587968d6cbc2b0e1c7147540872f2a67e59ca Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' -Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2' ``` 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 70390a5105..deef7520e5 100644 --- a/docs/getting_started_make_guide.md +++ b/docs/getting_started_make_guide.md @@ -125,10 +125,6 @@ This allows you output audio on the C6 pin (needs abstracting). See the [audio p 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. -`API_SYSEX_ENABLE` - -This enables using the Quantum SYSEX API to send strings (somewhere?) - `KEY_LOCK_ENABLE` This enables [key lock](feature_key_lock.md). diff --git a/docs/getting_started_vagrant.md b/docs/getting_started_vagrant.md index 114f875671..b5b5ce1539 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 ### Why am I seeing issues under Virtualbox? 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:** -```console +``` vagrant plugin install vagrant-vbguest ``` ### How do I remove an existing environment? Finished with your environment? From anywhere inside the folder where you checked out this project, Execute: -```console +``` vagrant destroy ``` ### What if I want to use Docker directly? 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: -```console +``` vagrant up --provider=docker ``` ### How do I access the virtual machine instead of the Docker container? Execute the following to bypass the `vagrant` user booting directly to the official qmk builder image: -```console +``` vagrant ssh -c 'sudo -i' ``` diff --git a/docs/hardware_drivers.md b/docs/hardware_drivers.md index 7e89c0d2b9..a157501326 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 Support for SSD1306 based OLED displays. For more information see the [OLED Driver Feature](feature_oled_driver.md) page. -## uGFX - -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. - ## WS2812 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 7630b44e0c..be55356b17 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 * `keyboards/top_folder/sub_1/sub_2/sub_3/sub_4/rules.mk` * `keyboards/top_folder/keymaps/a_keymap/rules.mk` * `users/a_user_folder/rules.mk` + * `keyboards/top_folder/sub_1/sub_2/sub_3/sub_4/post_rules.mk` + * `keyboards/top_folder/sub_1/sub_2/sub_3/post_rules.mk` + * `keyboards/top_folder/sub_1/sub_2/post_rules.mk` + * `keyboards/top_folder/sub_1/post_rules.mk` +* `keyboards/top_folder/post_rules.mk` * `common_features.mk` 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. +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`. + +* `keyboards/top_folder/keymaps/a_keymap/rules.mk` + ```make + # Please set the following according to the selection of the hardware implementation option. + RGBLED_OPTION_TYPE = backlight ## none, backlight or underglow + ``` +* `keyboards/top_folder/post_rules.mk` + ```make + ifeq ($(filter $(strip $(RGBLED_OPTION_TYPE))x, nonex backlightx underglowx x),) + $(error unknown RGBLED_OPTION_TYPE value "$(RGBLED_OPTION_TYPE)") + endif + + ifeq ($(strip $(RGBLED_OPTION_TYPE)),backlight) + RGBLIGHT_ENABLE = yes + OPT_DEFS += -DRGBLED_NUM=30 + endif + ifeq ($(strip $(RGBLED_OPTION_TYPE)),underglow) + RGBLIGHT_ENABLE = yes + OPT_DEFS += -DRGBLED_NUM=6 + endif + ``` + ?> See `build_keyboard.mk` and `common_features.mk` for more details. ### `<keyboard_name.c>` @@ -227,8 +255,6 @@ The year should be the first year the file is created. If work was done to that 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. -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. - ## Technical Details 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 900852effd..ca79e40f9a 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 Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' -Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2' ``` </div> diff --git a/docs/how_keyboards_work.md b/docs/how_keyboards_work.md index 3dcbc64522..36cbfb4d9a 100644 --- a/docs/how_keyboards_work.md +++ b/docs/how_keyboards_work.md @@ -9,7 +9,7 @@ firmware directly. Whenever you type on 1 particular key, here is the chain of actions taking place: -``` text +``` +------+ +-----+ +----------+ +----------+ +----+ | User |-------->| Key |------>| Firmware |----->| USB wire |---->| OS | +------+ +-----+ +----------+ +----------+ +----+ diff --git a/docs/i2c_driver.md b/docs/i2c_driver.md index 3ec34a0f87..95c588af44 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 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. -|`config.h` Overrride |Description |Default| -|------------------------|-------------------------------------------------------------------------------------------|-------| -|`I2C_DRIVER` |I2C peripheral to use - I2C1 -> `I2CD1`, I2C2 -> `I2CD2` etc. |`I2CD1`| -|`I2C1_BANK` (deprecated)|The bank of pins (`GPIOA`, `GPIOB`, `GPIOC`), superseded by `I2C1_SCL_BANK`/`I2C1_SDA_BANK`|`GPIOB`| -|`I2C1_SCL_BANK` |The bank of pins (`GPIOA`, `GPIOB`, `GPIOC`) to use for SCL |`GPIOB`| -|`I2C1_SCL` |The pin number for SCL (0-15) |`6` | -|`I2C1_SCL_PAL_MODE` |The alternate function mode for SCL |`4` | -|`I2C1_SDA_BANK` |The bank of pins (`GPIOA`, `GPIOB`, `GPIOC`) to use for SDA |`GPIOB`| -|`I2C1_SDA` |The pin number for SDA (0-15) |`7` | -|`I2C1_SDA_PAL_MODE` |The alternate function mode for SDA |`4` | +|`config.h` Overrride |Description |Default| +|------------------------|--------------------------------------------------------------|-------| +|`I2C_DRIVER` |I2C peripheral to use - I2C1 -> `I2CD1`, I2C2 -> `I2CD2` etc. |`I2CD1`| +|`I2C1_SCL_PIN` |The pin definition for SCL |`B6` | +|`I2C1_SCL_PAL_MODE` |The alternate function mode for SCL |`4` | +|`I2C1_SDA_PIN` |The pin definition for SDA |`B7` | +|`I2C1_SDA_PAL_MODE` |The alternate function mode for SDA |`4` | The following configuration values depend on the specific MCU in use. @@ -190,7 +187,7 @@ Receive multiple bytes from the selected SPI device. ### `i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)` -Writes to a register on the I2C device. +Writes to a register with an 8-bit address on the I2C device. #### Arguments @@ -211,9 +208,32 @@ Writes to a register on the I2C device. --- +### `i2c_status_t i2c_writeReg16(uint8_t devaddr, uint16_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)` + +Writes to a register with a 16-bit address (big endian) on the I2C device. + +#### Arguments + + - `uint8_t devaddr` + The 7-bit I2C address of the device. + - `uint16_t regaddr` + The register address to write to. + - `uint8_t *data` + A pointer to the data to transmit. + - `uint16_t length` + The number of bytes to write. Take care not to overrun the length of `data`. + - `uint16_t timeout` + The time in milliseconds to wait for a response from the target device. + +#### Return Value + +`I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`. + +--- + ### `i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)` -Reads from a register on the I2C device. +Reads from a register with an 8-bit address on the I2C device. #### Arguments @@ -232,6 +252,27 @@ Reads from a register on the I2C device. --- +### `i2c_status_t i2c_readReg16(uint8_t devaddr, uint16_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)` + +Reads from a register with a 16-bit address (big endian) on the I2C device. + +#### Arguments + + - `uint8_t devaddr` + The 7-bit I2C address of the device. + - `uint16_t regaddr` + The register address to read from. + - `uint16_t length` + The number of bytes to read. Take care not to overrun the length of `data`. + - `uint16_t timeout` + The time in milliseconds to wait for a response from the target device. + +#### Return Value + +`I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`. + +--- + ### `i2c_status_t i2c_stop(void)` Stop the current I2C transaction. diff --git a/docs/ja/compatible_microcontrollers.md b/docs/ja/compatible_microcontrollers.md index 7a3484fa8c..23f32bbb60 100644 --- a/docs/ja/compatible_microcontrollers.md +++ b/docs/ja/compatible_microcontrollers.md @@ -32,6 +32,7 @@ QMK は十分な容量のフラッシュメモリを備えた USB 対応 AVR ま * [STM32F103](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html) * [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html) * [STM32F401](https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html) +* [STM32F405](https://www.st.com/en/microcontrollers-microprocessors/stm32f405-415.html) * [STM32F407](https://www.st.com/en/microcontrollers-microprocessors/stm32f407-417.html) * [STM32F411](https://www.st.com/en/microcontrollers-microprocessors/stm32f411.html) * [STM32F446](https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html) diff --git a/docs/ja/feature_haptic_feedback.md b/docs/ja/feature_haptic_feedback.md index 1580797253..687788014a 100644 --- a/docs/ja/feature_haptic_feedback.md +++ b/docs/ja/feature_haptic_feedback.md @@ -9,9 +9,12 @@ 現在のところ、`rules.mk` で触覚フィードバック用に以下のオプションを利用可能です: -`HAPTIC_ENABLE += DRV2605L` +``` +HAPTIC_ENABLE = yes -`HAPTIC_ENABLE += SOLENOID` +HAPTIC_DRIVER += DRV2605L +HAPTIC_DRIVER += SOLENOID +``` ## サポートされる既知のハードウェア diff --git a/docs/ja/feature_ps2_mouse.md b/docs/ja/feature_ps2_mouse.md index 3d69411307..569934c187 100644 --- a/docs/ja/feature_ps2_mouse.md +++ b/docs/ja/feature_ps2_mouse.md @@ -43,14 +43,8 @@ PS2_USE_BUSYWAIT = yes ```c #ifdef PS2_USE_BUSYWAIT -# define PS2_CLOCK_PORT PORTD -# define PS2_CLOCK_PIN PIND -# define PS2_CLOCK_DDR DDRD -# define PS2_CLOCK_BIT 1 -# define PS2_DATA_PORT PORTD -# define PS2_DATA_PIN PIND -# define PS2_DATA_DDR DDRD -# define PS2_DATA_BIT 2 +# define PS2_CLOCK_PIN D1 +# define PS2_DATA_PIN D2 #endif ``` @@ -69,14 +63,8 @@ PS2_USE_INT = yes ```c #ifdef PS2_USE_INT -#define PS2_CLOCK_PORT PORTD -#define PS2_CLOCK_PIN PIND -#define PS2_CLOCK_DDR DDRD -#define PS2_CLOCK_BIT 2 -#define PS2_DATA_PORT PORTD -#define PS2_DATA_PIN PIND -#define PS2_DATA_DDR DDRD -#define PS2_DATA_BIT 5 +#define PS2_CLOCK_PIN D2 +#define PS2_DATA_PIN D5 #define PS2_INT_INIT() do { \ EICRA |= ((1<<ISC21) | \ @@ -107,14 +95,9 @@ PS2_USE_USART = yes ```c #ifdef PS2_USE_USART -#define PS2_CLOCK_PORT PORTD -#define PS2_CLOCK_PIN PIND -#define PS2_CLOCK_DDR DDRD -#define PS2_CLOCK_BIT 5 -#define PS2_DATA_PORT PORTD -#define PS2_DATA_PIN PIND -#define PS2_DATA_DDR DDRD -#define PS2_DATA_BIT 2 +#ifdef PS2_USE_USART +#define PS2_CLOCK_PIN D5 +#define PS2_DATA_PIN D2 /* 同期、奇数パリティ、1-bit ストップ、8-bit データ、立ち下がりエッジでサンプル */ /* CLOCK の DDR を入力としてスレーブに設定 */ diff --git a/docs/ja/getting_started_github.md b/docs/ja/getting_started_github.md index 6d9b70c410..6407011488 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 Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' -Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2' ``` ローカルマシンに QMK のフォークができるので、キーマップの追加、コンパイル、キーボードへの書き込みができます。変更に満足したら、以下のようにそれらをフォークへ追加、コミットおよびプッシュすることができます: diff --git a/docs/ja/hardware_drivers.md b/docs/ja/hardware_drivers.md index f77b48ba8e..e0061cb328 100644 --- a/docs/ja/hardware_drivers.md +++ b/docs/ja/hardware_drivers.md @@ -24,10 +24,6 @@ ProMicro のピンを AVR の名前ではなく、Arduino の名前で指定で SSD1306 ベースの OLED ディスプレイのサポート。詳しくは[OLED ドライバ](ja/feature_oled_driver.md)を参照して下さい。 -## uGFX - -QMK 内で uGFX を使用して、キャラクタ LCD やグラフィック LCD、LED アレイ、OLED ディスプレイ、TFT 液晶や他のディスプレイを制御できます。この部分はより詳しく文書化される必要があります。もしこれを使用したい場合にコードを読んでも分からない場合、[issue を開く](https://github.com/qmk/qmk_firmware/issues/new)を通して助けることができるかもしれません。 - ## WS2812 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 8a9127abc9..c0e7c18be0 100644 --- a/docs/ja/hardware_keyboard_guidelines.md +++ b/docs/ja/hardware_keyboard_guidelines.md @@ -234,8 +234,6 @@ QMK が提供する機能の量を考えれば、新しいユーザーが混乱 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) を選択しなければいけません。 -[uGFX](https://ugfx.io) を使用している場合は、[uGFX License](https://ugfx.io/license.html) に準拠する必要があります。uGFX を利用したデバイスを販売するには個別に商用ライセンスを取得しなければいけません。 - ## 技術的な詳細 キーボードを QMK で動作させるための詳細は[ハードウェア](ja/hardware.md)を参照して下さい! diff --git a/docs/ja/i2c_driver.md b/docs/ja/i2c_driver.md index 9d348d5803..1d8f70e163 100644 --- a/docs/ja/i2c_driver.md +++ b/docs/ja/i2c_driver.md @@ -79,13 +79,10 @@ ARM MCU 用の設定はしばしば非常に複雑です。これは、多くの STM32 MCU では、使用するハードウェアドライバにより、さまざまなピンを I2C ピンとして設定できます。標準では `B6`, `B7` ピンが I2C 用のピンです。 I2C 用のピンを設定するために次の定義が使えます: -| 変数 | 説明 | 既定値 | -|-----------------------|--------------------------------------------------------------------------------------------------|---------| -| `I2C1_SCL_BANK` | SCL に使うピンのバンク (`GPIOA`, `GPIOB`, `GPIOC`) | `GPIOB` | -| `I2C1_SDA_BANK` | SDA に使うピンのバンク (`GPIOA`, `GPIOB`, `GPIOC`) | `GPIOB` | -| `I2C1_SCL` | SCL のピン番号 (0-15) | `6` | -| `I2C1_SDA` | SDA のピン番号 (0-15) | `7` | -| `I2C1_BANK`(非推奨) | 使用するピンのバンク (`GPIOA`, `GPIOB`, `GPIOC`)。後継は `I2C1_SCL_BANK`, `I2C1_SDA_BANK` です。 | `GPIOB` | +| 変数 | 説明 | 既定値 | +|-----------------------|-------------------------------------------------------------------------------------------|---------| +| `I2C1_SCL_PIN` | SCL のピン番号 | `B6` | +| `I2C1_SDA_PIN` | SDA のピン番号 | `B7` | ChibiOS I2C ドライバの設定項目は STM32 MCU の種類に依存します。 diff --git a/docs/ja/understanding_qmk.md b/docs/ja/understanding_qmk.md index 109876961b..1654f8e002 100644 --- a/docs/ja/understanding_qmk.md +++ b/docs/ja/understanding_qmk.md @@ -184,10 +184,6 @@ FIXME: This needs to be written FIXME: This needs to be written -#### Visualizer - -FIXME: This needs to be written - #### Keyboard state LEDs (Caps Lock, Num Lock, Scroll Lock) FIXME: This needs to be written diff --git a/docs/keycodes.md b/docs/keycodes.md index 9f61447dc5..926d4fdcef 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 See also: [Basic Keycodes](keycodes_basic.md) -|Key |Aliases |Description |Windows |macOS |Linux<sup>1</sup>| -|-----------------------|------------------------------|-----------------------------------------------|-------------|-------------|-----------------| -|`KC_NO` |`XXXXXXX` |Ignore this key (NOOP) |*N/A* |*N/A* |*N/A* | -|`KC_TRANSPARENT` |`KC_TRNS`, `_______` |Use the next lowest non-transparent key |*N/A* |*N/A* |*N/A* | -|`KC_A` | |`a` and `A` |✔ |✔ |✔ | -|`KC_B` | |`b` and `B` |✔ |✔ |✔ | -|`KC_C` | |`c` and `C` |✔ |✔ |✔ | -|`KC_D` | |`d` and `D` |✔ |✔ |✔ | -|`KC_E` | |`e` and `E` |✔ |✔ |✔ | -|`KC_F` | |`f` and `F` |✔ |✔ |✔ | -|`KC_G` | |`g` and `G` |✔ |✔ |✔ | -|`KC_H` | |`h` and `H` |✔ |✔ |✔ | -|`KC_I` | |`i` and `I` |✔ |✔ |✔ | -|`KC_J` | |`j` and `J` |✔ |✔ |✔ | -|`KC_K` | |`k` and `K` |✔ |✔ |✔ | -|`KC_L` | |`l` and `L` |✔ |✔ |✔ | -|`KC_M` | |`m` and `M` |✔ |✔ |✔ | -|`KC_N` | |`n` and `N` |✔ |✔ |✔ | -|`KC_O` | |`o` and `O` |✔ |✔ |✔ | -|`KC_P` | |`p` and `P` |✔ |✔ |✔ | -|`KC_Q` | |`q` and `Q` |✔ |✔ |✔ | -|`KC_R` | |`r` and `R` |✔ |✔ |✔ | -|`KC_S` | |`s` and `S` |✔ |✔ |✔ | -|`KC_T` | |`t` and `T` |✔ |✔ |✔ | -|`KC_U` | |`u` and `U` |✔ |✔ |✔ | -|`KC_V` | |`v` and `V` |✔ |✔ |✔ | -|`KC_W` | |`w` and `W` |✔ |✔ |✔ | -|`KC_X` | |`x` and `X` |✔ |✔ |✔ | -|`KC_Y` | |`y` and `Y` |✔ |✔ |✔ | -|`KC_Z` | |`z` and `Z` |✔ |✔ |✔ | -|`KC_1` | |`1` and `!` |✔ |✔ |✔ | -|`KC_2` | |`2` and `@` |✔ |✔ |✔ | -|`KC_3` | |`3` and `#` |✔ |✔ |✔ | -|`KC_4` | |`4` and `$` |✔ |✔ |✔ | -|`KC_5` | |`5` and `%` |✔ |✔ |✔ | -|`KC_6` | |`6` and `^` |✔ |✔ |✔ | -|`KC_7` | |`7` and `&` |✔ |✔ |✔ | -|`KC_8` | |`8` and `*` |✔ |✔ |✔ | -|`KC_9` | |`9` and `(` |✔ |✔ |✔ | -|`KC_0` | |`0` and `)` |✔ |✔ |✔ | -|`KC_ENTER` |`KC_ENT` |Return (Enter) |✔ |✔ |✔ | -|`KC_ESCAPE` |`KC_ESC` |Escape |✔ |✔ |✔ | -|`KC_BSPACE` |`KC_BSPC` |Delete (Backspace) |✔ |✔ |✔ | -|`KC_TAB` | |Tab |✔ |✔ |✔ | -|`KC_SPACE` |`KC_SPC` |Spacebar |✔ |✔ |✔ | -|`KC_MINUS` |`KC_MINS` |`-` and `_` |✔ |✔ |✔ | -|`KC_EQUAL` |`KC_EQL` |`=` and `+` |✔ |✔ |✔ | -|`KC_LBRACKET` |`KC_LBRC` |`[` and `{` |✔ |✔ |✔ | -|`KC_RBRACKET` |`KC_RBRC` |`]` and `}` |✔ |✔ |✔ | -|`KC_BSLASH` |`KC_BSLS` |`\` and `\|` |✔ |✔ |✔ | -|`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` |✔ |✔ |✔ | -|`KC_SCOLON` |`KC_SCLN` |`;` and `:` |✔ |✔ |✔ | -|`KC_QUOTE` |`KC_QUOT` |`'` and `"` |✔ |✔ |✔ | -|`KC_GRAVE` |`KC_GRV`, `KC_ZKHK` |<code>`</code> and `~`, JIS Zenkaku/Hankaku|✔ |✔ |✔ | -|`KC_COMMA` |`KC_COMM` |`,` and `<` |✔ |✔ |✔ | -|`KC_DOT` | |`.` and `>` |✔ |✔ |✔ | -|`KC_SLASH` |`KC_SLSH` |`/` and `?` |✔ |✔ |✔ | -|`KC_CAPSLOCK` |`KC_CLCK`, `KC_CAPS` |Caps Lock |✔ |✔ |✔ | -|`KC_F1` | |F1 |✔ |✔ |✔ | -|`KC_F2` | |F2 |✔ |✔ |✔ | -|`KC_F3` | |F3 |✔ |✔ |✔ | -|`KC_F4` | |F4 |✔ |✔ |✔ | -|`KC_F5` | |F5 |✔ |✔ |✔ | -|`KC_F6` | |F6 |✔ |✔ |✔ | -|`KC_F7` | |F7 |✔ |✔ |✔ | -|`KC_F8` | |F8 |✔ |✔ |✔ | -|`KC_F9` | |F9 |✔ |✔ |✔ | -|`KC_F10` | |F10 |✔ |✔ |✔ | -|`KC_F11` | |F11 |✔ |✔ |✔ | -|`KC_F12` | |F12 |✔ |✔ |✔ | -|`KC_PSCREEN` |`KC_PSCR` |Print Screen |✔ |✔<sup>2</sup>|✔ | -|`KC_SCROLLLOCK` |`KC_SLCK`, `KC_BRMD` |Scroll Lock, Brightness Down (macOS) |✔ |✔<sup>2</sup>|✔ | -|`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU`|Pause, Brightness Up (macOS) |✔ |✔<sup>2</sup>|✔ | -|`KC_INSERT` |`KC_INS` |Insert |✔ | |✔ | -|`KC_HOME` | |Home |✔ |✔ |✔ | -|`KC_PGUP` | |Page Up |✔ |✔ |✔ | -|`KC_DELETE` |`KC_DEL` |Forward Delete |✔ |✔ |✔ | -|`KC_END` | |End |✔ |✔ |✔ | -|`KC_PGDOWN` |`KC_PGDN` |Page Down |✔ |✔ |✔ | -|`KC_RIGHT` |`KC_RGHT` |Right Arrow |✔ |✔ |✔ | -|`KC_LEFT` | |Left Arrow |✔ |✔ |✔ | -|`KC_DOWN` | |Down Arrow |✔ |✔ |✔ | -|`KC_UP` | |Up Arrow |✔ |✔ |✔ | -|`KC_NUMLOCK` |`KC_NLCK` |Keypad Num Lock and Clear |✔ |✔ |✔ | -|`KC_KP_SLASH` |`KC_PSLS` |Keypad `/` |✔ |✔ |✔ | -|`KC_KP_ASTERISK` |`KC_PAST` |Keypad `*` |✔ |✔ |✔ | -|`KC_KP_MINUS` |`KC_PMNS` |Keypad `-` |✔ |✔ |✔ | -|`KC_KP_PLUS` |`KC_PPLS` |Keypad `+` |✔ |✔ |✔ | -|`KC_KP_ENTER` |`KC_PENT` |Keypad Enter |✔ |✔ |✔ | -|`KC_KP_1` |`KC_P1` |Keypad `1` and End |✔ |✔ |✔ | -|`KC_KP_2` |`KC_P2` |Keypad `2` and Down Arrow |✔ |✔ |✔ | -|`KC_KP_3` |`KC_P3` |Keypad `3` and Page Down |✔ |✔ |✔ | -|`KC_KP_4` |`KC_P4` |Keypad `4` and Left Arrow |✔ |✔ |✔ | -|`KC_KP_5` |`KC_P5` |Keypad `5` |✔ |✔ |✔ | -|`KC_KP_6` |`KC_P6` |Keypad `6` and Right Arrow |✔ |✔ |✔ | -|`KC_KP_7` |`KC_P7` |Keypad `7` and Home |✔ |✔ |✔ | -|`KC_KP_8` |`KC_P8` |Keypad `8` and Up Arrow |✔ |✔ |✔ | -|`KC_KP_9` |`KC_P9` |Keypad `9` and Page Up |✔ |✔ |✔ | -|`KC_KP_0` |`KC_P0` |Keypad `0` and Insert |✔ |✔ |✔ | -|`KC_KP_DOT` |`KC_PDOT` |Keypad `.` and Delete |✔ |✔ |✔ | -|`KC_NONUS_BSLASH` |`KC_NUBS` |Non-US `\` and `\|` |✔ |✔ |✔ | -|`KC_APPLICATION` |`KC_APP` |Application (Windows Context Menu Key) |✔ | |✔ | -|`KC_POWER` | |System Power | |✔<sup>3</sup>|✔ | -|`KC_KP_EQUAL` |`KC_PEQL` |Keypad `=` |✔ |✔ |✔ | -|`KC_F13` | |F13 |✔ |✔ |✔ | -|`KC_F14` | |F14 |✔ |✔ |✔ | -|`KC_F15` | |F15 |✔ |✔ |✔ | -|`KC_F16` | |F16 |✔ |✔ |✔ | -|`KC_F17` | |F17 |✔ |✔ |✔ | -|`KC_F18` | |F18 |✔ |✔ |✔ | -|`KC_F19` | |F19 |✔ |✔ |✔ | -|`KC_F20` | |F20 |✔ | |✔ | -|`KC_F21` | |F21 |✔ | |✔ | -|`KC_F22` | |F22 |✔ | |✔ | -|`KC_F23` | |F23 |✔ | |✔ | -|`KC_F24` | |F24 |✔ | |✔ | -|`KC_EXECUTE` |`KC_EXEC` |Execute | | |✔ | -|`KC_HELP` | |Help | | |✔ | -|`KC_MENU` | |Menu | | |✔ | -|`KC_SELECT` |`KC_SLCT` |Select | | |✔ | -|`KC_STOP` | |Stop | | |✔ | -|`KC_AGAIN` |`KC_AGIN` |Again | | |✔ | -|`KC_UNDO` | |Undo | | |✔ | -|`KC_CUT` | |Cut | | |✔ | -|`KC_COPY` | |Copy | | |✔ | -|`KC_PASTE` |`KC_PSTE` |Paste | | |✔ | -|`KC_FIND` | |Find | | |✔ | -|`KC__MUTE` | |Mute | |✔ |✔ | -|`KC__VOLUP` | |Volume Up | |✔ |✔ | -|`KC__VOLDOWN` | |Volume Down | |✔ |✔ | -|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock |✔ |✔ | | -|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock |✔ |✔ | | -|`KC_LOCKING_SCROLL` |`KC_LSCR` |Locking Scroll Lock |✔ |✔ | | -|`KC_KP_COMMA` |`KC_PCMM` |Keypad `,` | | |✔ | -|`KC_KP_EQUAL_AS400` | |Keypad `=` on AS/400 keyboards | | | | -|`KC_INT1` |`KC_RO` |JIS `\` and `_` |✔ | |✔ | -|`KC_INT2` |`KC_KANA` |JIS Katakana/Hiragana |✔ | |✔ | -|`KC_INT3` |`KC_JYEN` |JIS `¥` and `\|` |✔ | |✔ | -|`KC_INT4` |`KC_HENK` |JIS Henkan |✔ | |✔ | -|`KC_INT5` |`KC_MHEN` |JIS Muhenkan |✔ | |✔ | -|`KC_INT6` | |JIS Numpad `,` | | |✔ | -|`KC_INT7` | |International 7 | | | | -|`KC_INT8` | |International 8 | | | | -|`KC_INT9` | |International 9 | | | | -|`KC_LANG1` |`KC_HAEN` |Hangul/English | | |✔ | -|`KC_LANG2` |`KC_HANJ` |Hanja | | |✔ | -|`KC_LANG3` | |JIS Katakana | | |✔ | -|`KC_LANG4` | |JIS Hiragana | | |✔ | -|`KC_LANG5` | |JIS Zenkaku/Hankaku | | |✔ | -|`KC_LANG6` | |Language 6 | | | | -|`KC_LANG7` | |Language 7 | | | | -|`KC_LANG8` | |Language 8 | | | | -|`KC_LANG9` | |Language 9 | | | | -|`KC_ALT_ERASE` |`KC_ERAS` |Alternate Erase | | | | -|`KC_SYSREQ` | |SysReq/Attention | | | | -|`KC_CANCEL` | |Cancel | | | | -|`KC_CLEAR` |`KC_CLR` |Clear | | |✔ | -|`KC_PRIOR` | |Prior | | | | -|`KC_RETURN` | |Return | | | | -|`KC_SEPARATOR` | |Separator | | | | -|`KC_OUT` | |Out | | | | -|`KC_OPER` | |Oper | | | | -|`KC_CLEAR_AGAIN` | |Clear/Again | | | | -|`KC_CRSEL` | |CrSel/Props | | | | -|`KC_EXSEL` | |ExSel | | | | -|`KC_LCTRL` |`KC_LCTL` |Left Control |✔ |✔ |✔ | -|`KC_LSHIFT` |`KC_LSFT` |Left Shift |✔ |✔ |✔ | -|`KC_LALT` |`KC_LOPT` |Left Alt (Option) |✔ |✔ |✔ | -|`KC_LGUI` |`KC_LCMD`, `KC_LWIN` |Left GUI (Windows/Command/Meta key) |✔ |✔ |✔ | -|`KC_RCTRL` |`KC_RCTL` |Right Control |✔ |✔ |✔ | -|`KC_RSHIFT` |`KC_RSFT` |Right Shift |✔ |✔ |✔ | -|`KC_RALT` |`KC_ROPT`, `KC_ALGR` |Right Alt (Option/AltGr) |✔ |✔ |✔ | -|`KC_RGUI` |`KC_RCMD`, `KC_RWIN` |Right GUI (Windows/Command/Meta key) |✔ |✔ |✔ | -|`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down |✔ |✔<sup>3</sup>|✔ | -|`KC_SYSTEM_SLEEP` |`KC_SLEP` |System Sleep |✔ |✔<sup>3</sup>|✔ | -|`KC_SYSTEM_WAKE` |`KC_WAKE` |System Wake | |✔<sup>3</sup>|✔ | -|`KC_AUDIO_MUTE` |`KC_MUTE` |Mute |✔ |✔ |✔ | -|`KC_AUDIO_VOL_UP` |`KC_VOLU` |Volume Up |✔ |✔<sup>4</sup>|✔ | -|`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |Volume Down |✔ |✔<sup>4</sup>|✔ | -|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |Next Track |✔ |✔<sup>5</sup>|✔ | -|`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |Previous Track |✔ |✔<sup>5</sup>|✔ | -|`KC_MEDIA_STOP` |`KC_MSTP` |Stop Track |✔ | |✔ | -|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |Play/Pause Track |✔ |✔ |✔ | -|`KC_MEDIA_SELECT` |`KC_MSEL` |Launch Media Player |✔ | |✔ | -|`KC_MEDIA_EJECT` |`KC_EJCT` |Eject | |✔ |✔ | -|`KC_MAIL` | |Launch Mail |✔ | |✔ | -|`KC_CALCULATOR` |`KC_CALC` |Launch Calculator |✔ | |✔ | -|`KC_MY_COMPUTER` |`KC_MYCM` |Launch My Computer |✔ | |✔ | -|`KC_WWW_SEARCH` |`KC_WSCH` |Browser Search |✔ | |✔ | -|`KC_WWW_HOME` |`KC_WHOM` |Browser Home |✔ | |✔ | -|`KC_WWW_BACK` |`KC_WBAK` |Browser Back |✔ | |✔ | -|`KC_WWW_FORWARD` |`KC_WFWD` |Browser Forward |✔ | |✔ | -|`KC_WWW_STOP` |`KC_WSTP` |Browser Stop |✔ | |✔ | -|`KC_WWW_REFRESH` |`KC_WREF` |Browser Refresh |✔ | |✔ | -|`KC_WWW_FAVORITES` |`KC_WFAV` |Browser Favorites |✔ | |✔ | -|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD` |Next Track |✔ |✔<sup>5</sup>|✔ | -|`KC_MEDIA_REWIND` |`KC_MRWD` |Previous Track |✔<sup>6</sup>|✔<sup>5</sup>|✔ | -|`KC_BRIGHTNESS_UP` |`KC_BRIU` |Brightness Up |✔ |✔ |✔ | -|`KC_BRIGHTNESS_DOWN` |`KC_BRID` |Brightness Down |✔ |✔ |✔ | +|Key |Aliases |Description |Windows |macOS |Linux<sup>1</sup>| +|------------------------|-------------------------------|---------------------------------------|-------------|-------------|-----------------| +|`KC_NO` |`XXXXXXX` |Ignore this key (NOOP) |*N/A* |*N/A* |*N/A* | +|`KC_TRANSPARENT` |`KC_TRNS`, `_______` |Use the next lowest non-transparent key|*N/A* |*N/A* |*N/A* | +|`KC_A` | |`a` and `A` |✔ |✔ |✔ | +|`KC_B` | |`b` and `B` |✔ |✔ |✔ | +|`KC_C` | |`c` and `C` |✔ |✔ |✔ | +|`KC_D` | |`d` and `D` |✔ |✔ |✔ | +|`KC_E` | |`e` and `E` |✔ |✔ |✔ | +|`KC_F` | |`f` and `F` |✔ |✔ |✔ | +|`KC_G` | |`g` and `G` |✔ |✔ |✔ | +|`KC_H` | |`h` and `H` |✔ |✔ |✔ | +|`KC_I` | |`i` and `I` |✔ |✔ |✔ | +|`KC_J` | |`j` and `J` |✔ |✔ |✔ | +|`KC_K` | |`k` and `K` |✔ |✔ |✔ | +|`KC_L` | |`l` and `L` |✔ |✔ |✔ | +|`KC_M` | |`m` and `M` |✔ |✔ |✔ | +|`KC_N` | |`n` and `N` |✔ |✔ |✔ | +|`KC_O` | |`o` and `O` |✔ |✔ |✔ | +|`KC_P` | |`p` and `P` |✔ |✔ |✔ | +|`KC_Q` | |`q` and `Q` |✔ |✔ |✔ | +|`KC_R` | |`r` and `R` |✔ |✔ |✔ | +|`KC_S` | |`s` and `S` |✔ |✔ |✔ | +|`KC_T` | |`t` and `T` |✔ |✔ |✔ | +|`KC_U` | |`u` and `U` |✔ |✔ |✔ | +|`KC_V` | |`v` and `V` |✔ |✔ |✔ | +|`KC_W` | |`w` and `W` |✔ |✔ |✔ | +|`KC_X` | |`x` and `X` |✔ |✔ |✔ | +|`KC_Y` | |`y` and `Y` |✔ |✔ |✔ | +|`KC_Z` | |`z` and `Z` |✔ |✔ |✔ | +|`KC_1` | |`1` and `!` |✔ |✔ |✔ | +|`KC_2` | |`2` and `@` |✔ |✔ |✔ | +|`KC_3` | |`3` and `#` |✔ |✔ |✔ | +|`KC_4` | |`4` and `$` |✔ |✔ |✔ | +|`KC_5` | |`5` and `%` |✔ |✔ |✔ | +|`KC_6` | |`6` and `^` |✔ |✔ |✔ | +|`KC_7` | |`7` and `&` |✔ |✔ |✔ | +|`KC_8` | |`8` and `*` |✔ |✔ |✔ | +|`KC_9` | |`9` and `(` |✔ |✔ |✔ | +|`KC_0` | |`0` and `)` |✔ |✔ |✔ | +|`KC_ENTER` |`KC_ENT` |Return (Enter) |✔ |✔ |✔ | +|`KC_ESCAPE` |`KC_ESC` |Escape |✔ |✔ |✔ | +|`KC_BACKSPACE` |`KC_BSPC` |Delete (Backspace) |✔ |✔ |✔ | +|`KC_TAB` | |Tab |✔ |✔ |✔ | +|`KC_SPACE` |`KC_SPC` |Spacebar |✔ |✔ |✔ | +|`KC_MINUS` |`KC_MINS` |`-` and `_` |✔ |✔ |✔ | +|`KC_EQUAL` |`KC_EQL` |`=` and `+` |✔ |✔ |✔ | +|`KC_LEFT_BRACKET` |`KC_LBRC` |`[` and `{` |✔ |✔ |✔ | +|`KC_RIGHT_BRACKET` |`KC_RBRC` |`]` and `}` |✔ |✔ |✔ | +|`KC_BACKSLASH` |`KC_BSLS` |`\` and `\|` |✔ |✔ |✔ | +|`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` |✔ |✔ |✔ | +|`KC_SEMICOLON` |`KC_SCLN` |`;` and `:` |✔ |✔ |✔ | +|`KC_QUOTE` |`KC_QUOT` |`'` and `"` |✔ |✔ |✔ | +|`KC_GRAVE` |`KC_GRV` |<code>`</code> and `~` |✔ |✔ |✔ | +|`KC_COMMA` |`KC_COMM` |`,` and `<` |✔ |✔ |✔ | +|`KC_DOT` | |`.` and `>` |✔ |✔ |✔ | +|`KC_SLASH` |`KC_SLSH` |`/` and `?` |✔ |✔ |✔ | +|`KC_CAPS_LOCK` |`KC_CAPS` |Caps Lock |✔ |✔ |✔ | +|`KC_F1` | |F1 |✔ |✔ |✔ | +|`KC_F2` | |F2 |✔ |✔ |✔ | +|`KC_F3` | |F3 |✔ |✔ |✔ | +|`KC_F4` | |F4 |✔ |✔ |✔ | +|`KC_F5` | |F5 |✔ |✔ |✔ | +|`KC_F6` | |F6 |✔ |✔ |✔ | +|`KC_F7` | |F7 |✔ |✔ |✔ | +|`KC_F8` | |F8 |✔ |✔ |✔ | +|`KC_F9` | |F9 |✔ |✔ |✔ | +|`KC_F10` | |F10 |✔ |✔ |✔ | +|`KC_F11` | |F11 |✔ |✔ |✔ | +|`KC_F12` | |F12 |✔ |✔ |✔ | +|`KC_PRINT_SCREEN` |`KC_PSCR` |Print Screen |✔ |✔<sup>2</sup>|✔ | +|`KC_SCROLL_LOCK` |`KC_SCRL`, `KC_BRMD` |Scroll Lock, Brightness Down (macOS) |✔ |✔<sup>2</sup>|✔ | +|`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU` |Pause, Brightness Up (macOS) |✔ |✔<sup>2</sup>|✔ | +|`KC_INSERT` |`KC_INS` |Insert |✔ | |✔ | +|`KC_HOME` | |Home |✔ |✔ |✔ | +|`KC_PAGE_UP` |`KC_PGUP` |Page Up |✔ |✔ |✔ | +|`KC_DELETE` |`KC_DEL` |Forward Delete |✔ |✔ |✔ | +|`KC_END` | |End |✔ |✔ |✔ | +|`KC_PAGE_DOWN` |`KC_PGDN` |Page Down |✔ |✔ |✔ | +|`KC_RIGHT` |`KC_RGHT` |Right Arrow |✔ |✔ |✔ | +|`KC_LEFT` | |Left Arrow |✔ |✔ |✔ | +|`KC_DOWN` | |Down Arrow |✔ |✔ |✔ | +|`KC_UP` | |Up Arrow |✔ |✔ |✔ | +|`KC_NUM_LOCK` |`KC_NUM` |Keypad Num Lock and Clear |✔ |✔ |✔ | +|`KC_KP_SLASH` |`KC_PSLS` |Keypad `/` |✔ |✔ |✔ | +|`KC_KP_ASTERISK` |`KC_PAST` |Keypad `*` |✔ |✔ |✔ | +|`KC_KP_MINUS` |`KC_PMNS` |Keypad `-` |✔ |✔ |✔ | +|`KC_KP_PLUS` |`KC_PPLS` |Keypad `+` |✔ |✔ |✔ | +|`KC_KP_ENTER` |`KC_PENT` |Keypad Enter |✔ |✔ |✔ | +|`KC_KP_1` |`KC_P1` |Keypad `1` and End |✔ |✔ |✔ | +|`KC_KP_2` |`KC_P2` |Keypad `2` and Down Arrow |✔ |✔ |✔ | +|`KC_KP_3` |`KC_P3` |Keypad `3` and Page Down |✔ |✔ |✔ | +|`KC_KP_4` |`KC_P4` |Keypad `4` and Left Arrow |✔ |✔ |✔ | +|`KC_KP_5` |`KC_P5` |Keypad `5` |✔ |✔ |✔ | +|`KC_KP_6` |`KC_P6` |Keypad `6` and Right Arrow |✔ |✔ |✔ | +|`KC_KP_7` |`KC_P7` |Keypad `7` and Home |✔ |✔ |✔ | +|`KC_KP_8` |`KC_P8` |Keypad `8` and Up Arrow |✔ |✔ |✔ | +|`KC_KP_9` |`KC_P9` |Keypad `9` and Page Up |✔ |✔ |✔ | +|`KC_KP_0` |`KC_P0` |Keypad `0` and Insert |✔ |✔ |✔ | +|`KC_KP_DOT` |`KC_PDOT` |Keypad `.` and Delete |✔ |✔ |✔ | +|`KC_NONUS_BACKSLASH` |`KC_NUBS` |Non-US `\` and `\|` |✔ |✔ |✔ | +|`KC_APPLICATION` |`KC_APP` |Application (Windows Context Menu Key) |✔ | |✔ | +|`KC_KB_POWER` | |System Power | |✔<sup>3</sup>|✔ | +|`KC_KP_EQUAL` |`KC_PEQL` |Keypad `=` |✔ |✔ |✔ | +|`KC_F13` | |F13 |✔ |✔ |✔ | +|`KC_F14` | |F14 |✔ |✔ |✔ | +|`KC_F15` | |F15 |✔ |✔ |✔ | +|`KC_F16` | |F16 |✔ |✔ |✔ | +|`KC_F17` | |F17 |✔ |✔ |✔ | +|`KC_F18` | |F18 |✔ |✔ |✔ | +|`KC_F19` | |F19 |✔ |✔ |✔ | +|`KC_F20` | |F20 |✔ | |✔ | +|`KC_F21` | |F21 |✔ | |✔ | +|`KC_F22` | |F22 |✔ | |✔ | +|`KC_F23` | |F23 |✔ | |✔ | +|`KC_F24` | |F24 |✔ | |✔ | +|`KC_EXECUTE` |`KC_EXEC` |Execute | | |✔ | +|`KC_HELP` | |Help | | |✔ | +|`KC_MENU` | |Menu | | |✔ | +|`KC_SELECT` |`KC_SLCT` |Select | | |✔ | +|`KC_STOP` | |Stop | | |✔ | +|`KC_AGAIN` |`KC_AGIN` |Again | | |✔ | +|`KC_UNDO` | |Undo | | |✔ | +|`KC_CUT` | |Cut | | |✔ | +|`KC_COPY` | |Copy | | |✔ | +|`KC_PASTE` |`KC_PSTE` |Paste | | |✔ | +|`KC_FIND` | |Find | | |✔ | +|`KC_KB_MUTE` | |Mute | |✔ |✔ | +|`KC_KB_VOLUME_UP` | |Volume Up | |✔ |✔ | +|`KC_KB_VOLUME_DOWN` | |Volume Down | |✔ |✔ | +|`KC_LOCKING_CAPS_LOCK` |`KC_LCAP` |Locking Caps Lock |✔ |✔ | | +|`KC_LOCKING_NUM_LOCK` |`KC_LNUM` |Locking Num Lock |✔ |✔ | | +|`KC_LOCKING_SCROLL_LOCK`|`KC_LSCR` |Locking Scroll Lock |✔ |✔ | | +|`KC_KP_COMMA` |`KC_PCMM` |Keypad `,` | | |✔ | +|`KC_KP_EQUAL_AS400` | |Keypad `=` on AS/400 keyboards | | | | +|`KC_INTERNATIONAL_1` |`KC_INT1` |International 1 |✔ | |✔ | +|`KC_INTERNATIONAL_2` |`KC_INT2` |International 2 |✔ | |✔ | +|`KC_INTERNATIONAL_3` |`KC_INT3` |International 3 |✔ | |✔ | +|`KC_INTERNATIONAL_4` |`KC_INT4` |International 4 |✔ | |✔ | +|`KC_INTERNATIONAL_5` |`KC_INT5` |International 5 |✔ | |✔ | +|`KC_INTERNATIONAL_6` |`KC_INT6` |International 6 | | |✔ | +|`KC_INTERNATIONAL_7` |`KC_INT7` |International 7 | | | | +|`KC_INTERNATIONAL_8` |`KC_INT8` |International 8 | | | | +|`KC_INTERNATIONAL_9` |`KC_INT9` |International 9 | | | | +|`KC_LANGUAGE_1` |`KC_LNG1` |Language 1 | | |✔ | +|`KC_LANGUAGE_2` |`KC_LNG2` |Language 2 | | |✔ | +|`KC_LANGUAGE_3` |`KC_LNG3` |Language 3 | | |✔ | +|`KC_LANGUAGE_4` |`KC_LNG4` |Language 4 | | |✔ | +|`KC_LANGUAGE_5` |`KC_LNG5` |Language 5 | | |✔ | +|`KC_LANGUAGE_6` |`KC_LNG6` |Language 6 | | | | +|`KC_LANGUAGE_7` |`KC_LNG7` |Language 7 | | | | +|`KC_LANGUAGE_8` |`KC_LNG8` |Language 8 | | | | +|`KC_LANGUAGE_9` |`KC_LNG9` |Language 9 | | | | +|`KC_ALTERNATE_ERASE` |`KC_ERAS` |Alternate Erase | | | | +|`KC_SYSTEM_REQUEST` |`KC_SYRQ` |SysReq/Attention | | | | +|`KC_CANCEL` |`KC_CNCL` |Cancel | | | | +|`KC_CLEAR` |`KC_CLR` |Clear | | |✔ | +|`KC_PRIOR` |`KC_PRIR` |Prior | | | | +|`KC_RETURN` |`KC_RETN` |Return | | | | +|`KC_SEPARATOR` |`KC_SEPR` |Separator | | | | +|`KC_OUT` | |Out | | | | +|`KC_OPER` | |Oper | | | | +|`KC_CLEAR_AGAIN` |`KC_CLAG` |Clear/Again | | | | +|`KC_CRSEL` |`KC_CRSL` |CrSel/Props | | | | +|`KC_EXSEL` |`KC_EXSL` |ExSel | | | | +|`KC_LEFT_CTRL` |`KC_LCTL` |Left Control |✔ |✔ |✔ | +|`KC_LEFT_SHIFT` |`KC_LSFT` |Left Shift |✔ |✔ |✔ | +|`KC_LEFT_ALT` |`KC_LALT`, `KC_LOPT` |Left Alt (Option) |✔ |✔ |✔ | +|`KC_LEFT_GUI` |`KC_LGUI`, `KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) |✔ |✔ |✔ | +|`KC_RIGHT_CTRL` |`KC_RCTL` |Right Control |✔ |✔ |✔ | +|`KC_RIGHT_SHIFT` |`KC_RSFT` |Right Shift |✔ |✔ |✔ | +|`KC_RIGHT_ALT` |`KC_RALT`, `KC_ROPT`, `KC_ALGR`|Right Alt (Option/AltGr) |✔ |✔ |✔ | +|`KC_RIGHT_GUI` |`KC_RGUI`, `KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key) |✔ |✔ |✔ | +|`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down |✔ |✔<sup>3</sup>|✔ | +|`KC_SYSTEM_SLEEP` |`KC_SLEP` |System Sleep |✔ |✔<sup>3</sup>|✔ | +|`KC_SYSTEM_WAKE` |`KC_WAKE` |System Wake | |✔<sup>3</sup>|✔ | +|`KC_AUDIO_MUTE` |`KC_MUTE` |Mute |✔ |✔ |✔ | +|`KC_AUDIO_VOL_UP` |`KC_VOLU` |Volume Up |✔ |✔<sup>4</sup>|✔ | +|`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |Volume Down |✔ |✔<sup>4</sup>|✔ | +|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |Next Track |✔ |✔<sup>5</sup>|✔ | +|`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |Previous Track |✔ |✔<sup>5</sup>|✔ | +|`KC_MEDIA_STOP` |`KC_MSTP` |Stop Track |✔ | |✔ | +|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |Play/Pause Track |✔ |✔ |✔ | +|`KC_MEDIA_SELECT` |`KC_MSEL` |Launch Media Player |✔ | |✔ | +|`KC_MEDIA_EJECT` |`KC_EJCT` |Eject | |✔ |✔ | +|`KC_MAIL` | |Launch Mail |✔ | |✔ | +|`KC_CALCULATOR` |`KC_CALC` |Launch Calculator |✔ | |✔ | +|`KC_MY_COMPUTER` |`KC_MYCM` |Launch My Computer |✔ | |✔ | +|`KC_WWW_SEARCH` |`KC_WSCH` |Browser Search |✔ | |✔ | +|`KC_WWW_HOME` |`KC_WHOM` |Browser Home |✔ | |✔ | +|`KC_WWW_BACK` |`KC_WBAK` |Browser Back |✔ | |✔ | +|`KC_WWW_FORWARD` |`KC_WFWD` |Browser Forward |✔ | |✔ | +|`KC_WWW_STOP` |`KC_WSTP` |Browser Stop |✔ | |✔ | +|`KC_WWW_REFRESH` |`KC_WREF` |Browser Refresh |✔ | |✔ | +|`KC_WWW_FAVORITES` |`KC_WFAV` |Browser Favorites |✔ | |✔ | +|`KC_MEDIA_FAST_FORWARD` |`KC_MFFD` |Next Track |✔ |✔<sup>5</sup>|✔ | +|`KC_MEDIA_REWIND` |`KC_MRWD` |Previous Track |✔<sup>6</sup>|✔<sup>5</sup>|✔ | +|`KC_BRIGHTNESS_UP` |`KC_BRIU` |Brightness Up |✔ |✔ |✔ | +|`KC_BRIGHTNESS_DOWN` |`KC_BRID` |Brightness Down |✔ |✔ |✔ | <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/> <sup>2. Treated as F13-F15.</sup><br/> @@ -678,6 +678,46 @@ See also: [One Shot Keys](one_shot_keys.md) |`OS_OFF` |Turns One Shot keys off | |`OS_TOGG` |Toggles One Shot keys status | +## Programmable Button Support :id=programmable-button + +See also: [Programmable Button](feature_programmable_button.md) + +|Key |Description | +|------------------------|----------------------| +|`PROGRAMMABLE_BUTTON_1` |Programmable button 1 | +|`PROGRAMMABLE_BUTTON_2` |Programmable button 2 | +|`PROGRAMMABLE_BUTTON_3` |Programmable button 3 | +|`PROGRAMMABLE_BUTTON_4` |Programmable button 4 | +|`PROGRAMMABLE_BUTTON_5` |Programmable button 5 | +|`PROGRAMMABLE_BUTTON_6` |Programmable button 6 | +|`PROGRAMMABLE_BUTTON_7` |Programmable button 7 | +|`PROGRAMMABLE_BUTTON_8` |Programmable button 8 | +|`PROGRAMMABLE_BUTTON_9` |Programmable button 9 | +|`PROGRAMMABLE_BUTTON_10`|Programmable button 10| +|`PROGRAMMABLE_BUTTON_11`|Programmable button 11| +|`PROGRAMMABLE_BUTTON_12`|Programmable button 12| +|`PROGRAMMABLE_BUTTON_13`|Programmable button 13| +|`PROGRAMMABLE_BUTTON_14`|Programmable button 14| +|`PROGRAMMABLE_BUTTON_15`|Programmable button 15| +|`PROGRAMMABLE_BUTTON_16`|Programmable button 16| +|`PROGRAMMABLE_BUTTON_17`|Programmable button 17| +|`PROGRAMMABLE_BUTTON_18`|Programmable button 18| +|`PROGRAMMABLE_BUTTON_19`|Programmable button 19| +|`PROGRAMMABLE_BUTTON_20`|Programmable button 20| +|`PROGRAMMABLE_BUTTON_21`|Programmable button 21| +|`PROGRAMMABLE_BUTTON_22`|Programmable button 22| +|`PROGRAMMABLE_BUTTON_23`|Programmable button 23| +|`PROGRAMMABLE_BUTTON_24`|Programmable button 24| +|`PROGRAMMABLE_BUTTON_25`|Programmable button 25| +|`PROGRAMMABLE_BUTTON_26`|Programmable button 26| +|`PROGRAMMABLE_BUTTON_27`|Programmable button 27| +|`PROGRAMMABLE_BUTTON_28`|Programmable button 28| +|`PROGRAMMABLE_BUTTON_29`|Programmable button 29| +|`PROGRAMMABLE_BUTTON_30`|Programmable button 30| +|`PROGRAMMABLE_BUTTON_31`|Programmable button 31| +|`PROGRAMMABLE_BUTTON_32`|Programmable button 32| +|`PB_1` to `PB_32` |Aliases for keymaps | + ## Space Cadet :id=space-cadet See also: [Space Cadet](feature_space_cadet.md) diff --git a/docs/keycodes_basic.md b/docs/keycodes_basic.md index 6a31204f33..6f6ef7a3fd 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 ## Punctuation -|Key |Aliases |Description | -|-----------------|-------------------|-----------------------------------------------| -|`KC_ENTER` |`KC_ENT` |Return (Enter) | -|`KC_ESCAPE` |`KC_ESC` |Escape | -|`KC_BSPACE` |`KC_BSPC` |Delete (Backspace) | -|`KC_TAB` | |Tab | -|`KC_SPACE` |`KC_SPC` |Spacebar | -|`KC_MINUS` |`KC_MINS` |`-` and `_` | -|`KC_EQUAL` |`KC_EQL` |`=` and `+` | -|`KC_LBRACKET` |`KC_LBRC` |`[` and `{` | -|`KC_RBRACKET` |`KC_RBRC` |`]` and `}` | -|`KC_BSLASH` |`KC_BSLS` |`\` and `\|` | -|`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` | -|`KC_SCOLON` |`KC_SCLN` |`;` and `:` | -|`KC_QUOTE` |`KC_QUOT` |`'` and `"` | -|`KC_GRAVE` |`KC_GRV`, `KC_ZKHK`|<code>`</code> and `~`, JIS Zenkaku/Hankaku| -|`KC_COMMA` |`KC_COMM` |`,` and `<` | -|`KC_DOT` | |`.` and `>` | -|`KC_SLASH` |`KC_SLSH` |`/` and `?` | -|`KC_NONUS_BSLASH`|`KC_NUBS` |Non-US `\` and `\|` | +|Key |Aliases |Description | +|--------------------|---------|--------------------------| +|`KC_ENTER` |`KC_ENT` |Return (Enter) | +|`KC_ESCAPE` |`KC_ESC` |Escape | +|`KC_BACKSPACE` |`KC_BSPC`|Delete (Backspace) | +|`KC_TAB` | |Tab | +|`KC_SPACE` |`KC_SPC` |Spacebar | +|`KC_MINUS` |`KC_MINS`|`-` and `_` | +|`KC_EQUAL` |`KC_EQL` |`=` and `+` | +|`KC_LEFT_BRACKET` |`KC_LBRC`|`[` and `{` | +|`KC_RIGHT_BRACKET` |`KC_RBRC`|`]` and `}` | +|`KC_BACKSLASH` |`KC_BSLS`|`\` and `\|` | +|`KC_NONUS_HASH` |`KC_NUHS`|Non-US `#` and `~` | +|`KC_SEMICOLON` |`KC_SCLN`|`;` and `:` | +|`KC_QUOTE` |`KC_QUOT`|`'` and `"` | +|`KC_GRAVE` |`KC_GRV` |<code>`</code> and `~`| +|`KC_COMMA` |`KC_COMM`|`,` and `<` | +|`KC_DOT` | |`.` and `>` | +|`KC_SLASH` |`KC_SLSH`|`/` and `?` | +|`KC_NONUS_BACKSLASH`|`KC_NUBS`|Non-US `\` and `\|` | ## Lock Keys -|Key |Aliases |Description | -|-------------------|--------------------|------------------------------------| -|`KC_CAPSLOCK` |`KC_CLCK`, `KC_CAPS`|Caps Lock | -|`KC_SCROLLLOCK` |`KC_SLCK`, `KC_BRMD`|Scroll Lock, Brightness Down (macOS)| -|`KC_NUMLOCK` |`KC_NLCK` |Keypad Num Lock and Clear | -|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock | -|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock | -|`KC_LOCKING_SCROLL`|`KC_LSCR` |Locking Scroll Lock | +|Key |Aliases |Description | +|------------------------|--------------------|------------------------------------| +|`KC_CAPS_LOCK` |`KC_CAPS` |Caps Lock | +|`KC_SCROLL_LOCK` |`KC_SCRL`, `KC_BRMD`|Scroll Lock, Brightness Down (macOS)| +|`KC_NUM_LOCK` |`KC_NUM` |Keypad Num Lock and Clear | +|`KC_LOCKING_CAPS_LOCK` |`KC_LCAP` |Locking Caps Lock | +|`KC_LOCKING_NUM_LOCK` |`KC_LNUM` |Locking Num Lock | +|`KC_LOCKING_SCROLL_LOCK`|`KC_LSCR` |Locking Scroll Lock | ## Modifiers -|Key |Aliases |Description | -|-----------|--------------------|------------------------------------| -|`KC_LCTRL` |`KC_LCTL` |Left Control | -|`KC_LSHIFT`|`KC_LSFT` |Left Shift | -|`KC_LALT` |`KC_LOPT` |Left Alt (Option) | -|`KC_LGUI` |`KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) | -|`KC_RCTRL` |`KC_RCTL` |Right Control | -|`KC_RSHIFT`|`KC_RSFT` |Right Shift | -|`KC_RALT` |`KC_ROPT`, `KC_ALGR`|Right Alt (Option/AltGr) | -|`KC_RGUI` |`KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key)| +|Key |Aliases |Description | +|----------------|-------------------------------|------------------------------------| +|`KC_LEFT_CTRL` |`KC_LCTL` |Left Control | +|`KC_LEFT_SHIFT` |`KC_LSFT` |Left Shift | +|`KC_LEFT_ALT` |`KC_LALT`, `KC_LOPT` |Left Alt (Option) | +|`KC_LEFT_GUI` |`KC_LGUI`, `KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) | +|`KC_RIGHT_CTRL` |`KC_RCTL` |Right Control | +|`KC_RIGHT_SHIFT`|`KC_RSFT` |Right Shift | +|`KC_RIGHT_ALT` |`KC_RALT`, `KC_ROPT`, `KC_ALGR`|Right Alt (Option/AltGr) | +|`KC_RIGHT_GUI` |`KC_RGUI`, `KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key)| ## International -|Key |Aliases |Description | -|----------|---------|---------------------| -|`KC_INT1` |`KC_RO` |JIS `\` and `_` | -|`KC_INT2` |`KC_KANA`|JIS Katakana/Hiragana| -|`KC_INT3` |`KC_JYEN`|JIS `¥` and `\|` | -|`KC_INT4` |`KC_HENK`|JIS Henkan | -|`KC_INT5` |`KC_MHEN`|JIS Muhenkan | -|`KC_INT6` | |JIS Numpad `,` | -|`KC_INT7` | |International 7 | -|`KC_INT8` | |International 8 | -|`KC_INT9` | |International 9 | -|`KC_LANG1`|`KC_HAEN`|Hangul/English | -|`KC_LANG2`|`KC_HANJ`|Hanja | -|`KC_LANG3`| |JIS Katakana | -|`KC_LANG4`| |JIS Hiragana | -|`KC_LANG5`| |JIS Zenkaku/Hankaku | -|`KC_LANG6`| |Language 6 | -|`KC_LANG7`| |Language 7 | -|`KC_LANG8`| |Language 8 | -|`KC_LANG9`| |Language 9 | +|Key |Aliases |Description | +|--------------------|---------|---------------------| +|`KC_INTERNATIONAL_1`|`KC_INT1`|JIS `\` and `_` | +|`KC_INTERNATIONAL_2`|`KC_INT2`|JIS Katakana/Hiragana| +|`KC_INTERNATIONAL_3`|`KC_INT3`|JIS `¥` and `\|` | +|`KC_INTERNATIONAL_4`|`KC_INT4`|JIS Henkan | +|`KC_INTERNATIONAL_5`|`KC_INT5`|JIS Muhenkan | +|`KC_INTERNATIONAL_6`|`KC_INT6`|JIS Numpad `,` | +|`KC_INTERNATIONAL_7`|`KC_INT7`|International 7 | +|`KC_INTERNATIONAL_8`|`KC_INT8`|International 8 | +|`KC_INTERNATIONAL_9`|`KC_INT9`|International 9 | +|`KC_LANGUAGE_1` |`KC_LNG1`|Hangul/English | +|`KC_LANGUAGE_2` |`KC_LNG2`|Hanja | +|`KC_LANGUAGE_3` |`KC_LNG3`|JIS Katakana | +|`KC_LANGUAGE_4` |`KC_LNG4`|JIS Hiragana | +|`KC_LANGUAGE_5` |`KC_LNG5`|JIS Zenkaku/Hankaku | +|`KC_LANGUAGE_6` |`KC_LNG6`|Language 6 | +|`KC_LANGUAGE_7` |`KC_LNG7`|Language 7 | +|`KC_LANGUAGE_8` |`KC_LNG8`|Language 8 | +|`KC_LANGUAGE_9` |`KC_LNG9`|Language 9 | ## Commands -|Key |Aliases |Description | -|------------------|------------------------------|--------------------------------------| -|`KC_PSCREEN` |`KC_PSCR` |Print Screen | -|`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU`|Pause, Brightness Up (macOS) | -|`KC_INSERT` |`KC_INS` |Insert | -|`KC_HOME` | |Home | -|`KC_PGUP` | |Page Up | -|`KC_DELETE` |`KC_DEL` |Forward Delete | -|`KC_END` | |End | -|`KC_PGDOWN` |`KC_PGDN` |Page Down | -|`KC_RIGHT` |`KC_RGHT` |Right Arrow | -|`KC_LEFT` | |Left Arrow | -|`KC_DOWN` | |Down Arrow | -|`KC_UP` | |Up Arrow | -|`KC_APPLICATION` |`KC_APP` |Application (Windows Context Menu Key)| -|`KC_POWER` | |System Power | -|`KC_EXECUTE` |`KC_EXEC` |Execute | -|`KC_HELP` | |Help | -|`KC_MENU` | |Menu | -|`KC_SELECT` |`KC_SLCT` |Select | -|`KC_STOP` | |Stop | -|`KC_AGAIN` |`KC_AGIN` |Again | -|`KC_UNDO` | |Undo | -|`KC_CUT` | |Cut | -|`KC_COPY` | |Copy | -|`KC_PASTE` |`KC_PSTE` |Paste | -|`KC_FIND` | |Find | -|`KC__MUTE` | |Mute | -|`KC__VOLUP` | |Volume Up | -|`KC__VOLDOWN` | |Volume Down | -|`KC_ALT_ERASE` |`KC_ERAS` |Alternate Erase | -|`KC_SYSREQ` | |SysReq/Attention | -|`KC_CANCEL` | |Cancel | -|`KC_CLEAR` |`KC_CLR` |Clear | -|`KC_PRIOR` | |Prior | -|`KC_RETURN` | |Return | -|`KC_SEPARATOR` | |Separator | -|`KC_OUT` | |Out | -|`KC_OPER` | |Oper | -|`KC_CLEAR_AGAIN` | |Clear/Again | -|`KC_CRSEL` | |CrSel/Props | -|`KC_EXSEL` | |ExSel | +|Key |Aliases |Description | +|--------------------|------------------------------|--------------------------------------| +|`KC_PRINT_SCREEN` |`KC_PSCR` |Print Screen | +|`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU`|Pause, Brightness Up (macOS) | +|`KC_INSERT` |`KC_INS` |Insert | +|`KC_HOME` | |Home | +|`KC_PAGE_UP` |`KC_PGUP` |Page Up | +|`KC_DELETE` |`KC_DEL` |Forward Delete | +|`KC_END` | |End | +|`KC_PAGE_DOWN` |`KC_PGDN` |Page Down | +|`KC_RIGHT` |`KC_RGHT` |Right Arrow | +|`KC_LEFT` | |Left Arrow | +|`KC_DOWN` | |Down Arrow | +|`KC_UP` | |Up Arrow | +|`KC_APPLICATION` |`KC_APP` |Application (Windows Context Menu Key)| +|`KC_KB_POWER` | |System Power | +|`KC_EXECUTE` |`KC_EXEC` |Execute | +|`KC_HELP` | |Help | +|`KC_MENU` | |Menu | +|`KC_SELECT` |`KC_SLCT` |Select | +|`KC_STOP` | |Stop | +|`KC_AGAIN` |`KC_AGIN` |Again | +|`KC_UNDO` | |Undo | +|`KC_CUT` | |Cut | +|`KC_COPY` | |Copy | +|`KC_PASTE` |`KC_PSTE` |Paste | +|`KC_FIND` | |Find | +|`KC_KB_MUTE` | |Mute | +|`KC_KB_VOLUME_UP` | |Volume Up | +|`KC_KB_VOLUME_DOWN` | |Volume Down | +|`KC_ALTERNATE_ERASE`|`KC_ERAS` |Alternate Erase | +|`KC_SYSTEM_REQUEST` |`KC_SYRQ` |SysReq/Attention | +|`KC_CANCEL` |`KC_CNCL` |Cancel | +|`KC_CLEAR` |`KC_CLR` |Clear | +|`KC_PRIOR` |`KC_PRIR` |Prior | +|`KC_RETURN` |`KC_RETN` |Return | +|`KC_SEPARATOR` |`KC_SEPR` |Separator | +|`KC_OUT` | |Out | +|`KC_OPER` | |Oper | +|`KC_CLEAR_AGAIN` |`KC_CLAG` |Clear/Again | +|`KC_CRSEL` |`KC_CRSL` |CrSel/Props | +|`KC_EXSEL` |`KC_EXSL` |ExSel | ## Media Keys diff --git a/docs/keymap.md b/docs/keymap.md index ef476e87f5..bec781e684 100644 --- a/docs/keymap.md +++ b/docs/keymap.md @@ -105,7 +105,7 @@ At the top of the file you'll find this: #include QMK_KEYBOARD_H // Helpful defines - #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)) + #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)) /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 [_FL] = LAYOUT( 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, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SCRL, KC_PAUS, _______, _______, _______, _______, \ _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ _______, _______, _______, _______, _______,_______, _______, _______, _______, 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 3e7acdba7a..1d0e4dda16 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 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: -```sh +``` git branch old_master master ``` @@ -18,7 +18,7 @@ Now you have a branch named `old_master` that is a duplicate of your `master` br 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: -```sh +``` QMKuser ~/qmk_firmware (master) $ git remote -v origin https://github.com/<your_username>/qmk_firmware.git (fetch) @@ -29,7 +29,7 @@ upstream https://github.com/qmk/qmk_firmware.git (push) If you only see one fork referenced: -```sh +``` QMKuser ~/qmk_firmware (master) $ git remote -v origin https://github.com/qmk/qmk_firmware.git (fetch) @@ -38,31 +38,31 @@ origin https://github.com/qmk/qmk_firmware.git (push) add a new remote with: -```sh +``` git remote add upstream https://github.com/qmk/qmk_firmware.git ``` Then, redirect the `origin` remote to your own fork with: -```sh +``` git remote set-url origin https://github.com/<your_username>/qmk_firmware.git ``` Now that you have both remotes configured, you need to update the references for the upstream repository, which is QMK's, by running: -```sh +``` git fetch upstream ``` At this point, resynchronize your branch to QMK's by running: -```sh +``` git reset --hard upstream/master ``` 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: -```sh +``` git push --force-with-lease ``` diff --git a/docs/reference_configurator_support.md b/docs/reference_configurator_support.md index ba3d49e2b2..db6cd80a20 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} k40 | {"label":"0", "x":0, "y":4, "w":2} k42 | {"label":".", "x":2, "y":4} -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. +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. ## Issues and Hazards diff --git a/docs/ru-ru/getting_started_github.md b/docs/ru-ru/getting_started_github.md index 120f3c24ec..7a70926f50 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 Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' -Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2' ``` Теперь у вас есть форк QMK на вашем локальном компьютере, и вы можете добавить свою раскладку, скомпилировать ее и прошить ей свою клавиатуру. Как только вы будете довольны своими изменениями, есть возможность добавить, зафиксировать их и сделать коммит в свой форк следующим образом: diff --git a/docs/tap_hold.md b/docs/tap_hold.md index 71bff30baa..5a4c209617 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`: 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. -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. +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. For more granular control of this feature, you can add the following to your `config.h`: @@ -260,7 +260,7 @@ You can then add the following function to your keymap: ```c bool get_retro_tapping(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case LT(2, KC_SPACE): + case LT(2, KC_SPC): return true; default: return false; diff --git a/docs/understanding_qmk.md b/docs/understanding_qmk.md index da622044c3..e0c2ab7dc3 100644 --- a/docs/understanding_qmk.md +++ b/docs/understanding_qmk.md @@ -29,7 +29,6 @@ Within `keyboard_task()` you'll find code to handle: * [Matrix Scanning](#matrix-scanning) * Mouse Handling * Serial Link(s) -* Visualizer * Keyboard status LEDs (Caps Lock, Num Lock, Scroll Lock) #### Matrix Scanning @@ -67,10 +66,10 @@ At the keyboard level we define a C macro (typically named `LAYOUT()`) which map k30, k31, k32, k33, \ k40, k42 \ ) { \ - { k00, k01, k02, k03, }, \ - { k10, k11, k12, k13, }, \ - { k20, k21, k22, KC_NO, }, \ - { k30, k31, k32, k33, }, \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, KC_NO }, \ + { k30, k31, k32, k33 }, \ { k40, KC_NO, k42, KC_NO } \ } ``` @@ -83,14 +82,15 @@ You can also use this macro to handle unusual matrix layouts, for example the [C 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: -``` +```c const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = LAYOUT( - KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ - KC_P7, KC_P8, KC_P9, KC_PPLS, \ - KC_P4, KC_P5, KC_P6, \ - KC_P1, KC_P2, KC_P3, KC_PENT, \ - KC_P0, KC_PDOT) + [0] = LAYOUT( + KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_P0, KC_PDOT + ) } ``` @@ -124,7 +124,7 @@ And when our current scan completes it will look like this: } ``` -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. +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. <!-- FIXME: Magic happens between here and process_record --> @@ -180,10 +180,6 @@ FIXME: This needs to be written FIXME: This needs to be written -#### Visualizer - -FIXME: This needs to be written - #### Keyboard state LEDs (Caps Lock, Num Lock, Scroll Lock) FIXME: This needs to be written diff --git a/docs/unit_testing.md b/docs/unit_testing.md index a0eef51cb6..47a1055796 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 ## Adding Tests for New or Existing Features -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. +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. 1. If it doesn't already exist, add a test subfolder to the folder containing the feature. 2. Create a `testlist.mk` and a `rules.mk` file in that folder. 3. Include those files from the root folder `testlist.mk`and `build_test.mk` respectively. -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. +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. 5. Define the source files and required options in the `rules.mk` file. * `_SRC` for source files * `_DEFS` for additional defines @@ -44,7 +44,7 @@ If there are problems with the tests, you can find the executable in the `./buil To forward any [debug messages](unit_testing.md#debug-api) to `stderr`, the tests can run with `DEBUG=1`. For example -```console +``` make test:all DEBUG=1 ``` diff --git a/docs/zh-cn/getting_started_github.md b/docs/zh-cn/getting_started_github.md index 65994754b9..b4e8e9fa5d 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 Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' -Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2' ``` 现在你本地计算机有QMK的分叉了,你可以添加你的布局了, 为你的键盘编译并刷新固件吧。如果你觉得你的修改很不错, 你可以添加,提交,然后想你的分叉推出(pull)你的改变,像这样: |