mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-08-09 17:18:40 +00:00
Compare commits
72 Commits
0.25.2
...
deploy-too
Author | SHA1 | Date | |
---|---|---|---|
![]() |
33f5e67408 | ||
![]() |
3ffe8d917a | ||
![]() |
12379dc1eb | ||
![]() |
d6bfbdb6b1 | ||
![]() |
cc0b2f9814 | ||
![]() |
5624804c68 | ||
![]() |
2bde8ce206 | ||
![]() |
086e8e938e | ||
![]() |
cd374b1500 | ||
![]() |
9d02ac37f7 | ||
![]() |
603586800c | ||
![]() |
90b043e01c | ||
![]() |
5f794217b4 | ||
![]() |
b71b81d539 | ||
![]() |
17ae6f9b53 | ||
![]() |
cebe521b11 | ||
![]() |
0b572a1be6 | ||
![]() |
378dbd32bd | ||
![]() |
03e688e91f | ||
![]() |
d5e0562a70 | ||
![]() |
191c8cca33 | ||
![]() |
7aa2ce2b38 | ||
![]() |
6f03d20a92 | ||
![]() |
e5c80fc6b3 | ||
![]() |
aa11ef5bcf | ||
![]() |
a6ef34cd16 | ||
![]() |
4fdde75333 | ||
![]() |
dafc46f1d1 | ||
![]() |
baa564bddf | ||
![]() |
3f44231d2d | ||
![]() |
4864d5afca | ||
![]() |
089a819179 | ||
![]() |
751fbd75d3 | ||
![]() |
3c868b9316 | ||
![]() |
7ac1a34a34 | ||
![]() |
ad82c4703a | ||
![]() |
0262161914 | ||
![]() |
d4654ab893 | ||
![]() |
aec7569a04 | ||
![]() |
0594121b68 | ||
![]() |
4e8b740dd7 | ||
![]() |
c92becc57e | ||
![]() |
cd565a95a0 | ||
![]() |
caf13bb9db | ||
![]() |
4a4eda4c3c | ||
![]() |
942c2a8d5a | ||
![]() |
be9dfe65dd | ||
![]() |
fa40356250 | ||
![]() |
7247039742 | ||
![]() |
e69d30a9e9 | ||
![]() |
bdd10ef8e7 | ||
![]() |
031ca3b40b | ||
![]() |
8041a88f5d | ||
![]() |
8b5cdfabf5 | ||
![]() |
df4538d894 | ||
![]() |
e484a3a179 | ||
![]() |
9dc183afe4 | ||
![]() |
e7a08ef1a9 | ||
![]() |
950d765370 | ||
![]() |
260e9a546e | ||
![]() |
a4da5f219f | ||
![]() |
6d365dd8f1 | ||
![]() |
8253697a63 | ||
![]() |
282253a7e0 | ||
![]() |
41dbb4c86c | ||
![]() |
78a0adfbb4 | ||
![]() |
fa6d23235b | ||
![]() |
119e54e9e3 | ||
![]() |
32af90ae84 | ||
![]() |
8a394503c7 | ||
![]() |
8b84fa6b50 | ||
![]() |
b39285807e |
36
.github/workflows/docs.yml
vendored
36
.github/workflows/docs.yml
vendored
@@ -7,7 +7,6 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- vitepress
|
||||
paths:
|
||||
- 'builddefs/docsgen/**'
|
||||
- 'tmk_core/**'
|
||||
@@ -15,6 +14,11 @@ on:
|
||||
- 'platforms/**'
|
||||
- 'docs/**'
|
||||
- '.github/workflows/docs.yml'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'builddefs/docsgen/**'
|
||||
- 'docs/**'
|
||||
- '.github/workflows/docs.yml'
|
||||
|
||||
defaults:
|
||||
run:
|
||||
@@ -25,9 +29,6 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
container: ghcr.io/qmk/qmk_cli
|
||||
|
||||
# protect against those who develop with their fork on master
|
||||
if: github.repository == 'qmk/qmk_firmware' || (github.repository == 'tzarc/qmk_firmware' && github.ref == 'refs/heads/vitepress')
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -35,10 +36,10 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apt-get update && apt-get install -y rsync doxygen curl
|
||||
apt-get update && apt-get install -y rsync doxygen
|
||||
# install nvm
|
||||
touch $HOME/.bashrc
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
|
||||
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
|
||||
|
||||
- name: Install node
|
||||
run: |
|
||||
@@ -46,29 +47,15 @@ jobs:
|
||||
nvm install 20
|
||||
nvm use 20
|
||||
corepack enable
|
||||
npm install -g moxygen
|
||||
|
||||
- name: Build docs
|
||||
run: |
|
||||
source $HOME/.bashrc
|
||||
nvm use 20
|
||||
qmk --verbose generate-docs
|
||||
touch '.build/docs/.nojekyll'
|
||||
|
||||
- name: Set CNAME
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
run: |
|
||||
# Override target CNAME
|
||||
echo 'docs.qmk.fm' > .build/docs/CNAME
|
||||
|
||||
- name: Override CNAME
|
||||
if: github.repository == 'tzarc/qmk_firmware'
|
||||
run: |
|
||||
# Temporarily override target CNAME during development
|
||||
echo 'vitepress.qmk.fm' > .build/docs/CNAME
|
||||
|
||||
- name: Deploy
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
if: ${{ github.event_name == 'push' && github.repository == 'qmk/qmk_firmware' }}
|
||||
uses: JamesIves/github-pages-deploy-action@v4.6.1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -76,10 +63,3 @@ jobs:
|
||||
folder: .build/docs
|
||||
git-config-name: QMK Bot
|
||||
git-config-email: hello@qmk.fm
|
||||
|
||||
- name: Deploy
|
||||
if: github.repository == 'tzarc/qmk_firmware'
|
||||
uses: JamesIves/github-pages-deploy-action@v4.6.1
|
||||
with:
|
||||
branch: gh-pages
|
||||
folder: .build/docs
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -25,6 +25,7 @@
|
||||
*.la
|
||||
*.stackdump
|
||||
*.sym
|
||||
qmk_toolchains*
|
||||
|
||||
# QMK-specific
|
||||
api_data/v1
|
||||
|
15
Makefile
15
Makefile
@@ -465,3 +465,18 @@ distclean_userspace: clean
|
||||
rm -f $(QMK_USERSPACE)/*.bin $(QMK_USERSPACE)/*.hex $(QMK_USERSPACE)/*.uf2
|
||||
echo 'done.'
|
||||
endif
|
||||
|
||||
# Extra targets for formatting and/or pytest, running within the qmk/qmk_cli container to match GHA.
|
||||
CONTAINER_PREAMBLE := export HOME="/tmp"; export PATH="/tmp/.local/bin:\$$PATH"; python3 -m pip install --upgrade pip; python3 -m pip install -r requirements-dev.txt
|
||||
|
||||
.PHONY: format-core
|
||||
format-core:
|
||||
RUNTIME=docker ./util/docker_cmd.sh bash -lic "$(CONTAINER_PREAMBLE); qmk format-c --core-only -a && qmk format-python -a"
|
||||
|
||||
.PHONY: pytest
|
||||
pytest:
|
||||
RUNTIME=docker ./util/docker_cmd.sh bash -lic "$(CONTAINER_PREAMBLE); qmk pytest"
|
||||
|
||||
.PHONY: format-and-pytest
|
||||
format-and-pytest:
|
||||
RUNTIME=docker ./util/docker_cmd.sh bash -lic "$(CONTAINER_PREAMBLE); qmk format-c --core-only -a && qmk format-python -a && qmk pytest"
|
||||
|
@@ -28,10 +28,10 @@ export default defineConfig(({ mode }) => {
|
||||
themeConfig: {
|
||||
// https://vitepress.dev/reference/default-theme-config
|
||||
logo: {
|
||||
light: "/badge-community-light.svg",
|
||||
dark: "/badge-community-dark.svg",
|
||||
light: "/qmk-logo-light.svg",
|
||||
dark: "/qmk-logo-dark.svg",
|
||||
},
|
||||
siteTitle: false,
|
||||
title: 'QMK Firmware',
|
||||
|
||||
nav: [{ text: "Home", link: "./" }],
|
||||
|
||||
|
@@ -2,11 +2,22 @@
|
||||
import DefaultTheme from 'vitepress/theme'
|
||||
import { useRouter } from 'vitepress'
|
||||
import { onBeforeMount } from 'vue';
|
||||
import aliases from "../../../../docs/_aliases.json";
|
||||
|
||||
const router = useRouter()
|
||||
onBeforeMount(async () => {
|
||||
if (window.location.href.includes('/#/')) {
|
||||
const newUrl = window.location.href.replace(/\/#\//, '/').replace(/\?id=/, '#');
|
||||
// Convert from docsify-style to vitepress-style URLs
|
||||
let newUrl = window.location.href.replace(/\/#\//, '/').replace(/\?id=/, '#');
|
||||
|
||||
// Convert any aliases
|
||||
let testUrl = new URL(newUrl);
|
||||
while (testUrl.pathname in aliases) {
|
||||
testUrl.pathname = aliases[testUrl.pathname];
|
||||
}
|
||||
newUrl = testUrl.toString();
|
||||
|
||||
// Redirect if required
|
||||
if (newUrl != window.location.href) {
|
||||
window.history.replaceState({}, '', newUrl);
|
||||
await router.go(newUrl);
|
||||
}
|
||||
|
@@ -1,19 +1,19 @@
|
||||
/* Override <kbd> as vitepress doesn't put them with borders */
|
||||
kbd {
|
||||
border: 1px solid var(--vp-c-text-1);
|
||||
border-radius: 0.6em;
|
||||
border-radius: 5px;
|
||||
margin: 0.2em;
|
||||
padding: 0.2em;
|
||||
}
|
||||
|
||||
:root {
|
||||
--vp-nav-logo-height: 100%;
|
||||
--vp-nav-logo-height: 32px;
|
||||
|
||||
--vp-layout-max-width: calc(98% + 64px);
|
||||
|
||||
--vp-sidebar-width: 300px;
|
||||
}
|
||||
|
||||
.logo {
|
||||
padding-bottom: 0.2em;
|
||||
}
|
||||
|
||||
.VPNavBarTitle.has-sidebar .title {
|
||||
border-bottom: 0;
|
||||
.VPDoc.has-aside .content-container {
|
||||
max-width: unset !important;
|
||||
}
|
||||
|
@@ -40,7 +40,8 @@
|
||||
"pattern": "^[0-9a-z_/\\-]+\\.json$"
|
||||
},
|
||||
"key_unit": {
|
||||
"type": "number"
|
||||
"type": "number",
|
||||
"minimum": 0
|
||||
},
|
||||
"keyboard": {
|
||||
"type": "string",
|
||||
|
@@ -515,8 +515,8 @@
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"x": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||
"y": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||
"x": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"y": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"flags": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
|
||||
}
|
||||
}
|
||||
@@ -601,8 +601,8 @@
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"x": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||
"y": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||
"x": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"y": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"flags": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
|
||||
}
|
||||
}
|
||||
|
@@ -2,8 +2,6 @@
|
||||
"keyboard_name": "%KEYBOARD%",
|
||||
"maintainer": "%USER_NAME%",
|
||||
"manufacturer": "%REAL_NAME%",
|
||||
"processor": "%MCU%",
|
||||
"bootloader": "%BOOTLOADER%",
|
||||
"diode_direction": "COL2ROW",
|
||||
"matrix_pins": {
|
||||
"cols": ["C2"],
|
||||
|
@@ -10,11 +10,11 @@ It is also now possible to define combos that have keys overlapping with other c
|
||||
|
||||
### Key Overrides ([#11422](https://github.com/qmk/qmk_firmware/pull/11422)) {#key-overrides}
|
||||
|
||||
QMK now has a new feature: [key overrides](../feature_key_overrides). This feature allows for overriding the output of key combinations involving modifiers. As an example, pressing <kbd>Shift+2</kbd> normally results in an <kbd>@</kbd> on US-ANSI keyboard layouts -- the new key overrides allow for adding similar functionality, but for any <kbd>modifier + key</kbd> press.
|
||||
QMK now has a new feature: [key overrides](../features/key_overrides). This feature allows for overriding the output of key combinations involving modifiers. As an example, pressing <kbd>Shift+2</kbd> normally results in an <kbd>@</kbd> on US-ANSI keyboard layouts -- the new key overrides allow for adding similar functionality, but for any <kbd>modifier + key</kbd> press.
|
||||
|
||||
To illustrate, it's now possible to use the key overrides feature to translate <kbd>Shift + Backspace</kbd> into <kbd>Delete</kbd> -- an often-requested example of where this functionality comes in handy.
|
||||
|
||||
There's far more to describe that what lives in this changelog, so head over to the [key overrides documentation](../feature_key_overrides) for more examples and info.
|
||||
There's far more to describe that what lives in this changelog, so head over to the [key overrides documentation](../features/key_overrides) for more examples and info.
|
||||
|
||||
### Digitizer support ([#12851](https://github.com/qmk/qmk_firmware/pull/12851))
|
||||
|
||||
|
@@ -31,7 +31,7 @@ QMK now has core-supplied support for the following pointing device peripherals:
|
||||
| `POINTING_DEVICE_DRIVER = pimoroni_trackball` | Pimoroni Trackball |
|
||||
| `POINTING_DEVICE_DRIVER = pmw3360` | PMW 3360 |
|
||||
|
||||
See the new documentation for the [Pointing Device](../feature_pointing_device) feature for more information on specific configuration for each driver.
|
||||
See the new documentation for the [Pointing Device](../features/pointing_device) feature for more information on specific configuration for each driver.
|
||||
|
||||
### Dynamic Tapping Term ([#11036](https://github.com/qmk/qmk_firmware/pull/11036)) {#dynamic-tapping-term}
|
||||
|
||||
@@ -116,7 +116,7 @@ Related to the previous section -- RGB Matrix modes have now been made to be opt
|
||||
|
||||
Most keyboards keep their original functionality, but over time the QMK maintainers have found that removal of animations ends up being the quickest way to free up space... and some keyboards have had animations such as reactive effects disabled by default in order to still fit within the flash space available.
|
||||
|
||||
The full list of configurables to turn specific animations back on can be found at on the [RGB Matrix documentation](../feature_rgb_matrix#rgb-matrix-effects) page.
|
||||
The full list of configurables to turn specific animations back on can be found at on the [RGB Matrix documentation](../features/rgb_matrix#rgb-matrix-effects) page.
|
||||
|
||||
### OLED task refactoring ([#14864](https://github.com/qmk/qmk_firmware/pull/14864)) {#oled-task-refactor}
|
||||
|
||||
|
@@ -12,7 +12,7 @@ Something something *Lets go gamers!*
|
||||
|
||||
Pointing devices can now be shared across a split keyboard with support for a single pointing device or a pointing device on each side.
|
||||
|
||||
See the [Pointing Device](../feature_pointing_device) documentation for further configuration options.
|
||||
See the [Pointing Device](../features/pointing_device) documentation for further configuration options.
|
||||
|
||||
## Changes Requiring User Action {#changes-requiring-user-action}
|
||||
|
||||
|
@@ -8,7 +8,7 @@ This is a new feature that allows for capslock-like functionality that turns its
|
||||
|
||||
For instance, if you wish to type "QMK" without holding shift the entire time, you can either tap both left and right shift, or double-tap shift, to turn on _Caps Word_ -- then type `qmk` (lowercase) without holding shift. Once you hit any key other than `a`--`z`, `0`--`9`, `-`, `_`, delete, or backspace, this will go back to normal typing!
|
||||
|
||||
There are other activation mechanisms as well as configurable options like timeout and the like -- see the [Caps Word documentation](../feature_caps_word) for more information.
|
||||
There are other activation mechanisms as well as configurable options like timeout and the like -- see the [Caps Word documentation](../features/caps_word) for more information.
|
||||
|
||||
### Quantum Painter ([#10174](https://github.com/qmk/qmk_firmware/pull/10174)) {#quantum-painter}
|
||||
|
||||
@@ -26,7 +26,7 @@ Quantum Painter is not supported on AVR due to complexity and size constraints.
|
||||
|
||||
### Encoder Mapping ([#13286](https://github.com/qmk/qmk_firmware/pull/13286)) {#encoder-mapping}
|
||||
|
||||
One of the long-standing complaints with Encoders is that there has been no easy way to configure them in user keymaps. [#13286](https://github.com/qmk/qmk_firmware/pull/13286) added support for [Encoder Mapping](../feature_encoders#encoder-map), which allows users to define encoder functionality in a similar way to their normal keymap.
|
||||
One of the long-standing complaints with Encoders is that there has been no easy way to configure them in user keymaps. [#13286](https://github.com/qmk/qmk_firmware/pull/13286) added support for [Encoder Mapping](../features/encoders#encoder-map), which allows users to define encoder functionality in a similar way to their normal keymap.
|
||||
|
||||
::: warning
|
||||
This is not yet supported by QMK Configurator. It is also unlikely to ever be supported by VIA.
|
||||
|
@@ -83,7 +83,7 @@ The now-EOL kbfirmware allowed people who aren't set up with QMK the ability to
|
||||
|
||||
QMK has had the ability to write to internal MCU flash in order to emulate EEPROM for some time now, but it was only limited to a small number of MCUs. The base HAL used by QMK for a large number of ARM devices provides a "proper" embedded MCU flash driver, so _@tzarc_ decoupled the wear-leveling algorithm from the old flash writing code, improved it, wrote some tests, and enabled its use for a much larger number of other devices... including RP2040's XIP flash, and external SPI NOR Flash.
|
||||
|
||||
See the [EEPROM Driver](../eeprom_driver) documentation for more information.
|
||||
See the [EEPROM Driver](../drivers/eeprom) documentation for more information.
|
||||
|
||||
### Pointing Device Improvements ([#16371](https://github.com/qmk/qmk_firmware/pull/16371), [#17111](https://github.com/qmk/qmk_firmware/pull/17111), [#17176](https://github.com/qmk/qmk_firmware/pull/17176), [#17482](https://github.com/qmk/qmk_firmware/pull/17482), [#17776](https://github.com/qmk/qmk_firmware/pull/17776), [#17613](https://github.com/qmk/qmk_firmware/pull/17613)) {#pointing-device-improvements}
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
### Autocorrect ([#15699](https://github.com/qmk/qmk_firmware/pull/15699)) {#autocorrect}
|
||||
|
||||
_@getreuer_ in their infinite wisdom decided that autocorrect was a feature needed by QMK. As is customary, _@drashna_ adapted it to core and got it into a state that everyone else can use it. See [Feature: Autocorrect](../feature_autocorrect) for more ifnormation (grin).
|
||||
_@getreuer_ in their infinite wisdom decided that autocorrect was a feature needed by QMK. As is customary, _@drashna_ adapted it to core and got it into a state that everyone else can use it. See [Feature: Autocorrect](../features/autocorrect) for more ifnormation (grin).
|
||||
|
||||
## Changes Requiring User Action {#changes-requiring-user-action}
|
||||
|
||||
@@ -132,7 +132,7 @@ The equivalent transformations should be done for LED Matrix boards.
|
||||
|
||||
### Unicode mode refactoring {#unicode-mode-renaming}
|
||||
|
||||
Unicode modes were renamed in order to prevent collision with equivalent keycodes. The available values for `UNICODE_SELECTED_MODES` changed -- see [Feature: Unicode](../feature_unicode#setting-the-input-mode) for the new list of values and how to configure them.
|
||||
Unicode modes were renamed in order to prevent collision with equivalent keycodes. The available values for `UNICODE_SELECTED_MODES` changed -- see [Feature: Unicode](../features/unicode#setting-the-input-mode) for the new list of values and how to configure them.
|
||||
|
||||
## Notable core changes {#notable-core}
|
||||
|
||||
|
@@ -106,7 +106,7 @@ void leader_end_user(void) {
|
||||
}
|
||||
```
|
||||
|
||||
For more information please see the [Leader Key documentation](../feature_leader_key).
|
||||
For more information please see the [Leader Key documentation](../features/leader_key).
|
||||
|
||||
### Updated Keyboard Codebases {#updated-keyboard-codebases}
|
||||
|
||||
|
@@ -24,7 +24,7 @@ Of note for keyboard designers:
|
||||
|
||||
A new pair of keys has been added to QMK -- namely `QK_REPEAT_KEY` and `QK_ALT_REPEAT_KEY` (shortened: `QK_REP`/`QK_AREP`). These allow you to repeat the last key pressed, or in the case of the alternate key, press the "opposite" of the last key. For example, if you press `KC_LEFT`, pressing `QK_REPEAT_KEY` afterwards repeats `KC_LEFT`, but pressing `QK_ALT_REPEAT_KEY` instead sends `KC_RIGHT`.
|
||||
|
||||
The full list of default alternate keys is available on the [Repeat Key](../feature_repeat_key) documentation.
|
||||
The full list of default alternate keys is available on the [Repeat Key](../features/repeat_key) documentation.
|
||||
|
||||
To enable these keys, in your keymap's `rules.mk`, add:
|
||||
|
||||
@@ -93,7 +93,7 @@ Additionally, this ensures that builds on QMK Configurator produce some sort of
|
||||
|
||||
The "classic" OLED driver picked up support for additional sizes of OLED displays, support for the SH1107 controller, and SPI-based OLED support.
|
||||
|
||||
Other configurable items are available and can be found on the [OLED Driver page](../feature_oled_driver).
|
||||
Other configurable items are available and can be found on the [OLED Driver page](../features/oled_driver).
|
||||
|
||||
## Full changelist {#full-changelist}
|
||||
|
||||
|
@@ -42,7 +42,7 @@ AVR sees minimal (if any) benefit -- `double` was interpreted as `float` on AVR
|
||||
|
||||
### Remove encoder in-matrix workaround code ([#20389](https://github.com/qmk/qmk_firmware/pull/20389)) {#remove-encoder-in-matrix-workaround-code}
|
||||
|
||||
Some keyboards "hacked" encoder support into spare slots in the key matrix in order to interoperate with VIA. This workaround is no longer necessary, and the code has been removed. If you have a keyboard that uses this workaround, you will need to update your keymap to use the new [Encoder Map](../feature_encoders#encoder-map) API instead.
|
||||
Some keyboards "hacked" encoder support into spare slots in the key matrix in order to interoperate with VIA. This workaround is no longer necessary, and the code has been removed. If you have a keyboard that uses this workaround, you will need to update your keymap to use the new [Encoder Map](../features/encoders#encoder-map) API instead.
|
||||
|
||||
### Unicodemap keycodes rename ([#21092](https://github.com/qmk/qmk_firmware/pull/21092)) {#unicodemap-keycodes-rename}
|
||||
|
||||
|
@@ -120,7 +120,7 @@ In some cases, accidental automatic activation of the mouse layer made it diffic
|
||||
|
||||
### DIP Switch Mapping ([#22543](https://github.com/qmk/qmk_firmware/pull/22543)) {#dip-switch-map}
|
||||
|
||||
Much like Encoder Mapping, DIP Switch Mapping allows for specifying a table of actions to execute when a DIP switch state changes. See the [DIP Switch Documentation](../feature_dip_switch#dip-switch-map) for more information.
|
||||
Much like Encoder Mapping, DIP Switch Mapping allows for specifying a table of actions to execute when a DIP switch state changes. See the [DIP Switch Documentation](../features/dip_switch#dip-switch-map) for more information.
|
||||
|
||||
```c
|
||||
#if defined(DIP_SWITCH_MAP_ENABLE)
|
||||
|
@@ -109,6 +109,16 @@ Essentially, changes were made in the internals of how QMK interacts with USB fo
|
||||
|
||||
Compliance checks were run against QMK firmwares for the most popular ARM microcontrollers, as well as suspend/resume tests. As far as we can tell, a whole host of hard-to-reproduce issues are mitigated by this change.
|
||||
|
||||
## Deprecation Notices
|
||||
|
||||
In line with the [notice period](../support_deprecation_policy#how-much-advance-notice-will-be-given), deprecation notices for larger items are listed here.
|
||||
|
||||
### Migration of VIA keymaps to VIA team control
|
||||
|
||||
The QMK team has been in discussion with the VIA maintainers and all VIA-related keymaps in the `qmk_firmware` repository will transition to a `qmk_userspace`-style repository under the VIA team's control at the end of the next breaking changes period. This allows the VIA team to support many more custom keyboard configurations, as well as reduces the turnaround time for any changes to the VIA protocol they wish to make.
|
||||
|
||||
At the end of the breaking changes cycle ending 2024-08-25, VIA-enabled keymaps will no longer be accepted into the QMK repository. At the time of migration, any open PRs against `qmk_firmware` which include new VIA-related keymaps will be subsequently be asked to remove those keymaps and instead raise a PR against the userspace repository containing all VIA keymaps.
|
||||
|
||||
## Full changelist {#full-changelist}
|
||||
|
||||
Core:
|
||||
|
@@ -41,7 +41,7 @@ Unrelated to styling, high-level tech.
|
||||

|
||||

|
||||
|
||||
<img src="./gitbook/images/color-wheel.svg" alt="HSV Color Wheel" width="250"/>
|
||||
<img src="./public/color-wheel.svg" alt="HSV Color Wheel" width="250"/>
|
||||
|
||||
### Lists
|
||||
|
||||
@@ -84,7 +84,7 @@ Nested mixed:
|
||||
* `lib/python/qmk/cli/generate/config_h.py`
|
||||
* `lib/python/qmk/cli/generate/rules_mk.py`
|
||||
|
||||
### Emoji :id=emoji
|
||||
### Emoji {#emoji}
|
||||
|
||||
#### Direct:
|
||||
|
||||
|
75
docs/_aliases.json
Normal file
75
docs/_aliases.json
Normal file
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"/adding_a_keyboard_to_qmk": "/hardware_keyboard_guidelines",
|
||||
"/build_environment_setup": "/newbs_getting_started",
|
||||
"/cli_dev_configuration": "/cli_configuration",
|
||||
"/dynamic_macros": "/feature_dynamic_macros",
|
||||
"/feature_common_shortcuts": "/feature_advanced_keycodes",
|
||||
"/flashing_bootloadhid": "/flashing",
|
||||
"/getting_started_build_tools": "/newbs_getting_started",
|
||||
"/getting_started_getting_help": "/support",
|
||||
"/glossary": "/reference_glossary",
|
||||
"/key_lock": "/feature_key_lock",
|
||||
"/make_instructions": "/getting_started_make_guide",
|
||||
"/python_development": "/cli_development",
|
||||
"/space_cadet_shift": "/feature_space_cadet_shift",
|
||||
"/tap_dance": "/feature_tap_dance",
|
||||
"/tutorial": "/newbs",
|
||||
"/unicode": "/feature_unicode",
|
||||
|
||||
"/adc_driver": "/drivers/adc",
|
||||
"/apa102_driver": "/drivers/apa102",
|
||||
"/audio_driver": "/drivers/audio",
|
||||
"/eeprom_driver": "/drivers/eeprom",
|
||||
"/feature_audio": "/features/audio",
|
||||
"/feature_auto_shift": "/features/auto_shift",
|
||||
"/feature_autocorrect": "/features/autocorrect",
|
||||
"/feature_backlight": "/features/backlight",
|
||||
"/feature_bluetooth": "/features/bluetooth",
|
||||
"/feature_bootmagic": "/features/bootmagic",
|
||||
"/feature_caps_word": "/features/caps_word",
|
||||
"/feature_combo": "/features/combo",
|
||||
"/feature_command": "/features/command",
|
||||
"/feature_digitizer": "/features/digitizer",
|
||||
"/feature_dip_switch": "/features/dip_switch",
|
||||
"/feature_dynamic_macros": "/features/dynamic_macros",
|
||||
"/feature_encoders": "/features/encoders",
|
||||
"/feature_grave_esc": "/features/grave_esc",
|
||||
"/feature_haptic_feedback": "/features/haptic_feedback",
|
||||
"/feature_hd44780": "/features/hd44780",
|
||||
"/feature_joystick": "/features/joystick",
|
||||
"/feature_key_lock": "/features/key_lock",
|
||||
"/feature_key_overrides": "/features/key_overrides",
|
||||
"/feature_leader_key": "/features/leader_key",
|
||||
"/feature_led_indicators": "/features/led_indicators",
|
||||
"/feature_led_matrix": "/features/led_matrix",
|
||||
"/feature_midi": "/features/midi",
|
||||
"/feature_mouse_keys": "/features/mouse_keys",
|
||||
"/feature_oled_driver": "/features/oled_driver",
|
||||
"/feature_os_detection": "/features/os_detection",
|
||||
"/feature_pointing_device": "/features/pointing_device",
|
||||
"/feature_programmable_button": "/features/programmable_button",
|
||||
"/feature_ps2_mouse": "/features/ps2_mouse",
|
||||
"/feature_rawhid": "/features/rawhid",
|
||||
"/feature_repeat_key": "/features/repeat_key",
|
||||
"/feature_rgb_matrix": "/features/rgb_matrix",
|
||||
"/feature_rgblight": "/features/rgblight",
|
||||
"/feature_secure": "/features/secure",
|
||||
"/feature_send_string": "/features/send_string",
|
||||
"/feature_sequencer": "/features/sequencer",
|
||||
"/feature_space_cadet": "/features/space_cadet",
|
||||
"/feature_split_keyboard": "/features/split_keyboard",
|
||||
"/feature_st7565": "/features/st7565",
|
||||
"/feature_stenography": "/features/stenography",
|
||||
"/feature_swap_hands": "/features/swap_hands",
|
||||
"/feature_tap_dance": "/features/tap_dance",
|
||||
"/feature_tri_layer": "/features/tri_layer",
|
||||
"/feature_unicode": "/features/unicode",
|
||||
"/feature_wpm": "/features/wpm",
|
||||
"/flash_driver": "/drivers/flash",
|
||||
"/gpio_control": "/drivers/gpio",
|
||||
"/i2c_driver": "/drivers/i2c",
|
||||
"/serial_driver": "/drivers/serial",
|
||||
"/spi_driver": "/drivers/spi",
|
||||
"/uart_driver": "/drivers/uart",
|
||||
"/ws2812_driver": "/drivers/ws2812"
|
||||
}
|
@@ -64,13 +64,7 @@
|
||||
"text": "Development Environments",
|
||||
"items": [{ "text": "Docker Guide", "link": "/getting_started_docker" }]
|
||||
},
|
||||
{
|
||||
"text": "Flashing",
|
||||
"items": [
|
||||
{ "text": "Flashing", "link": "/flashing" },
|
||||
{ "text": "Flashing ATmega32A (ps2avrgb)", "link": "/flashing_bootloadhid" }
|
||||
]
|
||||
},
|
||||
{ "text": "Flashing", "link": "/flashing" },
|
||||
{
|
||||
"text": "IDEs",
|
||||
"items": [
|
||||
@@ -103,45 +97,45 @@
|
||||
{
|
||||
"text": "Advanced Keycodes",
|
||||
"items": [
|
||||
{ "text": "Command", "link": "/feature_command" },
|
||||
{ "text": "Dynamic Macros", "link": "/feature_dynamic_macros" },
|
||||
{ "text": "Grave Escape", "link": "/feature_grave_esc" },
|
||||
{ "text": "Leader Key", "link": "/feature_leader_key" },
|
||||
{ "text": "Command", "link": "/features/command" },
|
||||
{ "text": "Dynamic Macros", "link": "/features/dynamic_macros" },
|
||||
{ "text": "Grave Escape", "link": "/features/grave_esc" },
|
||||
{ "text": "Leader Key", "link": "/features/leader_key" },
|
||||
{ "text": "Mod-Tap", "link": "/mod_tap" },
|
||||
{ "text": "Macros", "link": "/feature_macros" },
|
||||
{ "text": "Mouse Keys", "link": "/feature_mouse_keys" },
|
||||
{ "text": "Programmable Button", "link": "/feature_programmable_button" },
|
||||
{ "text": "Repeat Key", "link": "/feature_repeat_key" },
|
||||
{ "text": "Space Cadet Shift", "link": "/feature_space_cadet" },
|
||||
{ "text": "Mouse Keys", "link": "/features/mouse_keys" },
|
||||
{ "text": "Programmable Button", "link": "/features/programmable_button" },
|
||||
{ "text": "Repeat Key", "link": "/features/repeat_key" },
|
||||
{ "text": "Space Cadet Shift", "link": "/features/space_cadet" },
|
||||
{ "text": "US ANSI Shifted Keys", "link": "/keycodes_us_ansi_shifted" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "Software Features",
|
||||
"items": [
|
||||
{ "text": "Auto Shift", "link": "/feature_auto_shift" },
|
||||
{ "text": "Autocorrect", "link": "/feature_autocorrect" },
|
||||
{ "text": "Caps Word", "link": "/feature_caps_word" },
|
||||
{ "text": "Combos", "link": "/feature_combo" },
|
||||
{ "text": "Auto Shift", "link": "/features/auto_shift" },
|
||||
{ "text": "Autocorrect", "link": "/features/autocorrect" },
|
||||
{ "text": "Caps Word", "link": "/features/caps_word" },
|
||||
{ "text": "Combos", "link": "/features/combo" },
|
||||
{ "text": "Debounce API", "link": "/feature_debounce_type" },
|
||||
{ "text": "Digitizer", "link": "/feature_digitizer" },
|
||||
{ "text": "Digitizer", "link": "/features/digitizer" },
|
||||
{ "text": "EEPROM", "link": "/feature_eeprom" },
|
||||
{ "text": "Key Lock", "link": "/feature_key_lock" },
|
||||
{ "text": "Key Overrides", "link": "/feature_key_overrides" },
|
||||
{ "text": "Key Lock", "link": "/features/key_lock" },
|
||||
{ "text": "Key Overrides", "link": "/features/key_overrides" },
|
||||
{ "text": "Layers", "link": "/feature_layers" },
|
||||
{ "text": "One Shot Keys", "link": "/one_shot_keys" },
|
||||
{ "text": "OS Detection", "link": "/feature_os_detection" },
|
||||
{ "text": "Raw HID", "link": "/feature_rawhid" },
|
||||
{ "text": "Secure", "link": "/feature_secure" },
|
||||
{ "text": "Send String", "link": "/feature_send_string" },
|
||||
{ "text": "Sequencer", "link": "/feature_sequencer" },
|
||||
{ "text": "Swap Hands", "link": "/feature_swap_hands" },
|
||||
{ "text": "Tap Dance", "link": "/feature_tap_dance" },
|
||||
{ "text": "OS Detection", "link": "/features/os_detection" },
|
||||
{ "text": "Raw HID", "link": "/features/rawhid" },
|
||||
{ "text": "Secure", "link": "/features/secure" },
|
||||
{ "text": "Send String", "link": "/features/send_string" },
|
||||
{ "text": "Sequencer", "link": "/features/sequencer" },
|
||||
{ "text": "Swap Hands", "link": "/features/swap_hands" },
|
||||
{ "text": "Tap Dance", "link": "/features/tap_dance" },
|
||||
{ "text": "Tap-Hold Configuration", "link": "/tap_hold" },
|
||||
{ "text": "Tri Layer", "link": "/feature_tri_layer" },
|
||||
{ "text": "Unicode", "link": "/feature_unicode" },
|
||||
{ "text": "Tri Layer", "link": "/features/tri_layer" },
|
||||
{ "text": "Unicode", "link": "/features/unicode" },
|
||||
{ "text": "Userspace", "link": "/feature_userspace" },
|
||||
{ "text": "WPM Calculation", "link": "/feature_wpm" }
|
||||
{ "text": "WPM Calculation", "link": "/features/wpm" }
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -157,35 +151,35 @@
|
||||
{ "text": "Quantum Painter LVGL Integration", "link": "/quantum_painter_lvgl" }
|
||||
]
|
||||
},
|
||||
{ "text": "HD44780 LCD Driver", "link": "/feature_hd44780" },
|
||||
{ "text": "ST7565 LCD Driver", "link": "/feature_st7565" },
|
||||
{ "text": "OLED Driver", "link": "/feature_oled_driver" }
|
||||
{ "text": "HD44780 LCD Driver", "link": "/features/hd44780" },
|
||||
{ "text": "ST7565 LCD Driver", "link": "/features/st7565" },
|
||||
{ "text": "OLED Driver", "link": "/features/oled_driver" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "Lighting",
|
||||
"items": [
|
||||
{ "text": "Backlight", "link": "/feature_backlight" },
|
||||
{ "text": "LED Matrix", "link": "/feature_led_matrix" },
|
||||
{ "text": "RGB Lighting", "link": "/feature_rgblight" },
|
||||
{ "text": "RGB Matrix", "link": "/feature_rgb_matrix" }
|
||||
{ "text": "Backlight", "link": "/features/backlight" },
|
||||
{ "text": "LED Matrix", "link": "/features/led_matrix" },
|
||||
{ "text": "RGB Lighting", "link": "/features/rgblight" },
|
||||
{ "text": "RGB Matrix", "link": "/features/rgb_matrix" }
|
||||
]
|
||||
},
|
||||
{ "text": "Audio", "link": "/feature_audio" },
|
||||
{ "text": "Bluetooth", "link": "/feature_bluetooth" },
|
||||
{ "text": "Bootmagic Lite", "link": "/feature_bootmagic" },
|
||||
{ "text": "Audio", "link": "/features/audio" },
|
||||
{ "text": "Bluetooth", "link": "/features/bluetooth" },
|
||||
{ "text": "Bootmagic Lite", "link": "/features/bootmagic" },
|
||||
{ "text": "Converters", "link": "/feature_converters" },
|
||||
{ "text": "Custom Matrix", "link": "/custom_matrix" },
|
||||
{ "text": "DIP Switch", "link": "/feature_dip_switch" },
|
||||
{ "text": "Encoders", "link": "/feature_encoders" },
|
||||
{ "text": "Haptic Feedback", "link": "/feature_haptic_feedback" },
|
||||
{ "text": "Joystick", "link": "/feature_joystick" },
|
||||
{ "text": "LED Indicators", "link": "/feature_led_indicators" },
|
||||
{ "text": "MIDI", "link": "/feature_midi" },
|
||||
{ "text": "Pointing Device", "link": "/feature_pointing_device" },
|
||||
{ "text": "PS/2 Mouse", "link": "/feature_ps2_mouse" },
|
||||
{ "text": "Split Keyboard", "link": "/feature_split_keyboard" },
|
||||
{ "text": "Stenography", "link": "/feature_stenography" }
|
||||
{ "text": "DIP Switch", "link": "/features/dip_switch" },
|
||||
{ "text": "Encoders", "link": "/features/encoders" },
|
||||
{ "text": "Haptic Feedback", "link": "/features/haptic_feedback" },
|
||||
{ "text": "Joystick", "link": "/features/joystick" },
|
||||
{ "text": "LED Indicators", "link": "/features/led_indicators" },
|
||||
{ "text": "MIDI", "link": "/features/midi" },
|
||||
{ "text": "Pointing Device", "link": "/features/pointing_device" },
|
||||
{ "text": "PS/2 Mouse", "link": "/features/ps2_mouse" },
|
||||
{ "text": "Split Keyboard", "link": "/features/split_keyboard" },
|
||||
{ "text": "Stenography", "link": "/features/stenography" }
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -212,7 +206,8 @@
|
||||
"text": "Most Recent ChangeLog",
|
||||
"link": "/ChangeLog/20240526"
|
||||
},
|
||||
{ "text": "Past Breaking Changes", "link": "/breaking_changes_history" }
|
||||
{ "text": "Past Breaking Changes", "link": "/breaking_changes_history" },
|
||||
{ "text": "Deprecation Policy", "link": "/support_deprecation_policy" }
|
||||
]
|
||||
},
|
||||
|
||||
@@ -226,19 +221,19 @@
|
||||
"text": "Drivers",
|
||||
"link": "hardware_drivers",
|
||||
"items": [
|
||||
{ "text": "ADC Driver", "link": "/adc_driver" },
|
||||
{ "text": "APA102 Driver", "link": "/apa102_driver" },
|
||||
{ "text": "Audio Driver", "link": "/audio_driver" },
|
||||
{ "text": "I2C Driver", "link": "/i2c_driver" },
|
||||
{ "text": "SPI Driver", "link": "/spi_driver" },
|
||||
{ "text": "WS2812 Driver", "link": "/ws2812_driver" },
|
||||
{ "text": "EEPROM Driver", "link": "/eeprom_driver" },
|
||||
{ "text": "Flash Driver", "link": "/flash_driver" },
|
||||
{ "text": "'serial' Driver", "link": "/serial_driver" },
|
||||
{ "text": "UART Driver", "link": "/uart_driver" }
|
||||
{ "text": "ADC Driver", "link": "/drivers/adc" },
|
||||
{ "text": "APA102 Driver", "link": "/drivers/apa102" },
|
||||
{ "text": "Audio Driver", "link": "/drivers/audio" },
|
||||
{ "text": "EEPROM Driver", "link": "/drivers/eeprom" },
|
||||
{ "text": "Flash Driver", "link": "/drivers/flash" },
|
||||
{ "text": "I2C Driver", "link": "/drivers/i2c" },
|
||||
{ "text": "'serial' Driver", "link": "/drivers/serial" },
|
||||
{ "text": "SPI Driver", "link": "/drivers/spi" },
|
||||
{ "text": "UART Driver", "link": "/drivers/uart" },
|
||||
{ "text": "WS2812 Driver", "link": "/drivers/ws2812" }
|
||||
]
|
||||
},
|
||||
{ "text": "GPIO Controls", "link": "/gpio_control" },
|
||||
{ "text": "GPIO Controls", "link": "/drivers/gpio" },
|
||||
{ "text": "Keyboard Guidelines", "link": "/hardware_keyboard_guidelines" }
|
||||
]
|
||||
},
|
||||
|
@@ -254,15 +254,21 @@ qmk doctor [-y] [-n]
|
||||
|
||||
Check your environment for problems and prompt to fix them:
|
||||
|
||||
qmk doctor
|
||||
```
|
||||
qmk doctor
|
||||
```
|
||||
|
||||
Check your environment and automatically fix any problems found:
|
||||
|
||||
qmk doctor -y
|
||||
```
|
||||
qmk doctor -y
|
||||
```
|
||||
|
||||
Check your environment and report problems only:
|
||||
|
||||
qmk doctor -n
|
||||
```
|
||||
qmk doctor -n
|
||||
```
|
||||
|
||||
## `qmk format-json`
|
||||
|
||||
@@ -290,15 +296,21 @@ This command is directory aware. It will automatically fill in KEYBOARD and/or K
|
||||
|
||||
Show basic information for a keyboard:
|
||||
|
||||
qmk info -kb planck/rev5
|
||||
```
|
||||
qmk info -kb planck/rev5
|
||||
```
|
||||
|
||||
Show the matrix for a keyboard:
|
||||
|
||||
qmk info -kb ergodox_ez -m
|
||||
```
|
||||
qmk info -kb ergodox_ez -m
|
||||
```
|
||||
|
||||
Show a JSON keymap for a keyboard:
|
||||
|
||||
qmk info -kb clueboard/california -km default
|
||||
```
|
||||
qmk info -kb clueboard/california -km default
|
||||
```
|
||||
|
||||
## `qmk json2c`
|
||||
|
||||
@@ -350,7 +362,9 @@ This command is directory aware. It will automatically fill in KEYBOARD and/or K
|
||||
|
||||
Do a basic lint check:
|
||||
|
||||
qmk lint -kb rominronin/katana60/rev2
|
||||
```
|
||||
qmk lint -kb rominronin/katana60/rev2
|
||||
```
|
||||
|
||||
## `qmk list-keyboards`
|
||||
|
||||
@@ -735,7 +749,7 @@ options:
|
||||
|
||||
## `qmk generate-rgb-breathe-table`
|
||||
|
||||
This command generates a lookup table (LUT) header file for the [RGB Lighting](feature_rgblight) feature's breathing animation. Place this file in your keyboard or keymap directory as `rgblight_breathe_table.h` to override the default LUT in `quantum/rgblight/`.
|
||||
This command generates a lookup table (LUT) header file for the [RGB Lighting](features/rgblight) feature's breathing animation. Place this file in your keyboard or keymap directory as `rgblight_breathe_table.h` to override the default LUT in `quantum/rgblight/`.
|
||||
|
||||
**Usage**:
|
||||
|
||||
@@ -789,16 +803,22 @@ qmk pytest [-t TEST]
|
||||
|
||||
Run entire test suite:
|
||||
|
||||
qmk pytest
|
||||
```
|
||||
qmk pytest
|
||||
```
|
||||
|
||||
Run test group:
|
||||
|
||||
qmk pytest -t qmk.tests.test_cli_commands
|
||||
```
|
||||
qmk pytest -t qmk.tests.test_cli_commands
|
||||
```
|
||||
|
||||
Run single test:
|
||||
|
||||
qmk pytest -t qmk.tests.test_cli_commands.test_c2json
|
||||
qmk pytest -t qmk.tests.test_qmk_path
|
||||
```
|
||||
qmk pytest -t qmk.tests.test_cli_commands.test_c2json
|
||||
qmk pytest -t qmk.tests.test_qmk_path
|
||||
```
|
||||
|
||||
## `qmk painter-convert-graphics`
|
||||
|
||||
@@ -835,16 +855,24 @@ options:
|
||||
|
||||
Run entire test suite:
|
||||
|
||||
qmk test-c
|
||||
```
|
||||
qmk test-c
|
||||
```
|
||||
|
||||
List available tests:
|
||||
|
||||
qmk test-c --list
|
||||
```
|
||||
qmk test-c --list
|
||||
```
|
||||
|
||||
Run matching test:
|
||||
|
||||
qmk test-c --test unicode*
|
||||
```
|
||||
qmk test-c --test unicode*
|
||||
```
|
||||
|
||||
Run single test:
|
||||
|
||||
qmk test-c --test basic
|
||||
```
|
||||
qmk test-c --test basic
|
||||
```
|
||||
|
@@ -43,7 +43,9 @@ user.keymap: None -> default
|
||||
|
||||
The `qmk config` command is used to interact with the underlying configuration. When run with no argument it shows the current configuration. When arguments are supplied they are assumed to be configuration tokens, which are strings containing no spaces with the following form:
|
||||
|
||||
<subcommand|general|default>[.<key>][=<value>]
|
||||
```
|
||||
<subcommand|general|default>[.<key>][=<value>]
|
||||
```
|
||||
|
||||
## Setting Configuration Values
|
||||
|
||||
@@ -63,19 +65,27 @@ You can read configuration values for the entire configuration, a single key, or
|
||||
|
||||
### Entire Configuration Example
|
||||
|
||||
qmk config
|
||||
```
|
||||
qmk config
|
||||
```
|
||||
|
||||
### Whole Section Example
|
||||
|
||||
qmk config compile
|
||||
```
|
||||
qmk config compile
|
||||
```
|
||||
|
||||
### Single Key Example
|
||||
|
||||
qmk config compile.keyboard
|
||||
```
|
||||
qmk config compile.keyboard
|
||||
```
|
||||
|
||||
### Multiple Keys Example
|
||||
|
||||
qmk config user compile.keyboard compile.keymap
|
||||
```
|
||||
qmk config user compile.keyboard compile.keymap
|
||||
```
|
||||
|
||||
## Deleting Configuration Values
|
||||
|
||||
|
@@ -192,18 +192,22 @@ We use nose2, flake8, and yapf to test, lint, and format code. You can use the `
|
||||
|
||||
### Testing and Linting
|
||||
|
||||
qmk pytest
|
||||
```
|
||||
qmk pytest
|
||||
```
|
||||
|
||||
### Formatting
|
||||
|
||||
qmk format-python
|
||||
```
|
||||
qmk format-python
|
||||
```
|
||||
|
||||
## Formatting Details
|
||||
|
||||
We use [yapf](https://github.com/google/yapf) to automatically format code. Our configuration is in the `[yapf]` section of `setup.cfg`.
|
||||
|
||||
::: tip
|
||||
Tip- Many editors can use yapf as a plugin to automatically format code as you type.
|
||||
Many editors can use yapf as a plugin to automatically format code as you type.
|
||||
:::
|
||||
|
||||
## Testing Details
|
||||
@@ -212,7 +216,9 @@ Our tests can be found in `lib/python/qmk/tests/`. You will find both unit and i
|
||||
|
||||
If your PR does not include a comprehensive set of tests please add comments like this to your code so that other people know where they can help:
|
||||
|
||||
# TODO(unassigned/<your_github_username>): Write <unit|integration> tests
|
||||
```python
|
||||
# TODO(unassigned/<your_github_username>): Write <unit|integration> tests
|
||||
```
|
||||
|
||||
We use [nose2](https://nose2.readthedocs.io/en/latest/getting_started.html) to run our tests. You can refer to the nose2 documentation for more details on what you can do in your test functions.
|
||||
|
||||
|
@@ -10,22 +10,30 @@ There are several ways you can setup tab completion.
|
||||
|
||||
Add this to the end of your `.profile` or `.bashrc`:
|
||||
|
||||
source ~/qmk_firmware/util/qmk_tab_complete.sh
|
||||
```
|
||||
source ~/qmk_firmware/util/qmk_tab_complete.sh
|
||||
```
|
||||
|
||||
If you put `qmk_firmware` into another location you will need to adjust this path.
|
||||
|
||||
Zsh users will need to load `bashcompinit`. The following can be added to `~/.zshrc` file:
|
||||
|
||||
autoload -Uz bashcompinit && bashcompinit
|
||||
```
|
||||
autoload -Uz bashcompinit && bashcompinit
|
||||
```
|
||||
|
||||
### System Wide Symlink
|
||||
|
||||
If you want the tab completion available to all users of the system you can add a symlink to the `qmk_tab_complete.sh` script:
|
||||
|
||||
ln -s ~/qmk_firmware/util/qmk_tab_complete.sh /etc/profile.d/qmk_tab_complete.sh
|
||||
```
|
||||
ln -s ~/qmk_firmware/util/qmk_tab_complete.sh /etc/profile.d/qmk_tab_complete.sh
|
||||
```
|
||||
|
||||
### System Wide Copy
|
||||
|
||||
In some cases a symlink may not work. Instead you can copy the file directly into place. Be aware that updates to the tab complete script may happen from time to time, you will want to recopy the file periodically.
|
||||
|
||||
cp util/qmk_tab_complete.sh /etc/profile.d
|
||||
```
|
||||
cp util/qmk_tab_complete.sh /etc/profile.d
|
||||
```
|
||||
|
@@ -207,7 +207,7 @@ If you define these options you will enable the associated feature, which may in
|
||||
* `#define TAP_HOLD_CAPS_DELAY 80`
|
||||
* 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).
|
||||
* Sets the key repeat interval for [key overrides](features/key_overrides).
|
||||
* `#define LEGACY_MAGIC_HANDLING`
|
||||
* Enables magic configuration handling for advanced keycodes (such as Mod Tap and Layer Tap)
|
||||
|
||||
@@ -217,14 +217,14 @@ If you define these options you will enable the associated feature, which may in
|
||||
* `#define WS2812_DI_PIN D7`
|
||||
* pin the DI on the WS2812 is hooked-up to
|
||||
* `#define RGBLIGHT_LAYERS`
|
||||
* Lets you define [lighting layers](feature_rgblight#lighting-layers) that can be toggled on or off. Great for showing the current keyboard layer or caps lock state.
|
||||
* Lets you define [lighting layers](features/rgblight#lighting-layers) that can be toggled on or off. Great for showing the current keyboard layer or caps lock state.
|
||||
* `#define RGBLIGHT_MAX_LAYERS`
|
||||
* Defaults to 8. Can be expanded up to 32 if more [lighting layers](feature_rgblight#lighting-layers) are needed.
|
||||
* Defaults to 8. Can be expanded up to 32 if more [lighting layers](features/rgblight#lighting-layers) are needed.
|
||||
* Note: Increasing the maximum will increase the firmware size and slow sync on split keyboards.
|
||||
* `#define RGBLIGHT_LAYER_BLINK`
|
||||
* Adds ability to [blink](feature_rgblight#lighting-layer-blink) a lighting layer for a specified number of milliseconds (e.g. to acknowledge an action).
|
||||
* Adds ability to [blink](features/rgblight#lighting-layer-blink) a lighting layer for a specified number of milliseconds (e.g. to acknowledge an action).
|
||||
* `#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF`
|
||||
* If defined, then [lighting layers](feature_rgblight#overriding-rgb-lighting-onoff-status) will be shown even if RGB Light is off.
|
||||
* If defined, then [lighting layers](features/rgblight#overriding-rgb-lighting-onoff-status) will be shown even if RGB Light is off.
|
||||
* `#define RGBLIGHT_LED_COUNT 12`
|
||||
* number of LEDs
|
||||
* `#define RGBLIGHT_SPLIT`
|
||||
@@ -358,7 +358,7 @@ There are a few different ways to set handedness for split keyboards (listed in
|
||||
|
||||
* `#define SPLIT_TRANSACTION_IDS_KB .....`
|
||||
* `#define SPLIT_TRANSACTION_IDS_USER .....`
|
||||
* Allows for custom data sync with the slave when using the QMK-provided split transport. See [custom data sync between sides](feature_split_keyboard#custom-data-sync) for more information.
|
||||
* Allows for custom data sync with the slave when using the QMK-provided split transport. See [custom data sync between sides](features/split_keyboard#custom-data-sync) for more information.
|
||||
|
||||
# The `rules.mk` File
|
||||
|
||||
|
@@ -16,7 +16,9 @@ I'll say that again because it's important:
|
||||
**MAKE SURE YOU SELECT THE RIGHT VERSION!**
|
||||
:::
|
||||
|
||||
If your keyboard has been advertised to be powered by QMK but is not in the list, chances are a developer hasn't gotten to it yet or we haven't had a chance to merge it in yet. File an issue at [qmk_firmware](https://github.com/qmk/qmk_firmware/issues) requesting to support that particular keyboard, if there is no active [Pull Request](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) for it. There are also QMK powered keyboards that are in their manufacturer's own GitHub accounts. Double check for that as well. <!-- FIXME(skullydazed): This feels too wordy and I'm not sure we want to encourage these kinds of issues. Also, should we prompt them to bug the manufacutrer? -->
|
||||
Unfortunately if your keyboard has been advertised to be powered by QMK but is not in the list, you will **not** be able to use Configurator to customize your keyboard.
|
||||
|
||||
Chances are a developer hasn't gotten round to adding support or we haven't had a chance to merge it in yet. If there is no active [Pull Request](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard), contact the manufacturer and encourage them to add support.
|
||||
|
||||
## Step 2: Select Your Keyboard Layout
|
||||
|
||||
|
@@ -105,7 +105,9 @@ 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:
|
||||
|
||||
qmk docs
|
||||
```
|
||||
qmk docs
|
||||
```
|
||||
|
||||
and navigating to `http://localhost:5173/`.
|
||||
|
||||
|
@@ -206,7 +206,7 @@ Similar to `matrix_scan_*`, these are called as often as the MCU can handle. To
|
||||
|
||||
### Example `void housekeeping_task_user(void)` implementation
|
||||
|
||||
This example will show you how to use `void housekeeping_task_user(void)` to turn off [RGB Light](feature_rgblight). For RGB Matrix, the [builtin](feature_rgb_matrix#additional-configh-options) `RGB_MATRIX_TIMEOUT` should be used.
|
||||
This example will show you how to use `void housekeeping_task_user(void)` to turn off [RGB Light](features/rgblight). For RGB Matrix, the [builtin](features/rgb_matrix#additional-configh-options) `RGB_MATRIX_TIMEOUT` should be used.
|
||||
|
||||
First, add the following lines to your keymap's `config.h`:
|
||||
|
||||
|
@@ -69,4 +69,4 @@ This page describes my cool feature. You can use my cool feature to make coffee
|
||||
|KC_SUGAR||Order Sugar|
|
||||
```
|
||||
|
||||
Place your documentation into `docs/feature_<my_cool_feature>.md`, and add that file to the appropriate place in `docs/_sidebar.json`. If you have added any keycodes be sure to add them to `docs/keycodes.md` with a link back to your feature page.
|
||||
Place your documentation into `docs/features/<my_cool_feature>.md`, and add that file to the appropriate place in `docs/_sidebar.json`. If you have added any keycodes be sure to add them to `docs/keycodes.md` with a link back to your feature page.
|
||||
|
@@ -8,8 +8,8 @@ We recommend the use of the [Zadig](https://zadig.akeo.ie/) utility. If you have
|
||||
|
||||
## Installation
|
||||
|
||||
Put your keyboard into bootloader mode, either by hitting the `QK_BOOT` keycode (which may be on a different layer), or by pressing the reset switch that's usually located on the underside of the board. If your keyboard has neither, try holding Escape or Space+`B` as you plug it in (see the [Bootmagic Lite](feature_bootmagic) docs for more details). Some boards use [Command](feature_command) instead of Bootmagic; in this case, you can enter bootloader mode by hitting Left Shift+Right Shift+`B` or Left Shift+Right Shift+Escape at any point while the keyboard is plugged in.
|
||||
Some keyboards may have specific instructions for entering the bootloader. For example, the [Bootmagic Lite](feature_bootmagic) key (default: Escape) might be on a different key, e.g. Left Control; or the magic combination for Command (default: Left Shift+Right Shift) might require you to hold something else, e.g. Left Control+Right Control. Refer to the board's README file if you are unsure.
|
||||
Put your keyboard into bootloader mode, either by hitting the `QK_BOOT` keycode (which may be on a different layer), or by pressing the reset switch that's usually located on the underside of the board. If your keyboard has neither, try holding Escape or Space+`B` as you plug it in (see the [Bootmagic Lite](features/bootmagic) docs for more details). Some boards use [Command](features/command) instead of Bootmagic; in this case, you can enter bootloader mode by hitting Left Shift+Right Shift+`B` or Left Shift+Right Shift+Escape at any point while the keyboard is plugged in.
|
||||
Some keyboards may have specific instructions for entering the bootloader. For example, the [Bootmagic Lite](features/bootmagic) key (default: Escape) might be on a different key, e.g. Left Control; or the magic combination for Command (default: Left Shift+Right Shift) might require you to hold something else, e.g. Left Control+Right Control. Refer to the board's README file if you are unsure.
|
||||
|
||||
To put a device in bootloader mode with USBaspLoader, tap the `RESET` button while holding down the `BOOT` button.
|
||||
Alternatively, hold `BOOT` while inserting the USB cable.
|
||||
@@ -65,7 +65,7 @@ Run `pnputil /delete-driver oemXX.inf /uninstall`. This will delete the driver a
|
||||
As with the previous section, this process may need to be repeated multiple times, as multiple drivers can be applicable to the same device.
|
||||
|
||||
::: warning
|
||||
**WARNING:** Be *extremely careful* when doing this! You could potentially uninstall the driver for some other critical device. If you are unsure, double check the output of `/enum-drivers`, and omit the `/uninstall` flag when running `/delete-driver`.
|
||||
Be *extremely careful* when doing this! You could potentially uninstall the driver for some other critical device. If you are unsure, double check the output of `/enum-drivers`, and omit the `/uninstall` flag when running `/delete-driver`.
|
||||
:::
|
||||
|
||||
## List of Known Bootloaders
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# ADC Driver
|
||||
|
||||
QMK can leverage the Analog-to-Digital Converter (ADC) on supported MCUs to measure voltages on certain pins. This can be useful for implementing things such as battery level indicators for Bluetooth keyboards, or volume controls using a potentiometer, as opposed to a [rotary encoder](feature_encoders).
|
||||
QMK can leverage the Analog-to-Digital Converter (ADC) on supported MCUs to measure voltages on certain pins. This can be useful for implementing things such as battery level indicators for Bluetooth keyboards, or volume controls using a potentiometer, as opposed to a [rotary encoder](../features/encoders).
|
||||
|
||||
This driver currently supports both AVR and a limited selection of ARM devices. The values returned are 10-bit integers (0-1023) mapped between 0V and VCC (usually 5V or 3.3V for AVR, 3.3V only for ARM), however on ARM there is more flexibility in control of operation through `#define`s if you need more precision.
|
||||
|
@@ -1,10 +1,10 @@
|
||||
# APA102 Driver {#apa102-driver}
|
||||
|
||||
This driver provides support for APA102 addressable RGB LEDs. They are similar to the [WS2812](ws2812_driver) LEDs, but have increased data and refresh rates.
|
||||
This driver provides support for APA102 addressable RGB LEDs. They are similar to the [WS2812](ws2812) LEDs, but have increased data and refresh rates.
|
||||
|
||||
## Usage {#usage}
|
||||
|
||||
In most cases, the APA102 driver code is automatically included if you are using either the [RGBLight](feature_rgblight) or [RGB Matrix](feature_rgb_matrix) feature with the `apa102` driver set, and you would use those APIs instead.
|
||||
In most cases, the APA102 driver code is automatically included if you are using either the [RGBLight](../features/rgblight) or [RGB Matrix](../features/rgb_matrix) feature with the `apa102` driver set, and you would use those APIs instead.
|
||||
|
||||
However, if you need to use the driver standalone, add the following to your `rules.mk`:
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Audio Driver {#audio-driver}
|
||||
|
||||
The [Audio feature](feature_audio) breaks the hardware specifics out into separate, exchangeable driver units, with a common interface to the audio-"core" - which itself handles playing songs and notes while tracking their progress in an internal state, initializing/starting/stopping the driver as needed.
|
||||
The [Audio feature](../features/audio) breaks the hardware specifics out into separate, exchangeable driver units, with a common interface to the audio-"core" - which itself handles playing songs and notes while tracking their progress in an internal state, initializing/starting/stopping the driver as needed.
|
||||
|
||||
Not all MCUs support every available driver, either the platform-support is not there (yet?) or the MCU simply does not have the required hardware peripheral.
|
||||
|
@@ -133,7 +133,7 @@ If your MCU does not boot after swapping to the EFL wear-leveling driver, it's l
|
||||
|
||||
## Wear-leveling SPI Flash Driver Configuration {#wear_leveling-flash_spi-driver-configuration}
|
||||
|
||||
This driver performs writes to an external SPI NOR Flash peripheral. It also requires a working configuration for the SPI NOR Flash peripheral -- see the [flash driver](flash_driver) documentation for more information.
|
||||
This driver performs writes to an external SPI NOR Flash peripheral. It also requires a working configuration for the SPI NOR Flash peripheral -- see the [flash driver](flash) documentation for more information.
|
||||
|
||||
Configurable options in your keyboard's `config.h`:
|
||||
|
@@ -4,7 +4,7 @@ The I2C Master drivers used in QMK have a set of common functions to allow porta
|
||||
|
||||
## Usage {#usage}
|
||||
|
||||
In most cases, the I2C Master driver code is automatically included if you are using a feature or driver which requires it, such as [OLED](feature_oled_driver).
|
||||
In most cases, the I2C Master driver code is automatically included if you are using a feature or driver which requires it, such as [OLED](../features/oled_driver).
|
||||
|
||||
However, if you need to use the driver standalone, add the following to your `rules.mk`:
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# 'serial' Driver
|
||||
|
||||
The Serial driver powers the [Split Keyboard](feature_split_keyboard) feature. Several implementations are available that cater to the platform and capabilites of MCU in use. Note that none of the drivers support split keyboards with more than two halves.
|
||||
The Serial driver powers the [Split Keyboard](../features/split_keyboard) feature. Several implementations are available that cater to the platform and capabilites of MCU in use. Note that none of the drivers support split keyboards with more than two halves.
|
||||
|
||||
| Driver | AVR | ARM | Connection between halves |
|
||||
| --------------------------------------- | ------------------ | ------------------ | --------------------------------------------------------------------------------------------- |
|
||||
@@ -298,7 +298,7 @@ If you're having issues withe serial communication, you can enable debug message
|
||||
```
|
||||
|
||||
::: tip
|
||||
The messages will be printed out to the `CONSOLE` output. For additional information, refer to [Debugging/Troubleshooting QMK](faq_debug).
|
||||
The messages will be printed out to the `CONSOLE` output. For additional information, refer to [Debugging/Troubleshooting QMK](../faq_debug).
|
||||
:::
|
||||
|
||||
## Alternate Functions for selected STM32 MCUs
|
@@ -4,7 +4,7 @@ The SPI Master drivers used in QMK have a set of common functions to allow porta
|
||||
|
||||
## Usage {#usage}
|
||||
|
||||
In most cases, the SPI Master driver code is automatically included if you are using a feature or driver which requires it, such as [OLED](feature_oled_driver).
|
||||
In most cases, the SPI Master driver code is automatically included if you are using a feature or driver which requires it, such as [OLED](../features/oled_driver).
|
||||
|
||||
However, if you need to use the driver standalone, add the following to your `rules.mk`:
|
||||
|
@@ -10,7 +10,7 @@ The LEDs can be chained together, and the remaining data is passed on to the nex
|
||||
|
||||
## Usage {#usage}
|
||||
|
||||
In most cases, the WS2812 driver code is automatically included if you are using either the [RGBLight](feature_rgblight) or [RGB Matrix](feature_rgb_matrix) feature with the `ws2812` driver set, and you would use those APIs instead.
|
||||
In most cases, the WS2812 driver code is automatically included if you are using either the [RGBLight](../features/rgblight) or [RGB Matrix](../features/rgb_matrix) feature with the `ws2812` driver set, and you would use those APIs instead.
|
||||
|
||||
However, if you need to use the driver standalone, add the following to your `rules.mk`:
|
||||
|
@@ -5,7 +5,7 @@ Have you ever needed an easy way to program a controller, such as a Proton C or
|
||||
There are different styles of Easy Maker available depending on your needs:
|
||||
|
||||
* [Direct Pin](https://config.qmk.fm/#/?filter=ez_maker/direct) - Connect a single switch to a single pin
|
||||
* Direct Pin + Backlight (Coming Soon) - Like Direct Pin but dedicates a single pin to [Backlight](feature_backlight) control
|
||||
* Direct Pin + Backlight (Coming Soon) - Like Direct Pin but dedicates a single pin to [Backlight](features/backlight) control
|
||||
* Direct Pin + Numlock (Coming Soon) - Like Direct Pin but dedicates a single pin to the Numlock LED
|
||||
* Direct Pin + Capslock (Coming Soon) - Like Direct Pin but dedicates a single pin to the Capslock LED
|
||||
* Direct Pin + Encoder (Coming Soon) - Like Direct Pin but uses 2 pins to add a single rotary encoder
|
||||
|
@@ -66,4 +66,4 @@ Due to how EEPROM works on ARM based chips, saved settings may no longer be vali
|
||||
[Planck rev6 reset EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/539284620861243409/planck_rev6_default.bin) can be used to force an eeprom reset. After flashing this image, flash your normal firmware again which should restore your keyboard to _normal_ working order.
|
||||
[Preonic rev3 reset EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/537849497313738762/preonic_rev3_default.bin)
|
||||
|
||||
If bootmagic is enabled in any form, you should be able to do this too (see [Bootmagic docs](feature_bootmagic) and keyboard info for specifics on how to do this).
|
||||
If bootmagic is enabled in any form, you should be able to do this too (see [Bootmagic docs](features/bootmagic) and keyboard info for specifics on how to do this).
|
||||
|
@@ -4,7 +4,7 @@ This page details various common questions people have about troubleshooting the
|
||||
|
||||
## Debugging {#debugging}
|
||||
|
||||
Your keyboard will output debug information if you have `CONSOLE_ENABLE = yes` in your `rules.mk`. By default the output is very limited, but you can turn on debug mode to increase the amount of debug output. Use the `DB_TOGG` keycode in your keymap, use the [Command](feature_command) feature to enable debug mode, or add the following code to your keymap.
|
||||
Your keyboard will output debug information if you have `CONSOLE_ENABLE = yes` in your `rules.mk`. By default the output is very limited, but you can turn on debug mode to increase the amount of debug output. Use the `DB_TOGG` keycode in your keymap, use the [Command](features/command) feature to enable debug mode, or add the following code to your keymap.
|
||||
|
||||
```c
|
||||
void keyboard_post_init_user(void) {
|
||||
|
@@ -45,7 +45,7 @@ QMK has a couple of features which allow you to change the behavior of your keyb
|
||||
Refer to the EEPROM clearing methods above, which should return those keys to normal operation. If that doesn't work, look here:
|
||||
|
||||
* [Magic Keycodes](keycodes_magic)
|
||||
* [Command](feature_command)
|
||||
* [Command](features/command)
|
||||
|
||||
## The Menu Key Isn't Working
|
||||
|
||||
@@ -86,7 +86,7 @@ Old vintage mechanical keyboards occasionally have lock switches but modern ones
|
||||
|
||||
## Input Special Characters Other Than ASCII like Cédille 'Ç'
|
||||
|
||||
See the [Unicode](feature_unicode) feature.
|
||||
See the [Unicode](features/unicode) feature.
|
||||
|
||||
## `Fn` Key on macOS
|
||||
|
||||
@@ -130,7 +130,7 @@ https://github.com/tekezo/Karabiner/issues/403
|
||||
|
||||
## Esc and <code>`</code> on a Single Key
|
||||
|
||||
See the [Grave Escape](feature_grave_esc) feature.
|
||||
See the [Grave Escape](features/grave_esc) feature.
|
||||
|
||||
## Eject on Mac OSX
|
||||
|
||||
|
@@ -160,7 +160,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
};
|
||||
```
|
||||
Alternatively, this can be done with [Key Overrides](feature_key_overrides#simple-example).
|
||||
Alternatively, this can be done with [Key Overrides](features/key_overrides#simple-example).
|
||||
|
||||
# Advanced topics {#advanced-topics}
|
||||
|
||||
@@ -184,4 +184,4 @@ This page used to encompass a large set of features. We have moved many sections
|
||||
|
||||
## Key Overrides {#key-overrides}
|
||||
|
||||
* [Key Overrides](feature_key_overrides)
|
||||
* [Key Overrides](features/key_overrides)
|
||||
|
@@ -39,7 +39,7 @@ qmk flash -c -kb keebio/bdn9/rev1 -km default -e CONVERT_TO=proton_c
|
||||
You can also add the same `CONVERT_TO=<target>` to your keymap's `rules.mk`, which will accomplish the same thing.
|
||||
|
||||
::: tip
|
||||
If you get errors about `PORTB/DDRB`, etc not being defined, you'll need to convert the keyboard's code to use the [GPIO Controls](gpio_control) that will work for both ARM and AVR. This shouldn't affect the AVR builds at all.
|
||||
If you get errors about `PORTB/DDRB`, etc not being defined, you'll need to convert the keyboard's code to use the [GPIO Controls](drivers/gpio) that will work for both ARM and AVR. This shouldn't affect the AVR builds at all.
|
||||
:::
|
||||
|
||||
### Conditional Configuration
|
||||
@@ -118,11 +118,11 @@ The following defaults are based on what has been implemented for STM32 boards.
|
||||
|
||||
| Feature | Notes |
|
||||
|----------------------------------------------|------------------------------------------------------------------------------------------------------------------|
|
||||
| [Audio](feature_audio) | Enabled |
|
||||
| [RGB Lighting](feature_rgblight) | Disabled |
|
||||
| [Backlight](feature_backlight) | Forces [task driven PWM](feature_backlight#software-pwm-driver) until ARM can provide automatic configuration |
|
||||
| [Audio](features/audio) | Enabled |
|
||||
| [RGB Lighting](features/rgblight) | Disabled |
|
||||
| [Backlight](features/backlight) | Forces [task driven PWM](features/backlight#software-pwm-driver) until ARM can provide automatic configuration |
|
||||
| USB Host (e.g. USB-USB converter) | Not supported (USB host code is AVR specific and is not currently supported on ARM) |
|
||||
| [Split keyboards](feature_split_keyboard) | Partial - heavily dependent on enabled features |
|
||||
| [Split keyboards](features/split_keyboard) | Partial - heavily dependent on enabled features |
|
||||
|
||||
### Adafruit KB2040 {#kb2040}
|
||||
|
||||
@@ -130,10 +130,10 @@ The following defaults are based on what has been implemented for [RP2040](platf
|
||||
|
||||
| Feature | Notes |
|
||||
|----------------------------------------------|------------------------------------------------------------------------------------------------------------------|
|
||||
| [RGB Lighting](feature_rgblight) | Enabled via `PIO` vendor driver |
|
||||
| [Backlight](feature_backlight) | Forces [task driven PWM](feature_backlight#software-pwm-driver) until ARM can provide automatic configuration |
|
||||
| [RGB Lighting](features/rgblight) | Enabled via `PIO` vendor driver |
|
||||
| [Backlight](features/backlight) | Forces [task driven PWM](features/backlight#software-pwm-driver) until ARM can provide automatic configuration |
|
||||
| USB Host (e.g. USB-USB converter) | Not supported (USB host code is AVR specific and is not currently supported on ARM) |
|
||||
| [Split keyboards](feature_split_keyboard) | Partial via `PIO` vendor driver - heavily dependent on enabled features |
|
||||
| [Split keyboards](features/split_keyboard) | Partial via `PIO` vendor driver - heavily dependent on enabled features |
|
||||
|
||||
### SparkFun Pro Micro - RP2040, Blok, Bit-C PRO and Michi {#promicro_rp2040 }
|
||||
|
||||
|
@@ -109,7 +109,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
}
|
||||
```
|
||||
And lastly, you want to add the `eeconfig_init_user` function, so that when the EEPROM is reset, you can specify default values, and even custom actions. To force an EEPROM reset, use the `EE_CLR` keycode or [Bootmagic Lite](feature_bootmagic) functionallity. For example, if you want to set rgb layer indication by default, and save the default valued.
|
||||
And lastly, you want to add the `eeconfig_init_user` function, so that when the EEPROM is reset, you can specify default values, and even custom actions. To force an EEPROM reset, use the `EE_CLR` keycode or [Bootmagic Lite](features/bootmagic) functionallity. For example, if you want to set rgb layer indication by default, and save the default valued.
|
||||
|
||||
```c
|
||||
void eeconfig_init_user(void) { // EEPROM is getting reset!
|
||||
|
@@ -27,7 +27,7 @@ For a similar reason, the `layer` argument of `LM()` is also limited to layers 0
|
||||
|:---------------:|:----------------------:|:------------------------:|:----------------:|
|
||||
| ❌ | ❌ | ❌ | ✅ |
|
||||
|
||||
Expanding this would be complicated, at best. Moving to a 32-bit keycode would solve a lot of this, but would double the amount of space that the keymap matrix uses. And it could potentially cause issues, too. If you need to apply modifiers to your tapped keycode, [Tap Dance](feature_tap_dance#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this.
|
||||
Expanding this would be complicated, at best. Moving to a 32-bit keycode would solve a lot of this, but would double the amount of space that the keymap matrix uses. And it could potentially cause issues, too. If you need to apply modifiers to your tapped keycode, [Tap Dance](features/tap_dance#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this.
|
||||
|
||||
## Working with Layers {#working-with-layers}
|
||||
|
||||
@@ -104,7 +104,7 @@ This runs code every time that the layers get changed. This can be useful for l
|
||||
|
||||
### Example `layer_state_set_*` Implementation
|
||||
|
||||
This example shows how to set the [RGB Underglow](feature_rgblight) lights based on the layer, using the Planck as an example.
|
||||
This example shows how to set the [RGB Underglow](features/rgblight) lights based on the layer, using the Planck as an example.
|
||||
|
||||
```c
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
|
@@ -37,17 +37,23 @@ New names should try to stick to the standards set by existing layouts, and can
|
||||
|
||||
For a keyboard to support a layout, the variable must be defined in it's `<keyboard>.h`, and match the number of arguments/keys (and preferably the physical layout):
|
||||
|
||||
#define LAYOUT_60_ansi KEYMAP_ANSI
|
||||
```c
|
||||
#define LAYOUT_60_ansi KEYMAP_ANSI
|
||||
```
|
||||
|
||||
The name of the layout must match this regex: `[a-z0-9_]+`
|
||||
|
||||
The folder name must be added to the keyboard's `rules.mk`:
|
||||
|
||||
LAYOUTS = 60_ansi
|
||||
```
|
||||
LAYOUTS = 60_ansi
|
||||
```
|
||||
|
||||
`LAYOUTS` can be set in any keyboard folder level's `rules.mk`:
|
||||
|
||||
LAYOUTS = 60_iso
|
||||
```
|
||||
LAYOUTS = 60_iso
|
||||
```
|
||||
|
||||
but the `LAYOUT_<layout>` variable must be defined in `<folder>.h` as well.
|
||||
|
||||
@@ -55,12 +61,16 @@ but the `LAYOUT_<layout>` variable must be defined in `<folder>.h` as well.
|
||||
|
||||
You should be able to build the keyboard keymap with a command in this format:
|
||||
|
||||
make <keyboard>:<layout>
|
||||
```
|
||||
make <keyboard>:<layout>
|
||||
```
|
||||
|
||||
### Conflicting layouts
|
||||
When a keyboard supports multiple layout options,
|
||||
|
||||
LAYOUTS = ortho_4x4 ortho_4x12
|
||||
```
|
||||
LAYOUTS = ortho_4x4 ortho_4x12
|
||||
```
|
||||
|
||||
And a layout exists for both options,
|
||||
```
|
||||
@@ -77,8 +87,10 @@ layouts/
|
||||
|
||||
The FORCE_LAYOUT argument can be used to specify which layout to build
|
||||
|
||||
make <keyboard>:<layout> FORCE_LAYOUT=ortho_4x4
|
||||
make <keyboard>:<layout> FORCE_LAYOUT=ortho_4x12
|
||||
```
|
||||
make <keyboard>:<layout> FORCE_LAYOUT=ortho_4x4
|
||||
make <keyboard>:<layout> FORCE_LAYOUT=ortho_4x12
|
||||
```
|
||||
|
||||
## Tips for Making Layouts Keyboard-Agnostic
|
||||
|
||||
@@ -86,7 +98,9 @@ The FORCE_LAYOUT argument can be used to specify which layout to build
|
||||
|
||||
Instead of using `#include "planck.h"`, you can use this line to include whatever `<keyboard>.h` (`<folder>.h` should not be included here) file that is being compiled:
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
```c
|
||||
#include QMK_KEYBOARD_H
|
||||
```
|
||||
|
||||
If you want to keep some keyboard-specific code, you can use these variables to escape it with an `#ifdef` statement:
|
||||
|
||||
|
@@ -86,7 +86,7 @@ All objects have one required key: `action`. This tells QMK what the object does
|
||||
Only basic keycodes (prefixed by `KC_`) are supported. Do not include the `KC_` prefix when listing keycodes.
|
||||
|
||||
* `beep`
|
||||
* Play a bell if the keyboard has [audio enabled](feature_audio).
|
||||
* Play a bell if the keyboard has [audio enabled](features/audio).
|
||||
* Example: `{"action": "beep"}`
|
||||
* `delay`
|
||||
* Pause macro playback. Duration is specified in milliseconds (ms).
|
||||
@@ -108,7 +108,7 @@ Only basic keycodes (prefixed by `KC_`) are supported. Do not include the `KC_`
|
||||
|
||||
### `SEND_STRING()` & `process_record_user`
|
||||
|
||||
See also: [Send String](feature_send_string)
|
||||
See also: [Send String](features/send_string)
|
||||
|
||||
Sometimes you want a key to type out words or phrases. For the most common situations, we've provided `SEND_STRING()`, which will type out a string (i.e. a sequence of characters) for you. All ASCII characters that are easily translatable to a keycode are supported (e.g. `qmk 123\n\t`).
|
||||
|
||||
@@ -252,11 +252,15 @@ You can send arbitrary keycodes by wrapping them in:
|
||||
|
||||
For example:
|
||||
|
||||
SEND_STRING(SS_TAP(X_HOME));
|
||||
```c
|
||||
SEND_STRING(SS_TAP(X_HOME));
|
||||
```
|
||||
|
||||
Would tap `KC_HOME` - note how the prefix is now `X_`, and not `KC_`. You can also combine this with other strings, like this:
|
||||
|
||||
SEND_STRING("VE"SS_TAP(X_HOME)"LO");
|
||||
```c
|
||||
SEND_STRING("VE"SS_TAP(X_HOME)"LO");
|
||||
```
|
||||
|
||||
Which would send "VE" followed by a `KC_HOME` tap, and "LO" (spelling "LOVE" if on a newline).
|
||||
|
||||
@@ -266,7 +270,9 @@ Delays can be also added to the string:
|
||||
|
||||
For example:
|
||||
|
||||
SEND_STRING("VE" SS_DELAY(1000) SS_TAP(X_HOME) "LO");
|
||||
```c
|
||||
SEND_STRING("VE" SS_DELAY(1000) SS_TAP(X_HOME) "LO");
|
||||
```
|
||||
|
||||
Which would send "VE" followed by a 1-second delay, then a `KC_HOME` tap, and "LO" (spelling "LOVE" if on a newline, but delayed in the middle).
|
||||
|
||||
@@ -284,7 +290,9 @@ There's also a couple of mod shortcuts you can use:
|
||||
These press the respective modifier, send the supplied string and then release the modifier.
|
||||
They can be used like this:
|
||||
|
||||
SEND_STRING(SS_LCTL("a"));
|
||||
```c
|
||||
SEND_STRING(SS_LCTL("a"));
|
||||
```
|
||||
|
||||
Which would send Left Control+`a` (Left Control down, `a`, Left Control up) - notice that they take strings (eg `"k"`), and not the `X_K` keycodes.
|
||||
|
||||
|
@@ -27,7 +27,7 @@ per speaker is - for example with a piezo buzzer - the black lead to Ground, and
|
||||
|
||||
|
||||
## ARM based boards
|
||||
for more technical details, see the notes on [Audio driver](audio_driver).
|
||||
for more technical details, see the notes on [Audio driver](../drivers/audio).
|
||||
|
||||
<!-- because I'm not sure where to fit this in: https://waveeditonline.com/ -->
|
||||
### DAC (basic)
|
||||
@@ -196,7 +196,7 @@ These keycodes turn all of the audio functionality on and off. Turning it off m
|
||||
|`GUITAR_SONG` | `GUITAR_SOUND` |Plays when the guitar music mode is selected (process_music.c) |
|
||||
|`VIOLIN_SONG` | `VIOLIN_SOUND` |Plays when the violin music mode is selected (process_music.c) |
|
||||
|`MAJOR_SONG` | `MAJOR_SOUND` |Plays when the major music mode is selected (process_music.c) |
|
||||
|`DEFAULT_LAYER_SONGS` | *Not defined* |Plays song when switched default layers with [`set_single_persistent_default_layer(layer)`](ref_functions.md#setting-the-persistent-default-layer)(quantum.c). |
|
||||
|`DEFAULT_LAYER_SONGS` | *Not defined* |Plays song when switched default layers with [`set_single_persistent_default_layer(layer)`](../ref_functions#setting-the-persistent-default-layer)(quantum.c). |
|
||||
|`SENDSTRING_BELL` | *Not defined* |Plays chime when the "enter" ("\a") character is sent (send_string.c) |
|
||||
|
||||
## Tempo
|
||||
@@ -263,31 +263,39 @@ In music mode, the following keycodes work differently, and don't pass through:
|
||||
|
||||
The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, add something like this to your `config.h`:
|
||||
|
||||
#define PITCH_STANDARD_A 432.0f
|
||||
```c
|
||||
#define PITCH_STANDARD_A 432.0f
|
||||
```
|
||||
|
||||
You can completely disable Music Mode as well. This is useful, if you're pressed for space on your controller. To disable it, add this to your `config.h`:
|
||||
|
||||
#define NO_MUSIC_MODE
|
||||
```c
|
||||
#define NO_MUSIC_MODE
|
||||
```
|
||||
|
||||
### Music Mask
|
||||
|
||||
By default, `MUSIC_MASK` is set to `keycode < 0xFF` which means keycodes less than `0xFF` are turned into notes, and don't output anything. You can change this by defining this in your `config.h` like this:
|
||||
|
||||
#define MUSIC_MASK keycode != KC_NO
|
||||
```c
|
||||
#define MUSIC_MASK keycode != KC_NO
|
||||
```
|
||||
|
||||
Which will capture all keycodes - be careful, this will get you stuck in music mode until you restart your keyboard!
|
||||
|
||||
For a more advanced way to control which keycodes should still be processed, you can use `music_mask_kb(keycode)` in `<keyboard>.c` and `music_mask_user(keycode)` in your `keymap.c`:
|
||||
|
||||
bool music_mask_user(uint16_t keycode) {
|
||||
switch (keycode) {
|
||||
case RAISE:
|
||||
case LOWER:
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
```c
|
||||
bool music_mask_user(uint16_t keycode) {
|
||||
switch (keycode) {
|
||||
case RAISE:
|
||||
case LOWER:
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Things that return false are not part of the mask, and are always processed.
|
||||
|
||||
@@ -329,8 +337,9 @@ Keycodes available:
|
||||
|
||||
The feature is disabled by default, to save space. To enable it, add this to your `config.h`:
|
||||
|
||||
#define AUDIO_CLICKY
|
||||
|
||||
```c
|
||||
#define AUDIO_CLICKY
|
||||
```
|
||||
|
||||
You can configure the default, min and max frequencies, the stepping and built in randomness by defining these values:
|
||||
|
||||
@@ -343,12 +352,9 @@ You can configure the default, min and max frequencies, the stepping and built i
|
||||
| `AUDIO_CLICKY_FREQ_RANDOMNESS` | 0.05f | Sets a factor of randomness for the clicks, Setting this to `0f` will make each click identical, and `1.0f` will make this sound much like the 90's computer screen scrolling/typing effect. |
|
||||
| `AUDIO_CLICKY_DELAY_DURATION` | 1 | An integer note duration where 1 is 1/16th of the tempo, or a sixty-fourth note (see `quantum/audio/musical_notes.h` for implementation details). The main clicky effect will be delayed by this duration. Adjusting this to values around 6-12 will help compensate for loud switches. |
|
||||
|
||||
|
||||
|
||||
|
||||
## MIDI Functionality
|
||||
|
||||
See [MIDI](feature_midi)
|
||||
See [MIDI](midi)
|
||||
|
||||
## Audio Keycodes
|
||||
|
@@ -51,7 +51,9 @@ Yes, unfortunately.
|
||||
|
||||
Add to your `rules.mk` in the keymap folder:
|
||||
|
||||
AUTO_SHIFT_ENABLE = yes
|
||||
```
|
||||
AUTO_SHIFT_ENABLE = yes
|
||||
```
|
||||
|
||||
If no `rules.mk` exists, you can create one.
|
||||
|
||||
@@ -292,7 +294,7 @@ Holding and releasing a Tap Hold key without pressing another key will ordinaril
|
||||
result in only the hold. With `retro shift` enabled this action will instead
|
||||
produce a shifted version of the tap keycode on release.
|
||||
|
||||
It does not require [Retro Tapping](tap_hold#retro-tapping) to be enabled, and
|
||||
It does not require [Retro Tapping](../tap_hold#retro-tapping) to be enabled, and
|
||||
if both are enabled the state of `retro tapping` will only apply if the tap keycode
|
||||
is not matched by Auto Shift. `RETRO_TAPPING_PER_KEY` and its corresponding
|
||||
function, however, are checked before `retro shift` is applied.
|
||||
@@ -316,10 +318,10 @@ Without a value set, holds of any length without an interrupting key will produc
|
||||
|
||||
This value (if set) must be greater than one's `TAPPING_TERM`, as the key press
|
||||
must be designated as a 'hold' by `process_tapping` before we send the modifier.
|
||||
[Per-key tapping terms](tap_hold#tapping-term) can be used as a workaround.
|
||||
[Per-key tapping terms](../tap_hold#tapping-term) can be used as a workaround.
|
||||
There is no such limitation in regards to `AUTO_SHIFT_TIMEOUT` for normal keys.
|
||||
|
||||
**Note:** Tap Holds must be added to Auto Shift, see [here.](feature_auto_shift#auto-shift-per-key)
|
||||
**Note:** Tap Holds must be added to Auto Shift, see [here.](auto_shift#auto-shift-per-key)
|
||||
`IS_RETRO` may be helpful if one wants all Tap Holds retro shifted.
|
||||
|
||||
### Retro Shift and Tap Hold Configurations
|
||||
@@ -328,7 +330,7 @@ Tap Hold Configurations work a little differently when using Retro Shift.
|
||||
Referencing `TAPPING_TERM` makes little sense, as holding longer would result in
|
||||
shifting one of the keys.
|
||||
|
||||
`RETRO_SHIFT` enables [`PERMISSIVE_HOLD`-like behaviour](tap_hold#permissive-hold) (even if not explicitly enabled) on all mod-taps for which `RETRO_SHIFT` applies.
|
||||
`RETRO_SHIFT` enables [`PERMISSIVE_HOLD`-like behaviour](../tap_hold#permissive-hold) (even if not explicitly enabled) on all mod-taps for which `RETRO_SHIFT` applies.
|
||||
|
||||
## Using Auto Shift Setup
|
||||
|
||||
@@ -372,22 +374,24 @@ completely normal and with no intention of shifted keys.
|
||||
|
||||
#### An Example Run
|
||||
|
||||
hello world. my name is john doe. i am a computer programmer playing with
|
||||
keyboards right now.
|
||||
```
|
||||
hello world. my name is john doe. i am a computer programmer playing with
|
||||
keyboards right now.
|
||||
|
||||
[PRESS AS_DOWN quite a few times]
|
||||
[PRESS AS_DOWN quite a few times]
|
||||
|
||||
heLLo woRLd. mY nAMe is JOHn dOE. i AM A compUTeR proGRaMMER PlAYiNG witH
|
||||
KEYboArDS RiGHT NOw.
|
||||
heLLo woRLd. mY nAMe is JOHn dOE. i AM A compUTeR proGRaMMER PlAYiNG witH
|
||||
KEYboArDS RiGHT NOw.
|
||||
|
||||
[PRESS AS_UP a few times]
|
||||
[PRESS AS_UP a few times]
|
||||
|
||||
hello world. my name is john Doe. i am a computer programmer playing with
|
||||
keyboarDs right now.
|
||||
hello world. my name is john Doe. i am a computer programmer playing with
|
||||
keyboarDs right now.
|
||||
|
||||
[PRESS AS_RPT]
|
||||
[PRESS AS_RPT]
|
||||
|
||||
115
|
||||
115
|
||||
```
|
||||
|
||||
The keyboard typed `115` which represents your current `AUTO_SHIFT_TIMEOUT`
|
||||
value. You are now set! Practice on the *D* key a little bit that showed up
|
@@ -113,7 +113,7 @@ Additionally, you can use the `AC_TOGG` keycode to toggle the on/off status for
|
||||
Callback function `bool process_autocorrect_user(uint16_t *keycode, keyrecord_t *record, uint8_t *typo_buffer_size, uint8_t *mods)` is available to customise incoming keycodes and handle exceptions. You can use this function to sanitise input before they are passed onto the autocorrect engine
|
||||
|
||||
::: tip
|
||||
Sanitisation of input is required because autocorrect will only match 8-bit [basic keycodes](keycodes_basic) for typos. If valid modifier keys or 16-bit keycodes that are part of a user's word input (such as Shift + A) is passed through, they will fail typo letter detection. For example a [Mod-Tap](mod_tap) key such as `LCTL_T(KC_A)` is 16-bit and should be masked for the 8-bit `KC_A`.
|
||||
Sanitisation of input is required because autocorrect will only match 8-bit [basic keycodes](../keycodes_basic) for typos. If valid modifier keys or 16-bit keycodes that are part of a user's word input (such as Shift + A) is passed through, they will fail typo letter detection. For example a [Mod-Tap](../mod_tap) key such as `LCTL_T(KC_A)` is 16-bit and should be masked for the 8-bit `KC_A`.
|
||||
:::
|
||||
|
||||
The default user callback function is found inside `quantum/process_keycode/process_autocorrect.c`. It covers most use-cases for QMK special functions and quantum keycodes, including [overriding autocorrect](#overriding-autocorrect) with a modifier other than shift. The `process_autocorrect_user` function is `weak` defined to allow user's copy inside `keymap.c` (or code files) to overwrite it.
|
@@ -1,6 +1,6 @@
|
||||
# Backlighting {#backlighting}
|
||||
|
||||
Many keyboards support backlit keys by way of individual LEDs placed through or underneath the keyswitches. This feature is distinct from both the [RGB Underglow](feature_rgblight) and [RGB Matrix](feature_rgb_matrix) features as it usually allows for only a single colour per switch, though you can obviously install multiple different single coloured LEDs on a keyboard.
|
||||
Many keyboards support backlit keys by way of individual LEDs placed through or underneath the keyswitches. This feature is distinct from both the [RGB Underglow](rgblight) and [RGB Matrix](rgb_matrix) features as it usually allows for only a single colour per switch, though you can obviously install multiple different single coloured LEDs on a keyboard.
|
||||
|
||||
QMK is able to control the brightness of these LEDs by switching them on and off rapidly in a certain ratio, a technique known as *Pulse Width Modulation*, or PWM. By altering the duty cycle of the PWM signal, it creates the illusion of dimming.
|
||||
|
||||
@@ -153,7 +153,7 @@ The following `#define`s apply only to the `timer` driver:
|
||||
|-----------------------|-------|----------------|
|
||||
|`BACKLIGHT_PWM_TIMER` |`1` |The timer to use|
|
||||
|
||||
Note that the choice of timer may conflict with the [Audio](feature_audio) feature.
|
||||
Note that the choice of timer may conflict with the [Audio](audio) feature.
|
||||
|
||||
## ChibiOS/ARM Configuration {#arm-configuration}
|
||||
|
@@ -26,7 +26,7 @@ A Bluefruit UART friend can be converted to an SPI friend, however this [require
|
||||
<!-- FIXME: Document bluetooth support more completely. -->
|
||||
## Bluetooth Rules.mk Options
|
||||
|
||||
The currently supported Bluetooth chipsets do not support [N-Key Rollover (NKRO)](reference_glossary#n-key-rollover-nkro), so `rules.mk` must contain `NKRO_ENABLE = no`.
|
||||
The currently supported Bluetooth chipsets do not support [N-Key Rollover (NKRO)](../reference_glossary#n-key-rollover-nkro), so `rules.mk` must contain `NKRO_ENABLE = no`.
|
||||
|
||||
Add the following to your `rules.mk`:
|
||||
|
@@ -25,7 +25,7 @@ Using Bootmagic will **always reset** the EEPROM, so you will lose any settings
|
||||
|
||||
## Split Keyboards
|
||||
|
||||
When [handedness](feature_split_keyboard#setting-handedness) is predetermined via options like `SPLIT_HAND_PIN` or `EE_HANDS`, you might need to configure a different key between halves. To identify the correct key for the right half, examine the split key matrix defined in the `<keyboard>.h` file, e.g.:
|
||||
When [handedness](split_keyboard#setting-handedness) is predetermined via options like `SPLIT_HAND_PIN` or `EE_HANDS`, you might need to configure a different key between halves. To identify the correct key for the right half, examine the split key matrix defined in the `<keyboard>.h` file, e.g.:
|
||||
|
||||
```c
|
||||
#define LAYOUT_split_3x5_2( \
|
||||
@@ -80,6 +80,6 @@ You can define additional logic here. For instance, resetting the EEPROM or requ
|
||||
|
||||
## Addenda
|
||||
|
||||
To manipulate settings that were formerly configured through the now-deprecated full Bootmagic feature, see [Magic Keycodes](keycodes_magic).
|
||||
To manipulate settings that were formerly configured through the now-deprecated full Bootmagic feature, see [Magic Keycodes](../keycodes_magic).
|
||||
|
||||
The Command feature, formerly known as Magic, also allows you to control different aspects of your keyboard. While it shares some functionality with Magic Keycodes, it also allows you to do things that Magic Keycodes cannot, such as printing version information to the console. For more information, see [Command](feature_command).
|
||||
The Command feature, formerly known as Magic, also allows you to control different aspects of your keyboard. While it shares some functionality with Magic Keycodes, it also allows you to do things that Magic Keycodes cannot, such as printing version information to the console. For more information, see [Command](command).
|
@@ -62,7 +62,7 @@ Next, use one the following methods to activate Caps Word:
|
||||
|
||||
* **Custom activation**: You can activate Caps Word from code by calling
|
||||
`caps_word_on()`. This may be used to activate Caps Word through [a
|
||||
combo](feature_combo) or [tap dance](feature_tap_dance) or any means
|
||||
combo](combo) or [tap dance](tap_dance) or any means
|
||||
you like.
|
||||
|
||||
### Troubleshooting: Command {#troubleshooting-command}
|
||||
@@ -71,7 +71,7 @@ When using `BOTH_SHIFTS_TURNS_ON_CAPS_WORD`, you might see a compile message
|
||||
**"BOTH_SHIFTS_TURNS_ON_CAPS_WORD and Command should not be enabled at the same
|
||||
time, since both use the Left Shift + Right Shift key combination."**
|
||||
|
||||
Many keyboards enable the [Command feature](feature_command), which by
|
||||
Many keyboards enable the [Command feature](command), which by
|
||||
default is also activated using the Left Shift + Right Shift key combination. To
|
||||
fix this conflict, please disable Command by adding in rules.mk:
|
||||
|
@@ -18,7 +18,7 @@ combo_t key_combos[] = {
|
||||
This will send "Escape" if you hit the A and B keys, and Ctrl+Z when you hit the C and D keys.
|
||||
|
||||
## Advanced Keycodes Support
|
||||
Advanced keycodes, such as [Mod-Tap](mod_tap) and [Tap Dance](feature_tap_dance) are also supported together with combos. If you use these advanced keycodes in your keymap, you will need to place the full keycode in the combo definition, e.g.:
|
||||
Advanced keycodes, such as [Mod-Tap](../mod_tap) and [Tap Dance](tap_dance) are also supported together with combos. If you use these advanced keycodes in your keymap, you will need to place the full keycode in the combo definition, e.g.:
|
||||
|
||||
```c
|
||||
const uint16_t PROGMEM test_combo1[] = {LSFT_T(KC_A), LT(1, KC_B), COMBO_END};
|
||||
@@ -99,7 +99,7 @@ void process_combo_event(uint16_t combo_index, bool pressed) {
|
||||
|
||||
This will send "john.doe@example.com" if you chord E and M together, and clear the current line with Backspace and Left-Shift. You could change this to do stuff like play sounds or change settings.
|
||||
|
||||
It is worth noting that `COMBO_ACTION`s are not needed anymore. As of [PR#8591](https://github.com/qmk/qmk_firmware/pull/8591/), it is possible to run your own custom keycodes from combos. Just define the custom keycode, program its functionality in `process_record_user`, and define a combo with `COMBO(<key_array>, <your_custom_keycode>)`. See the first example in [Macros](feature_macros).
|
||||
It is worth noting that `COMBO_ACTION`s are not needed anymore. As of [PR#8591](https://github.com/qmk/qmk_firmware/pull/8591/), it is possible to run your own custom keycodes from combos. Just define the custom keycode, program its functionality in `process_record_user`, and define a combo with `COMBO(<key_array>, <your_custom_keycode>)`. See the first example in [Macros](../feature_macros).
|
||||
|
||||
## Keycodes
|
||||
You can enable, disable and toggle the Combo feature on the fly. This is useful if you need to disable them temporarily, such as for a game. The following keycodes are available for use in your `keymap.c`
|
@@ -1,6 +1,6 @@
|
||||
# Command
|
||||
|
||||
Command, formerly known as Magic, is a way to change your keyboard's behavior without having to flash or unplug it to use [Bootmagic Lite](feature_bootmagic). There is a lot of overlap between this functionality and the [Magic Keycodes](keycodes_magic). Wherever possible we encourage you to use that feature instead of Command.
|
||||
Command, formerly known as Magic, is a way to change your keyboard's behavior without having to flash or unplug it to use [Bootmagic Lite](bootmagic). There is a lot of overlap between this functionality and the [Magic Keycodes](../keycodes_magic). Wherever possible we encourage you to use that feature instead of Command.
|
||||
|
||||
On some keyboards Command is disabled by default. If this is the case, it must be explicitly enabled in your `rules.mk`:
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Digitizer {#digitizer}
|
||||
|
||||
Digitizers allow the mouse cursor to be placed at absolute coordinates, unlike the [Pointing Device](feature_pointing_device) feature which applies relative displacements.
|
||||
Digitizers allow the mouse cursor to be placed at absolute coordinates, unlike the [Pointing Device](pointing_device) feature which applies relative displacements.
|
||||
|
||||
This feature implements a stylus device with a tip switch and barrel switch (generally equivalent to the primary and secondary mouse buttons respectively). Tip pressure is not currently implemented.
|
||||
|
||||
@@ -71,43 +71,43 @@ Send the digitizer report to the host if it is marked as dirty.
|
||||
|
||||
---
|
||||
|
||||
### `void digitizer_in_range_on(void)` :api-digitizer-in-range-on
|
||||
### `void digitizer_in_range_on(void)` {#api-digitizer-in-range-on}
|
||||
|
||||
Assert the "in range" indicator, and flush the report.
|
||||
|
||||
---
|
||||
|
||||
### `void digitizer_in_range_off(void)` :api-digitizer-in-range-off
|
||||
### `void digitizer_in_range_off(void)` {#api-digitizer-in-range-off}
|
||||
|
||||
Deassert the "in range" indicator, and flush the report.
|
||||
|
||||
---
|
||||
|
||||
### `void digitizer_tip_switch_on(void)` :api-digitizer-tip-switch-on
|
||||
### `void digitizer_tip_switch_on(void)` {#api-digitizer-tip-switch-on}
|
||||
|
||||
Assert the tip switch, and flush the report.
|
||||
|
||||
---
|
||||
|
||||
### `void digitizer_tip_switch_off(void)` :api-digitizer-tip-switch-off
|
||||
### `void digitizer_tip_switch_off(void)` {#api-digitizer-tip-switch-off}
|
||||
|
||||
Deassert the tip switch, and flush the report.
|
||||
|
||||
---
|
||||
|
||||
### `void digitizer_barrel_switch_on(void)` :api-digitizer-barrel-switch-on
|
||||
### `void digitizer_barrel_switch_on(void)` {#api-digitizer-barrel-switch-on}
|
||||
|
||||
Assert the barrel switch, and flush the report.
|
||||
|
||||
---
|
||||
|
||||
### `void digitizer_barrel_switch_off(void)` :api-digitizer-barrel-switch-off
|
||||
### `void digitizer_barrel_switch_off(void)` {#api-digitizer-barrel-switch-off}
|
||||
|
||||
Deassert the barrel switch, and flush the report.
|
||||
|
||||
---
|
||||
|
||||
### `void digitizer_set_position(float x, float y)` :api-digitizer-set-position
|
||||
### `void digitizer_set_position(float x, float y)` {#api-digitizer-set-position}
|
||||
|
||||
Set the absolute X and Y position of the digitizer contact, and flush the report.
|
||||
|
@@ -192,11 +192,11 @@ The Haptic Exclusion is implemented as `__attribute__((weak)) bool get_haptic_en
|
||||
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_LCTL`)
|
||||
* `MO()` momentary keys. See also [Layers](feature_layers).
|
||||
* `MO()` momentary keys. See also [Layers](../feature_layers).
|
||||
* `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).
|
||||
* `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).
|
||||
|
||||
### NO_HAPTIC_ALPHA
|
||||
With the entry of `#define NO_HAPTIC_ALPHA` in config.h, none of the alpha keys (A ... Z) will trigger a feedback.
|
@@ -1,6 +1,6 @@
|
||||
# Joystick {#joystick}
|
||||
|
||||
This feature provides game controller input as a joystick device supporting up to 6 axes and 32 buttons. Axes can be read either from an [ADC-capable input pin](adc_driver), or can be virtual, so that its value is provided by your code.
|
||||
This feature provides game controller input as a joystick device supporting up to 6 axes and 32 buttons. Axes can be read either from an [ADC-capable input pin](../drivers/adc), or can be virtual, so that its value is provided by your code.
|
||||
|
||||
An analog device such as a [potentiometer](https://en.wikipedia.org/wiki/Potentiometer) found on an analog joystick's axes is based on a voltage divider, where adjusting the movable wiper controls the output voltage which can then be read by the microcontroller's ADC.
|
||||
|
@@ -16,8 +16,8 @@ First, enable Key Lock by setting `KEY_LOCK_ENABLE = yes` in your `rules.mk`. Th
|
||||
|
||||
## Caveats
|
||||
|
||||
Key Lock is only able to hold standard action keys and [One Shot modifier](one_shot_keys) keys (for example, if you have your Shift defined as `OSM(MOD_LSFT)`).
|
||||
This does not include any of the QMK special functions (except One Shot modifiers), or shifted versions of keys such as `KC_LPRN`. If it's in the [Basic Keycodes](keycodes_basic) list, it can be held.
|
||||
Key Lock is only able to hold standard action keys and [One Shot modifier](../one_shot_keys) keys (for example, if you have your Shift defined as `OSM(MOD_LSFT)`).
|
||||
This does not include any of the QMK special functions (except One Shot modifiers), or shifted versions of keys such as `KC_LPRN`. If it's in the [Basic Keycodes](../keycodes_basic) list, it can be held.
|
||||
|
||||
Switching layers will not cancel the Key Lock. The Key Lock can be cancelled by calling the `cancel_key_lock()` function.
|
||||
|
@@ -103,7 +103,7 @@ const key_override_t **key_overrides = (const key_override_t *[]){
|
||||
```
|
||||
|
||||
### Flexible macOS-friendly Grave Escape {#flexible-macos-friendly-grave-escape}
|
||||
The [Grave Escape feature](feature_grave_esc) is limited in its configurability and has [bugs when used on macOS](feature_grave_esc#caveats). Key overrides can be used to achieve a similar functionality as Grave Escape, but with more customization and without bugs on macOS.
|
||||
The [Grave Escape feature](grave_esc) is limited in its configurability and has [bugs when used on macOS](grave_esc#caveats). Key overrides can be used to achieve a similar functionality as Grave Escape, but with more customization and without bugs on macOS.
|
||||
|
||||
```c
|
||||
// Shift + esc = ~
|
||||
@@ -224,7 +224,7 @@ The duration of the key repeat delay is controlled with the `KEY_OVERRIDE_REPEAT
|
||||
|
||||
## Difference to Combos {#difference-to-combos}
|
||||
|
||||
Note that key overrides are very different from [combos](feature_combo). Combos require that you press down several keys almost _at the same time_ and can work with any combination of non-modifier keys. Key overrides work like keyboard shortcuts (e.g. `ctrl` + `z`): They take combinations of _multiple_ modifiers and _one_ non-modifier key to then perform some custom action. Key overrides are implemented with much care to behave just like normal keyboard shortcuts would in regards to the order of pressed keys, timing, and interaction with other pressed keys. There are a number of optional settings that can be used to really fine-tune the behavior of each key override as well. Using key overrides also does not delay key input for regular key presses, which inherently happens in combos and may be undesirable.
|
||||
Note that key overrides are very different from [combos](combo). Combos require that you press down several keys almost _at the same time_ and can work with any combination of non-modifier keys. Key overrides work like keyboard shortcuts (e.g. `ctrl` + `z`): They take combinations of _multiple_ modifiers and _one_ non-modifier key to then perform some custom action. Key overrides are implemented with much care to behave just like normal keyboard shortcuts would in regards to the order of pressed keys, timing, and interaction with other pressed keys. There are a number of optional settings that can be used to really fine-tune the behavior of each key override as well. Using key overrides also does not delay key input for regular key presses, which inherently happens in combos and may be undesirable.
|
||||
|
||||
## Solution to the problem of flashing modifiers {#neutralize-flashing-modifiers}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# The Leader Key: A New Kind of Modifier {#the-leader-key}
|
||||
|
||||
If you're a Vim user, you probably know what a Leader key is. In contrast to [Combos](feature_combo), the Leader key allows you to hit a *sequence* of up to five keys instead, which triggers some custom functionality once complete.
|
||||
If you're a Vim user, you probably know what a Leader key is. In contrast to [Combos](combo), the Leader key allows you to hit a *sequence* of up to five keys instead, which triggers some custom functionality once complete.
|
||||
|
||||
## Usage {#usage}
|
||||
|
||||
@@ -86,7 +86,7 @@ Now, after you hit the leader key, you will have an infinite amount of time to s
|
||||
|
||||
### Strict Key Processing {#strict-key-processing}
|
||||
|
||||
By default, only the "tap keycode" portions of [Mod-Taps](mod_tap) and [Layer Taps](feature_layers#switching-and-toggling-layers) are added to the sequence buffer. This means if you press eg. `LT(3, KC_A)` as part of a sequence, `KC_A` will be added to the buffer, rather than the entire `LT(3, KC_A)` keycode.
|
||||
By default, only the "tap keycode" portions of [Mod-Taps](../mod_tap) and [Layer Taps](../feature_layers#switching-and-toggling-layers) are added to the sequence buffer. This means if you press eg. `LT(3, KC_A)` as part of a sequence, `KC_A` will be added to the buffer, rather than the entire `LT(3, KC_A)` keycode.
|
||||
|
||||
This gives a more expected behaviour for most users, however you may want to change this.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# LED Indicators
|
||||
|
||||
::: tip
|
||||
LED indicators on split keyboards will require state information synced to the slave half (e.g. `#define SPLIT_LED_STATE_ENABLE`). See [data sync options](feature_split_keyboard#data-sync-options) for more details.
|
||||
LED indicators on split keyboards will require state information synced to the slave half (e.g. `#define SPLIT_LED_STATE_ENABLE`). See [data sync options](split_keyboard#data-sync-options) for more details.
|
||||
:::
|
||||
|
||||
QMK provides methods to read 5 of the LEDs defined in the HID spec:
|
@@ -2,7 +2,7 @@
|
||||
|
||||
This feature allows you to use LED matrices driven by external drivers. It hooks into the backlight system so you can use the same keycodes as backlighting to control it.
|
||||
|
||||
If you want to use RGB LED's you should use the [RGB Matrix Subsystem](feature_rgb_matrix) instead.
|
||||
If you want to use RGB LED's you should use the [RGB Matrix Subsystem](rgb_matrix) instead.
|
||||
|
||||
## Driver configuration {#driver-configuration}
|
||||
---
|
||||
@@ -300,18 +300,11 @@ These modes introduce additional logic that can increase firmware size.
|
||||
|
||||
## Custom LED Matrix Effects {#custom-led-matrix-effects}
|
||||
|
||||
By setting `LED_MATRIX_CUSTOM_USER` (and/or `LED_MATRIX_CUSTOM_KB`) in `rules.mk`, new effects can be defined directly from userspace, without having to edit any QMK core files.
|
||||
By setting `LED_MATRIX_CUSTOM_USER = yes` in `rules.mk`, new effects can be defined directly from your keymap or userspace, without having to edit any QMK core files. To declare new effects, create a `led_matrix_user.inc` file in the user keymap directory or userspace folder.
|
||||
|
||||
To declare new effects, create a new `led_matrix_user/kb.inc` that looks something like this:
|
||||
|
||||
`led_matrix_user.inc` should go in the root of the keymap directory.
|
||||
`led_matrix_kb.inc` should go in the root of the keyboard directory.
|
||||
|
||||
To use custom effects in your code, simply prepend `LED_MATRIX_CUSTOM_` to the effect name specified in `LED_MATRIX_EFFECT()`. For example, an effect declared as `LED_MATRIX_EFFECT(my_cool_effect)` would be referenced with:
|
||||
|
||||
```c
|
||||
led_matrix_mode(led_MATRIX_CUSTOM_my_cool_effect);
|
||||
```
|
||||
::: tip
|
||||
Hardware maintainers who want to limit custom effects to a specific keyboard can create a `led_matrix_kb.inc` file in the root of the keyboard directory, and add `LED_MATRIX_CUSTOM_KB = yes` to the keyboard level `rules.mk`.
|
||||
:::
|
||||
|
||||
```c
|
||||
// !!! DO NOT ADD #pragma once !!! //
|
||||
@@ -356,6 +349,12 @@ static bool my_cool_effect2(effect_params_t* params) {
|
||||
#endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
|
||||
```
|
||||
|
||||
To switch to your custom effect programmatically, simply call `led_matrix_mode()` and prepend `LED_MATRIX_CUSTOM_` to the effect name your specified in `LED_MATRIX_EFFECT()`. For example, an effect declared as `LED_MATRIX_EFFECT(my_cool_effect)` would be referenced with:
|
||||
|
||||
```c
|
||||
led_matrix_mode(LED_MATRIX_CUSTOM_my_cool_effect);
|
||||
```
|
||||
|
||||
For inspiration and examples, check out the built-in effects under `quantum/led_matrix/animations/`.
|
||||
|
||||
|
||||
@@ -381,55 +380,6 @@ For inspiration and examples, check out the built-in effects under `quantum/led_
|
||||
|
||||
The EEPROM for it is currently shared with the RGB Matrix system (it's generally assumed only one feature would be used at a time).
|
||||
|
||||
### Direct Operation {#direct-operation}
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`led_matrix_set_value_all(v)` |Set all of the LEDs to the given value, where `v` is between 0 and 255 (not written to EEPROM) |
|
||||
|`led_matrix_set_value(index, v)` |Set a single LED to the given value, where `v` is between 0 and 255, and `index` is between 0 and `LED_MATRIX_LED_COUNT` (not written to EEPROM) |
|
||||
|
||||
### Disable/Enable Effects {#disable-enable-effects}
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`led_matrix_toggle()` |Toggle effect range LEDs between on and off |
|
||||
|`led_matrix_toggle_noeeprom()` |Toggle effect range LEDs between on and off (not written to EEPROM) |
|
||||
|`led_matrix_enable()` |Turn effect range LEDs on, based on their previous state |
|
||||
|`led_matrix_enable_noeeprom()` |Turn effect range LEDs on, based on their previous state (not written to EEPROM) |
|
||||
|`led_matrix_disable()` |Turn effect range LEDs off, based on their previous state |
|
||||
|`led_matrix_disable_noeeprom()` |Turn effect range LEDs off, based on their previous state (not written to EEPROM) |
|
||||
|
||||
### Change Effect Mode {#change-effect-mode}
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`led_matrix_mode(mode)` |Set the mode, if LED animations are enabled |
|
||||
|`led_matrix_mode_noeeprom(mode)` |Set the mode, if LED animations are enabled (not written to EEPROM) |
|
||||
|`led_matrix_step()` |Change the mode to the next LED animation in the list of enabled LED animations |
|
||||
|`led_matrix_step_noeeprom()` |Change the mode to the next LED animation in the list of enabled LED animations (not written to EEPROM) |
|
||||
|`led_matrix_step_reverse()` |Change the mode to the previous LED animation in the list of enabled LED animations |
|
||||
|`led_matrix_step_reverse_noeeprom()` |Change the mode to the previous LED animation in the list of enabled LED animations (not written to EEPROM) |
|
||||
|`led_matrix_increase_speed()` |Increase the speed of the animations |
|
||||
|`led_matrix_increase_speed_noeeprom()` |Increase the speed of the animations (not written to EEPROM) |
|
||||
|`led_matrix_decrease_speed()` |Decrease the speed of the animations |
|
||||
|`led_matrix_decrease_speed_noeeprom()` |Decrease the speed of the animations (not written to EEPROM) |
|
||||
|`led_matrix_set_speed(speed)` |Set the speed of the animations to the given value where `speed` is between 0 and 255 |
|
||||
|`led_matrix_set_speed_noeeprom(speed)` |Set the speed of the animations to the given value where `speed` is between 0 and 255 (not written to EEPROM) |
|
||||
|
||||
### Change Value {#change-value}
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`led_matrix_increase_val()` |Increase the value for effect range LEDs. This wraps around at maximum value |
|
||||
|`led_matrix_increase_val_noeeprom()` |Increase the value for effect range LEDs. This wraps around at maximum value (not written to EEPROM) |
|
||||
|`led_matrix_decrease_val()` |Decrease the value for effect range LEDs. This wraps around at minimum value |
|
||||
|`led_matrix_decrease_val_noeeprom()` |Decrease the value for effect range LEDs. This wraps around at minimum value (not written to EEPROM) |
|
||||
|
||||
### Query Current Status {#query-current-status}
|
||||
|Function |Description |
|
||||
|---------------------------------|---------------------------|
|
||||
|`led_matrix_is_enabled()` |Gets current on/off status |
|
||||
|`led_matrix_get_mode()` |Gets current mode |
|
||||
|`led_matrix_get_val()` |Gets current val |
|
||||
|`led_matrix_get_speed()` |Gets current speed |
|
||||
|`led_matrix_get_suspend_state()` |Gets current suspend state |
|
||||
|
||||
## Callbacks {#callbacks}
|
||||
|
||||
### Indicators {#indicators}
|
||||
@@ -453,3 +403,293 @@ void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
|
||||
return false;
|
||||
}
|
||||
```
|
||||
|
||||
## API {#api}
|
||||
|
||||
### `void led_matrix_toggle(void)` {#api-led-matrix-toggle}
|
||||
|
||||
Toggle LED Matrix on or off.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_toggle_noeeprom(void)` {#api-led-matrix-toggle-noeeprom}
|
||||
|
||||
Toggle LED Matrix on or off. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_enable(void)` {#api-led-matrix-enable}
|
||||
|
||||
Turn LED Matrix on.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_enable_noeeprom(void)` {#api-led-matrix-enable-noeeprom}
|
||||
|
||||
Turn LED Matrix on. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_disable(void)` {#api-led-matrix-disable}
|
||||
|
||||
Turn LED Matrix off.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_disable_noeeprom(void)` {#api-led-matrix-disable-noeeprom}
|
||||
|
||||
Turn LED Matrix off. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `bool led_matrix_is_enabled(void)` {#api-led-matrix-is-enabled}
|
||||
|
||||
Get the current enabled state of LED Matrix.
|
||||
|
||||
#### Return Value {#api-led-matrix-is-enabled-return}
|
||||
|
||||
`true` if LED Matrix is enabled.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_set_value(uint8_t index, uint8_t v)` {#led-matrix-set-value}
|
||||
|
||||
Set the brightness of a single LED.
|
||||
|
||||
This function can only be run from within an effect or indicator callback, otherwise the currently running animation will simply overwrite it on the next frame.
|
||||
|
||||
#### Arguments {#api-led-matrix-set-value-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index, from 0 to `LED_MATRIX_LED_COUNT - 1`.
|
||||
- `uint8_t v`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_set_value_all(uint8_t v)` {#api-led-matrix-set-value-all}
|
||||
|
||||
Set the brightness of all LEDs.
|
||||
|
||||
This function can only be run from within an effect or indicator callback, otherwise the currently running animation will simply overwrite it on the next frame.
|
||||
|
||||
#### Arguments {#api-led-matrix-set-value-all-arguments}
|
||||
|
||||
- `uint8_t v`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_mode(uint8_t mode)` {#api-led-matrix-mode}
|
||||
|
||||
Set the currently running effect.
|
||||
|
||||
#### Arguments {#api-led-matrix-mode-arguments}
|
||||
|
||||
- `uint8_t mode`
|
||||
The effect to switch to.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_mode_noeeprom(uint8_t mode)` {#api-led-matrix-mode-noeeprom}
|
||||
|
||||
Set the currently running effect. New state is not written to EEPROM.
|
||||
|
||||
#### Arguments {#api-led-matrix-mode-noeeprom-arguments}
|
||||
|
||||
- `uint8_t mode`
|
||||
The effect to switch to.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_step(void)` {#api-led-matrix-step}
|
||||
|
||||
Move to the next enabled effect.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_step_noeeprom(void)` {#api-led-matrix-step-noeeprom}
|
||||
|
||||
Move to the next enabled effect. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_step_reverse(void)` {#api-led-matrix-step-reverse}
|
||||
|
||||
Move to the previous enabled effect.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_step_reverse_noeeprom(void)` {#api-led-matrix-step-reverse-noeeprom}
|
||||
|
||||
Move to the previous enabled effect. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `uint8_t led_matrix_get_mode(void)` {#api-led-matrix-get-mode}
|
||||
|
||||
Get the currently running effect.
|
||||
|
||||
#### Return Value {#api-led-matrix-get-mode-return}
|
||||
|
||||
The index of the currently running effect.
|
||||
|
||||
---
|
||||
|
||||
### `void val_matrix_increase_val(void)` {#api-led-matrix-increase-val}
|
||||
|
||||
Increase the global effect brightness.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_increase_val_noeeprom(void)` {#api-led-matrix-increase-val-noeeprom}
|
||||
|
||||
Increase the global effect brightness. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_decrease_val(void)` {#api-led-matrix-decrease-val}
|
||||
|
||||
Decrease the global effect brightness.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_decrease_val_noeeprom(void)` {#api-led-matrix-decrease-val-noeeprom}
|
||||
|
||||
Decrease the global effect brightness. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `uint8_t led_matrix_get_val(void)` {#api-led-matrix-get-val}
|
||||
|
||||
Get the current global effect brightness.
|
||||
|
||||
#### Return Value {#api-led-matrix-get-val-return}
|
||||
|
||||
The current brightness value, from 0 to 255.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_increase_speed(void)` {#api-led-matrix-increase-speed}
|
||||
|
||||
Increase the effect speed.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_increase_speed_noeeprom(void)` {#api-led-matrix-increase-speed-noeeprom}
|
||||
|
||||
Increase the effect speed. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_decrease_speed(void)` {#api-led-matrix-decrease-speed}
|
||||
|
||||
Decrease the effect speed.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_decrease_speed_noeeprom(void)` {#api-led-matrix-decrease-speed-noeeprom}
|
||||
|
||||
Decrease the effect speed. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_set_speed(uint8_t speed)` {#api-led-matrix-set-speed}
|
||||
|
||||
Set the effect speed.
|
||||
|
||||
#### Arguments {#api-led-matrix-set-speed-arguments}
|
||||
|
||||
- `uint8_t speed`
|
||||
The new speed to set, from 0 to 255.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_set_speed_noeeprom(uint8_t speed)` {#api-led-matrix-set-speed-noeeprom}
|
||||
|
||||
Set the effect speed. New state is not written to EEPROM.
|
||||
|
||||
#### Arguments {#api-led-matrix-set-speed-noeeprom-arguments}
|
||||
|
||||
- `uint8_t speed`
|
||||
The new speed to set, from 0 to 255.
|
||||
|
||||
---
|
||||
|
||||
### `uint8_t led_matrix_get_speed(void)` {#api-led-matrix-get-speed}
|
||||
|
||||
Get the current effect speed.
|
||||
|
||||
#### Return Value {#api-led-matrix-get-speed-return}
|
||||
|
||||
The current effect speed, from 0 to 255.
|
||||
|
||||
---
|
||||
|
||||
### `void led_matrix_reload_from_eeprom(void)` {#api-led-matrix-reload-from-eeprom}
|
||||
|
||||
Reload the effect configuration (enabled, mode and brightness) from EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `bool led_matrix_get_suspend_state(void)` {#api-led-matrix-get-suspend-state}
|
||||
|
||||
Get the current suspend state of LED Matrix.
|
||||
|
||||
#### Return Value {#api-led-matrix-get-suspend-state-return}
|
||||
|
||||
`true` if LED Matrix is currently in the suspended state.
|
||||
|
||||
---
|
||||
|
||||
### `bool led_matrix_indicators_kb(void)` {#api-led-matrix-indicators-kb}
|
||||
|
||||
Keyboard-level callback, invoked after current animation frame is rendered but before it is flushed to the LEDs.
|
||||
|
||||
#### Return Value {#api-led-matrix-indicators-kb-return}
|
||||
|
||||
Currently unused.
|
||||
|
||||
---
|
||||
|
||||
### `bool led_matrix_indicators_user(void)` {#api-led-matrix-indicators-user}
|
||||
|
||||
Keymap-level callback, invoked after current animation frame is rendered but before it is flushed to the LEDs.
|
||||
|
||||
#### Return Value {#api-led-matrix-indicators-user-return}
|
||||
|
||||
`true` to continue running the keyboard-level callback.
|
||||
|
||||
---
|
||||
|
||||
### `bool led_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max)` {#api-led-matrix-indicators-advanced-kb}
|
||||
|
||||
Keyboard-level callback, invoked after current animation frame is rendered but before it is flushed to the LEDs.
|
||||
|
||||
### Arguments {#api-led-matrix-indicators-advanced-kb-arguments}
|
||||
|
||||
- `uint8_t led_min`
|
||||
The index of the first LED in this batch.
|
||||
- `uint8_t led_max`
|
||||
The index of the last LED in this batch.
|
||||
|
||||
#### Return Value {#api-led-matrix-indicators-advanced-kb-return}
|
||||
|
||||
Currently unused.
|
||||
|
||||
---
|
||||
|
||||
### `bool led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max)` {#api-led-matrix-indicators-advanced-user}
|
||||
|
||||
Keymap-level callback, invoked after current animation frame is rendered but before it is flushed to the LEDs.
|
||||
|
||||
### Arguments {#api-led-matrix-indicators-advanced-user-arguments}
|
||||
|
||||
- `uint8_t led_min`
|
||||
The index of the first LED in this batch.
|
||||
- `uint8_t led_max`
|
||||
The index of the last LED in this batch.
|
||||
|
||||
#### Return Value {#api-led-matrix-indicators-advanced-user-return}
|
||||
|
||||
`true` to continue running the keyboard-level callback.
|
@@ -34,7 +34,7 @@ To enable advanced MIDI, add the following to your `config.h`:
|
||||
|
||||
If you're aiming to emulate the features of something like a Launchpad or other MIDI controller you'll need to access the internal MIDI device directly.
|
||||
|
||||
Because there are so many possible CC messages, not all of them are implemented as keycodes. Additionally, you might need to provide more than just two values that you would get from a keycode (pressed and released) - for example, the analog values from a fader or a potentiometer. So, you will need to implement [custom keycodes](feature_macros) if you want to use them in your keymap directly using `process_record_user()`.
|
||||
Because there are so many possible CC messages, not all of them are implemented as keycodes. Additionally, you might need to provide more than just two values that you would get from a keycode (pressed and released) - for example, the analog values from a fader or a potentiometer. So, you will need to implement [custom keycodes](../feature_macros) if you want to use them in your keymap directly using `process_record_user()`.
|
||||
|
||||
|
||||
For reference of all the possible control code numbers see [MIDI Specification](#midi-specification)
|
@@ -205,4 +205,4 @@ Tips:
|
||||
|
||||
## Use with PS/2 Mouse and Pointing Device
|
||||
|
||||
Mouse keys button state is shared with [PS/2 mouse](feature_ps2_mouse) and [pointing device](feature_pointing_device) so mouse keys button presses can be used for clicks and drags.
|
||||
Mouse keys button state is shared with [PS/2 mouse](ps2_mouse) and [pointing device](pointing_device) so mouse keys button presses can be used for clicks and drags.
|
@@ -420,7 +420,7 @@ Any pointing device with a lift/contact status can integrate inertial cursor fea
|
||||
|
||||
## Split Keyboard Configuration
|
||||
|
||||
The following configuration options are only available when using `SPLIT_POINTING_ENABLE` see [data sync options](feature_split_keyboard#data-sync-options). The rotation and invert `*_RIGHT` options are only used with `POINTING_DEVICE_COMBINED`. If using `POINTING_DEVICE_LEFT` or `POINTING_DEVICE_RIGHT` use the common configuration above to configure your pointing device.
|
||||
The following configuration options are only available when using `SPLIT_POINTING_ENABLE` see [data sync options](split_keyboard#data-sync-options). The rotation and invert `*_RIGHT` options are only used with `POINTING_DEVICE_COMBINED`. If using `POINTING_DEVICE_LEFT` or `POINTING_DEVICE_RIGHT` use the common configuration above to configure your pointing device.
|
||||
|
||||
| Setting | Description | Default |
|
||||
| ------------------------------------ | ----------------------------------------------------------------------------------------------------- | ------------- |
|
||||
@@ -434,7 +434,7 @@ The following configuration options are only available when using `SPLIT_POINTIN
|
||||
| `POINTING_DEVICE_INVERT_Y_RIGHT` | (Optional) Inverts the Y axis report. | _not defined_ |
|
||||
|
||||
::: warning
|
||||
If there is a `_RIGHT` configuration option or callback, the [common configuration](feature_pointing_device#common-configuration) option will work for the left. For correct left/right detection you should setup a [handedness option](feature_split_keyboard#setting-handedness), `EE_HANDS` is usually a good option for an existing board that doesn't do handedness by hardware.
|
||||
If there is a `_RIGHT` configuration option or callback, the [common configuration](pointing_device#common-configuration) option will work for the left. For correct left/right detection you should setup a [handedness option](split_keyboard#setting-handedness), `EE_HANDS` is usually a good option for an existing board that doesn't do handedness by hardware.
|
||||
:::
|
||||
|
||||
|
||||
@@ -458,7 +458,7 @@ If there is a `_RIGHT` configuration option or callback, the [common configurati
|
||||
|
||||
## Split Keyboard Callbacks and Functions
|
||||
|
||||
The combined functions below are only available when using `SPLIT_POINTING_ENABLE` and `POINTING_DEVICE_COMBINED`. The 2 callbacks `pointing_device_task_combined_*` replace the single sided equivalents above. See the [combined pointing devices example](feature_pointing_device#combined-pointing-devices)
|
||||
The combined functions below are only available when using `SPLIT_POINTING_ENABLE` and `POINTING_DEVICE_COMBINED`. The 2 callbacks `pointing_device_task_combined_*` replace the single sided equivalents above. See the [combined pointing devices example](pointing_device#combined-pointing-devices)
|
||||
|
||||
| Function | Description |
|
||||
| --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
|
||||
@@ -684,7 +684,7 @@ If you are having issues with pointing device drivers debug messages can be enab
|
||||
```
|
||||
|
||||
::: tip
|
||||
The messages will be printed out to the `CONSOLE` output. For additional information, refer to [Debugging/Troubleshooting QMK](faq_debug).
|
||||
The messages will be printed out to the `CONSOLE` output. For additional information, refer to [Debugging/Troubleshooting QMK](../faq_debug).
|
||||
:::
|
||||
|
||||
|
@@ -172,7 +172,7 @@ uint16_t get_alt_repeat_key_keycode_user(uint16_t keycode, uint8_t mods) {
|
||||
#### Typing shortcuts
|
||||
|
||||
A useful possibility is having Alternate Repeat press [a
|
||||
macro](feature_macros). This way macros can be used without having to
|
||||
macro](../feature_macros). This way macros can be used without having to
|
||||
dedicate keys to them. The following defines a couple shortcuts.
|
||||
|
||||
* Typing <kbd>K</kbd>, <kbd>Alt Repeat</kbd> produces "`keyboard`," with the
|
||||
@@ -281,11 +281,8 @@ bool remember_last_key_user(uint16_t keycode, keyrecord_t* record,
|
||||
```
|
||||
|
||||
::: tip
|
||||
See [Layer Functions](feature_layers#functions) and [Checking Modifier
|
||||
See [Layer Functions](../feature_layers#functions) and [Checking Modifier State](../feature_advanced_keycodes#checking-modifier-state) for further details.
|
||||
:::
|
||||
State](feature_advanced_keycodes#checking-modifier-state) for further
|
||||
details.
|
||||
|
||||
|
||||
## Handle how a key is repeated
|
||||
|
||||
@@ -388,7 +385,7 @@ By leveraging `get_last_keycode()` in macros, it is possible to define
|
||||
additional, distinct "Alternate Repeat"-like keys. The following defines two
|
||||
keys `ALTREP2` and `ALTREP3` and implements ten shortcuts with them for common
|
||||
English 5-gram letter patterns, taking inspiration from
|
||||
[Stenotype](feature_stenography):
|
||||
[Stenotype](stenography):
|
||||
|
||||
|
||||
| Typing | Produces | Typing | Produces |
|
@@ -2,7 +2,7 @@
|
||||
|
||||
This feature allows you to use RGB LED matrices driven by external drivers. It hooks into the RGBLIGHT system so you can use the same keycodes as RGBLIGHT to control it.
|
||||
|
||||
If you want to use single color LED's you should use the [LED Matrix Subsystem](feature_led_matrix) instead.
|
||||
If you want to use single color LED's you should use the [LED Matrix Subsystem](led_matrix) instead.
|
||||
|
||||
## Driver configuration {#driver-configuration}
|
||||
---
|
||||
@@ -444,7 +444,7 @@ Configure the hardware via your `config.h`:
|
||||
```
|
||||
|
||||
::: tip
|
||||
There are additional configuration options for ARM controllers that offer increased performance over the default bitbang driver. Please see [WS2812 Driver](ws2812_driver) for more information.
|
||||
There are additional configuration options for ARM controllers that offer increased performance over the default bitbang driver. Please see [WS2812 Driver](../drivers/ws2812) for more information.
|
||||
:::
|
||||
|
||||
---
|
||||
@@ -619,7 +619,7 @@ All RGB keycodes are currently shared with the RGBLIGHT system:
|
||||
|
||||
|
||||
::: warning
|
||||
By default, if you have both the [RGB Light](feature_rgblight) 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.
|
||||
By default, if you have both the [RGB Light](rgblight) 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.
|
||||
:::
|
||||
|
||||
## RGB Matrix Effects {#rgb-matrix-effects}
|
||||
@@ -807,12 +807,6 @@ By setting `RGB_MATRIX_CUSTOM_USER = yes` in `rules.mk`, new effects can be defi
|
||||
Hardware maintainers who want to limit custom effects to a specific keyboard can create a `rgb_matrix_kb.inc` file in the root of the keyboard directory, and add `RGB_MATRIX_CUSTOM_KB = yes` to the keyboard level `rules.mk`.
|
||||
:::
|
||||
|
||||
To use custom effects in your code, simply prepend `RGB_MATRIX_CUSTOM_` to the effect name specified in `RGB_MATRIX_EFFECT()`. For example, an effect declared as `RGB_MATRIX_EFFECT(my_cool_effect)` would be referenced with:
|
||||
|
||||
```c
|
||||
rgb_matrix_mode(RGB_MATRIX_CUSTOM_my_cool_effect);
|
||||
```
|
||||
|
||||
```c
|
||||
// !!! DO NOT ADD #pragma once !!! //
|
||||
|
||||
@@ -856,6 +850,12 @@ static bool my_cool_effect2(effect_params_t* params) {
|
||||
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
|
||||
```
|
||||
|
||||
To switch to your custom effect programmatically, simply call `rgb_matrix_mode()` and prepend `RGB_MATRIX_CUSTOM_` to the effect name you specified in `RGB_MATRIX_EFFECT()`. For example, an effect declared as `RGB_MATRIX_EFFECT(my_cool_effect)` would be referenced with:
|
||||
|
||||
```c
|
||||
rgb_matrix_mode(RGB_MATRIX_CUSTOM_my_cool_effect);
|
||||
```
|
||||
|
||||
For inspiration and examples, check out the built-in effects under `quantum/rgb_matrix/animations/`.
|
||||
|
||||
|
||||
@@ -914,71 +914,6 @@ These are defined in [`color.h`](https://github.com/qmk/qmk_firmware/blob/master
|
||||
|
||||
The EEPROM for it is currently shared with the LED Matrix system (it's generally assumed only one feature would be used at a time).
|
||||
|
||||
## Functions {#functions}
|
||||
|
||||
### Direct Operation {#direct-operation}
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`rgb_matrix_set_color_all(r, g, b)` |Set all of the LEDs to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgb_matrix_set_color(index, r, g, b)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255, and `index` is between 0 and `RGB_MATRIX_LED_COUNT` (not written to EEPROM) |
|
||||
|
||||
### Disable/Enable Effects {#disable-enable-effects}
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`rgb_matrix_toggle()` |Toggle effect range LEDs between on and off |
|
||||
|`rgb_matrix_toggle_noeeprom()` |Toggle effect range LEDs between on and off (not written to EEPROM) |
|
||||
|`rgb_matrix_enable()` |Turn effect range LEDs on, based on their previous state |
|
||||
|`rgb_matrix_enable_noeeprom()` |Turn effect range LEDs on, based on their previous state (not written to EEPROM) |
|
||||
|`rgb_matrix_disable()` |Turn effect range LEDs off, based on their previous state |
|
||||
|`rgb_matrix_disable_noeeprom()` |Turn effect range LEDs off, based on their previous state (not written to EEPROM) |
|
||||
|
||||
### Change Effect Mode {#change-effect-mode}
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`rgb_matrix_mode(mode)` |Set the mode, if RGB animations are enabled |
|
||||
|`rgb_matrix_mode_noeeprom(mode)` |Set the mode, if RGB animations are enabled (not written to EEPROM) |
|
||||
|`rgb_matrix_step()` |Change the mode to the next RGB animation in the list of enabled RGB animations |
|
||||
|`rgb_matrix_step_noeeprom()` |Change the mode to the next RGB animation in the list of enabled RGB animations (not written to EEPROM) |
|
||||
|`rgb_matrix_step_reverse()` |Change the mode to the previous RGB animation in the list of enabled RGB animations |
|
||||
|`rgb_matrix_step_reverse_noeeprom()` |Change the mode to the previous RGB animation in the list of enabled RGB animations (not written to EEPROM) |
|
||||
|`rgb_matrix_increase_speed()` |Increase the speed of the animations |
|
||||
|`rgb_matrix_increase_speed_noeeprom()` |Increase the speed of the animations (not written to EEPROM) |
|
||||
|`rgb_matrix_decrease_speed()` |Decrease the speed of the animations |
|
||||
|`rgb_matrix_decrease_speed_noeeprom()` |Decrease the speed of the animations (not written to EEPROM) |
|
||||
|`rgb_matrix_set_speed(speed)` |Set the speed of the animations to the given value where `speed` is between 0 and 255 |
|
||||
|`rgb_matrix_set_speed_noeeprom(speed)` |Set the speed of the animations to the given value where `speed` is between 0 and 255 (not written to EEPROM) |
|
||||
|`rgb_matrix_reload_from_eeprom()` |Reload the effect configuration (enabled, mode and color) from EEPROM |
|
||||
|
||||
### Change Color {#change-color}
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`rgb_matrix_increase_hue()` |Increase the hue for effect range LEDs. This wraps around at maximum hue |
|
||||
|`rgb_matrix_increase_hue_noeeprom()` |Increase the hue for effect range LEDs. This wraps around at maximum hue (not written to EEPROM) |
|
||||
|`rgb_matrix_decrease_hue()` |Decrease the hue for effect range LEDs. This wraps around at minimum hue |
|
||||
|`rgb_matrix_decrease_hue_noeeprom()` |Decrease the hue for effect range LEDs. This wraps around at minimum hue (not written to EEPROM) |
|
||||
|`rgb_matrix_increase_sat()` |Increase the saturation for effect range LEDs. This wraps around at maximum saturation |
|
||||
|`rgb_matrix_increase_sat_noeeprom()` |Increase the saturation for effect range LEDs. This wraps around at maximum saturation (not written to EEPROM) |
|
||||
|`rgb_matrix_decrease_sat()` |Decrease the saturation for effect range LEDs. This wraps around at minimum saturation |
|
||||
|`rgb_matrix_decrease_sat_noeeprom()` |Decrease the saturation for effect range LEDs. This wraps around at minimum saturation (not written to EEPROM) |
|
||||
|`rgb_matrix_increase_val()` |Increase the value for effect range LEDs. This wraps around at maximum value |
|
||||
|`rgb_matrix_increase_val_noeeprom()` |Increase the value for effect range LEDs. This wraps around at maximum value (not written to EEPROM) |
|
||||
|`rgb_matrix_decrease_val()` |Decrease the value for effect range LEDs. This wraps around at minimum value |
|
||||
|`rgb_matrix_decrease_val_noeeprom()` |Decrease the value for effect range LEDs. This wraps around at minimum value (not written to EEPROM) |
|
||||
|`rgb_matrix_sethsv(h, s, v)` |Set LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 |
|
||||
|`rgb_matrix_sethsv_noeeprom(h, s, v)` |Set LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) |
|
||||
|
||||
### Query Current Status {#query-current-status}
|
||||
|Function |Description |
|
||||
|---------------------------------|---------------------------|
|
||||
|`rgb_matrix_is_enabled()` |Gets current on/off status |
|
||||
|`rgb_matrix_get_mode()` |Gets current mode |
|
||||
|`rgb_matrix_get_hue()` |Gets current hue |
|
||||
|`rgb_matrix_get_sat()` |Gets current sat |
|
||||
|`rgb_matrix_get_val()` |Gets current val |
|
||||
|`rgb_matrix_get_hsv()` |Gets hue, sat, and val and returns a [`HSV` structure](https://github.com/qmk/qmk_firmware/blob/7ba6456c0b2e041bb9f97dbed265c5b8b4b12192/quantum/color.h#L56-L61)|
|
||||
|`rgb_matrix_get_speed()` |Gets current speed |
|
||||
|`rgb_matrix_get_suspend_state()` |Gets current suspend state |
|
||||
|
||||
## Callbacks {#callbacks}
|
||||
|
||||
### Indicators {#indicators}
|
||||
@@ -1060,7 +995,7 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
|
||||
```
|
||||
|
||||
::: tip
|
||||
Split keyboards will require layer state data syncing with `#define SPLIT_LAYER_STATE_ENABLE`. See [Data Sync Options](feature_split_keyboard#data-sync-options) for more details.
|
||||
Split keyboards will require layer state data syncing with `#define SPLIT_LAYER_STATE_ENABLE`. See [Data Sync Options](split_keyboard#data-sync-options) for more details.
|
||||
:::
|
||||
|
||||
#### Examples {#indicator-examples-2}
|
||||
@@ -1072,9 +1007,9 @@ bool 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};
|
||||
hsv = (HSV){130, 255, 255};
|
||||
} else {
|
||||
hsv = {30, 255, 255};
|
||||
hsv = (HSV){30, 255, 255};
|
||||
}
|
||||
|
||||
if (hsv.v > rgb_matrix_get_val()) {
|
||||
@@ -1105,7 +1040,7 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
|
||||
```
|
||||
|
||||
::: tip
|
||||
RGB indicators on split keyboards will require state information synced to the slave half (e.g. `#define SPLIT_LAYER_STATE_ENABLE`). See [data sync options](feature_split_keyboard#data-sync-options) for more details.
|
||||
RGB indicators on split keyboards will require state information synced to the slave half (e.g. `#define SPLIT_LAYER_STATE_ENABLE`). See [data sync options](split_keyboard#data-sync-options) for more details.
|
||||
:::
|
||||
|
||||
#### Indicators without RGB Matrix Effect
|
||||
@@ -1117,3 +1052,409 @@ void keyboard_post_init_user(void) {
|
||||
rgb_matrix_sethsv_noeeprom(HSV_OFF);
|
||||
}
|
||||
```
|
||||
|
||||
## API {#api}
|
||||
|
||||
### `void rgb_matrix_toggle(void)` {#api-rgb-matrix-toggle}
|
||||
|
||||
Toggle RGB Matrix on or off.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_toggle_noeeprom(void)` {#api-rgb-matrix-toggle-noeeprom}
|
||||
|
||||
Toggle RGB Matrix on or off. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_enable(void)` {#api-rgb-matrix-enable}
|
||||
|
||||
Turn RGB Matrix on.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_enable_noeeprom(void)` {#api-rgb-matrix-enable-noeeprom}
|
||||
|
||||
Turn RGB Matrix on. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_disable(void)` {#api-rgb-matrix-disable}
|
||||
|
||||
Turn RGB Matrix off.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_disable_noeeprom(void)` {#api-rgb-matrix-disable-noeeprom}
|
||||
|
||||
Turn RGB Matrix off. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `bool rgb_matrix_is_enabled(void)` {#api-rgb-matrix-is-enabled}
|
||||
|
||||
Get the current enabled state of RGB Matrix.
|
||||
|
||||
#### Return Value {#api-rgb-matrix-is-enabled-return}
|
||||
|
||||
`true` if RGB Matrix is enabled.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_set_color(uint8_t index, uint8_t r, uint8_t g, uint8_t b)` {#api-rgb-matrix-set-color}
|
||||
|
||||
Set the color of a single LED.
|
||||
|
||||
This function can only be run from within an effect or indicator callback, otherwise the currently running animation will simply overwrite it on the next frame.
|
||||
|
||||
#### Arguments {#api-rgb-matrix-set-color-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index, from 0 to `RGB_MATRIX_LED_COUNT - 1`.
|
||||
- `uint8_t r`
|
||||
The red value to set.
|
||||
- `uint8_t g`
|
||||
The green value to set.
|
||||
- `uint8_t b`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_set_color_all(uint8_t r, uint8_t g, uint8_t b)` {#api-rgb-matrix-set-color-all}
|
||||
|
||||
Set the color of all LEDs.
|
||||
|
||||
This function can only be run from within an effect or indicator callback, otherwise the currently running animation will simply overwrite it on the next frame.
|
||||
|
||||
#### Arguments {#api-rgb-matrix-set-color-all-arguments}
|
||||
|
||||
- `uint8_t r`
|
||||
The red value to set.
|
||||
- `uint8_t g`
|
||||
The green value to set.
|
||||
- `uint8_t b`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_mode(uint8_t mode)` {#api-rgb-matrix-mode}
|
||||
|
||||
Set the currently running effect.
|
||||
|
||||
#### Arguments {#api-rgb-matrix-mode-arguments}
|
||||
|
||||
- `uint8_t mode`
|
||||
The effect to switch to.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_mode_noeeprom(uint8_t mode)` {#api-rgb-matrix-mode-noeeprom}
|
||||
|
||||
Set the currently running effect. New state is not written to EEPROM.
|
||||
|
||||
#### Arguments {#api-rgb-matrix-mode-noeeprom-arguments}
|
||||
|
||||
- `uint8_t mode`
|
||||
The effect to switch to.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_step(void)` {#api-rgb-matrix-step}
|
||||
|
||||
Move to the next enabled effect.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_step_noeeprom(void)` {#api-rgb-matrix-step-noeeprom}
|
||||
|
||||
Move to the next enabled effect. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_step_reverse(void)` {#api-rgb-matrix-step-reverse}
|
||||
|
||||
Move to the previous enabled effect.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_step_reverse_noeeprom(void)` {#api-rgb-matrix-step-reverse-noeeprom}
|
||||
|
||||
Move to the previous enabled effect. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `uint8_t rgb_matrix_get_mode(void)` {#api-rgb-matrix-get-mode}
|
||||
|
||||
Get the currently running effect.
|
||||
|
||||
#### Return Value {#api-rgb-matrix-get-mode-return}
|
||||
|
||||
The index of the currently running effect.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_increase_hue(void)` {#api-rgb-matrix-increase-hue}
|
||||
|
||||
Increase the global effect hue.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_increase_hue_noeeprom(void)` {#api-rgb-matrix-increase-hue-noeeprom}
|
||||
|
||||
Increase the global effect hue. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_decrease_hue(void)` {#api-rgb-matrix-decrease-hue}
|
||||
|
||||
Decrease the global effect hue.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_decrease_hue_noeeprom(void)` {#api-rgb-matrix-decrease-hue-noeeprom}
|
||||
|
||||
Decrease the global effect hue. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `uint8_t rgb_matrix_get_hue(void)` {#api-rgb-matrix-get-hue}
|
||||
|
||||
Get the current global effect hue.
|
||||
|
||||
#### Return Value {#api-rgb-matrix-get-hue-return}
|
||||
|
||||
The current hue value, from 0 to 255.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_increase_sat(void)` {#api-rgb-matrix-increase-sat}
|
||||
|
||||
Increase the global effect saturation.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_increase_sat_noeeprom(void)` {#api-rgb-matrix-increase-sat-noeeprom}
|
||||
|
||||
Increase the global effect saturation. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_decrease_sat(void)` {#api-rgb-matrix-decrease-sat}
|
||||
|
||||
Decrease the global effect saturation.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_decrease_sat_noeeprom(void)` {#api-rgb-matrix-decrease-sat-noeeprom}
|
||||
|
||||
Decrease the global effect saturation. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `uint8_t rgb_matrix_get_sat(void)` {#api-rgb-matrix-get-sat}
|
||||
|
||||
Get the current global effect saturation.
|
||||
|
||||
#### Return Value {#api-rgb-matrix-get-sat-return}
|
||||
|
||||
The current saturation value, from 0 to 255.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_increase_val(void)` {#api-rgb-matrix-increase-val}
|
||||
|
||||
Increase the global effect value (brightness).
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_increase_val_noeeprom(void)` {#api-rgb-matrix-increase-val-noeeprom}
|
||||
|
||||
Increase the global effect value (brightness). New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_decrease_val(void)` {#api-rgb-matrix-decrease-val}
|
||||
|
||||
Decrease the global effect value (brightness).
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_decrease_val_noeeprom(void)` {#api-rgb-matrix-decrease-val-noeeprom}
|
||||
|
||||
Decrease the global effect value (brightness). New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `uint8_t rgb_matrix_get_val(void)` {#api-rgb-matrix-get-val}
|
||||
|
||||
Get the current global effect value (brightness).
|
||||
|
||||
#### Return Value {#api-rgb-matrix-get-val-return}
|
||||
|
||||
The current brightness value, from 0 to 255.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_increase_speed(void)` {#api-rgb-matrix-increase-speed}
|
||||
|
||||
Increase the effect speed.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_increase_speed_noeeprom(void)` {#api-rgb-matrix-increase-speed-noeeprom}
|
||||
|
||||
Increase the effect speed. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_decrease_speed(void)` {#api-rgb-matrix-decrease-speed}
|
||||
|
||||
Decrease the effect speed.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_decrease_speed_noeeprom(void)` {#api-rgb-matrix-decrease-speed-noeeprom}
|
||||
|
||||
Decrease the effect speed. New state is not written to EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_set_speed(uint8_t speed)` {#api-rgb-matrix-set-speed}
|
||||
|
||||
Set the effect speed.
|
||||
|
||||
#### Arguments {#api-rgb-matrix-set-speed-arguments}
|
||||
|
||||
- `uint8_t speed`
|
||||
The new speed to set, from 0 to 255.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_set_speed_noeeprom(uint8_t speed)` {#api-rgb-matrix-set-speed-noeeprom}
|
||||
|
||||
Set the effect speed. New state is not written to EEPROM.
|
||||
|
||||
#### Arguments {#api-rgb-matrix-set-speed-noeeprom-arguments}
|
||||
|
||||
- `uint8_t speed`
|
||||
The new speed to set, from 0 to 255.
|
||||
|
||||
---
|
||||
|
||||
### `uint8_t rgb_matrix_get_speed(void)` {#api-rgb-matrix-get-speed}
|
||||
|
||||
Get the current effect speed.
|
||||
|
||||
#### Return Value {#api-rgb-matrix-get-speed-return}
|
||||
|
||||
The current effect speed, from 0 to 255.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_sethsv(uint8_t h, uint8_t s, uint8_t v)` {#api-rgb-matrix-sethsv}
|
||||
|
||||
Set the global effect hue, saturation, and value (brightness).
|
||||
|
||||
### Arguments {#api-rgb-matrix-sethsv-arguments}
|
||||
|
||||
- `uint8_t h`
|
||||
The hue to set, from 0 to 255.
|
||||
- `uint8_t s`
|
||||
The saturation to set, from 0 to 255.
|
||||
- `uint8_t v`
|
||||
The value (brightness) to set, from 0 to 255.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_sethsv_noeeprom(uint8_t h, uint8_t s, uint8_t v)` {#api-rgb-matrix-sethsv-noeeprom}
|
||||
|
||||
Set the global effect hue, saturation, and value (brightness). New state is not written to EEPROM.
|
||||
|
||||
#### Arguments {#api-rgb-matrix-sethsv-noeeprom-arguments}
|
||||
|
||||
- `uint8_t h`
|
||||
The hue to set, from 0 to 255.
|
||||
- `uint8_t s`
|
||||
The saturation to set, from 0 to 255.
|
||||
- `uint8_t v`
|
||||
The value (brightness) to set, from 0 to 255.
|
||||
|
||||
---
|
||||
|
||||
### `HSV rgb_matrix_get_hsv(void)` {#api-rgb-matrix-get-hsv}
|
||||
|
||||
Get the current global effect hue, saturation, and value (brightness).
|
||||
|
||||
#### Return Value {#api-rgb-matrix-get-hsv-return}
|
||||
|
||||
The current effect HSV as an `HSV` struct.
|
||||
|
||||
---
|
||||
|
||||
### `void rgb_matrix_reload_from_eeprom(void)` {#api-rgb-matrix-reload-from-eeprom}
|
||||
|
||||
Reload the effect configuration (enabled, mode and color) from EEPROM.
|
||||
|
||||
---
|
||||
|
||||
### `bool rgb_matrix_get_suspend_state(void)` {#api-rgb-matrix-get-suspend-state}
|
||||
|
||||
Get the current suspend state of RGB Matrix.
|
||||
|
||||
#### Return Value {#api-rgb-matrix-get-suspend-state-return}
|
||||
|
||||
`true` if RGB Matrix is currently in the suspended state.
|
||||
|
||||
---
|
||||
|
||||
### `bool rgb_matrix_indicators_kb(void)` {#api-rgb-matrix-indicators-kb}
|
||||
|
||||
Keyboard-level callback, invoked after current animation frame is rendered but before it is flushed to the LEDs.
|
||||
|
||||
#### Return Value {#api-rgb-matrix-indicators-kb-return}
|
||||
|
||||
Currently unused.
|
||||
|
||||
---
|
||||
|
||||
### `bool rgb_matrix_indicators_user(void)` {#api-rgb-matrix-indicators-user}
|
||||
|
||||
Keymap-level callback, invoked after current animation frame is rendered but before it is flushed to the LEDs.
|
||||
|
||||
#### Return Value {#api-rgb-matrix-indicators-user-return}
|
||||
|
||||
`true` to continue running the keyboard-level callback.
|
||||
|
||||
---
|
||||
|
||||
### `bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max)` {#api-rgb-matrix-indicators-advanced-kb}
|
||||
|
||||
Keyboard-level callback, invoked after current animation frame is rendered but before it is flushed to the LEDs.
|
||||
|
||||
### Arguments {#api-rgb-matrix-indicators-advanced-kb-arguments}
|
||||
|
||||
- `uint8_t led_min`
|
||||
The index of the first LED in this batch.
|
||||
- `uint8_t led_max`
|
||||
The index of the last LED in this batch.
|
||||
|
||||
#### Return Value {#api-rgb-matrix-indicators-advanced-kb-return}
|
||||
|
||||
Currently unused.
|
||||
|
||||
---
|
||||
|
||||
### `bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max)` {#api-rgb-matrix-indicators-advanced-user}
|
||||
|
||||
Keymap-level callback, invoked after current animation frame is rendered but before it is flushed to the LEDs.
|
||||
|
||||
### Arguments {#api-rgb-matrix-indicators-advanced-user-arguments}
|
||||
|
||||
- `uint8_t led_min`
|
||||
The index of the first LED in this batch.
|
||||
- `uint8_t led_max`
|
||||
The index of the last LED in this batch.
|
||||
|
||||
#### Return Value {#api-rgb-matrix-indicators-advanced-user-return}
|
||||
|
||||
`true` to continue running the keyboard-level callback.
|
@@ -23,7 +23,7 @@ RGBLIGHT_ENABLE = yes
|
||||
```
|
||||
|
||||
::: tip
|
||||
There are additional configuration options for ARM controllers that offer increased performance over the default WS2812 bitbang driver. Please see [WS2812 Driver](ws2812_driver) for more information.
|
||||
There are additional configuration options for ARM controllers that offer increased performance over the default WS2812 bitbang driver. Please see [WS2812 Driver](../drivers/ws2812) for more information.
|
||||
:::
|
||||
|
||||
For APA102 LEDs, add the following to your `rules.mk`:
|
||||
@@ -49,7 +49,7 @@ Then you should be able to use the keycodes below to change the RGB lighting to
|
||||
|
||||
QMK uses [Hue, Saturation, and Value](https://en.wikipedia.org/wiki/HSL_and_HSV) to select colors rather than RGB. The color wheel below demonstrates how this works.
|
||||
|
||||
<img src="./gitbook/images/color-wheel.svg" alt="HSV Color Wheel" width="250"/>
|
||||
<img src="../public/color-wheel.svg" alt="HSV Color Wheel" width="250"/>
|
||||
|
||||
Changing the **Hue** cycles around the circle.<br>
|
||||
Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color.<br>
|
||||
@@ -87,7 +87,7 @@ Changing the **Value** sets the overall brightness.<br>
|
||||
|
||||
|
||||
::: warning
|
||||
By default, if you have both the RGB Light and the [RGB Matrix](feature_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.
|
||||
By default, if you have both the RGB Light and the [RGB Matrix](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.
|
||||
:::
|
||||
|
||||
## Configuration
|
||||
@@ -218,7 +218,7 @@ const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64};
|
||||
## Lighting Layers
|
||||
|
||||
::: tip
|
||||
**Note:** Lighting Layers is an RGB Light feature, it will not work for RGB Matrix. See [RGB Matrix Indicators](feature_rgb_matrix#indicators) for details on how to do so.
|
||||
**Note:** Lighting Layers is an RGB Light feature, it will not work for RGB Matrix. See [RGB Matrix Indicators](rgb_matrix#indicators) for details on how to do so.
|
||||
:::
|
||||
|
||||
By including `#define RGBLIGHT_LAYERS` in your `config.h` file you can enable lighting layers. These make
|
||||
@@ -353,7 +353,7 @@ rgblight_blink_layer(2, 500);
|
||||
```
|
||||
|
||||
::: warning
|
||||
Lighting layers on split keyboards will require layer state synced to the slave half (e.g. `#define SPLIT_LAYER_STATE_ENABLE`). See [data sync options](feature_split_keyboard#data-sync-options) for more details.
|
||||
Lighting layers on split keyboards will require layer state synced to the slave half (e.g. `#define SPLIT_LAYER_STATE_ENABLE`). See [data sync options](split_keyboard#data-sync-options) for more details.
|
||||
:::
|
||||
|
||||
### Overriding RGB Lighting on/off status
|
@@ -16,7 +16,7 @@ To unlock, the user must perform a set of actions. This can optionally be config
|
||||
### Automatic Locking
|
||||
|
||||
Once unlocked, the keyboard will revert back to a locked state after the configured timeout.
|
||||
The timeout can be refreshed by using the `secure_activity_event` function, for example from one of the various [hooks](custom_quantum_functions).
|
||||
The timeout can be refreshed by using the `secure_activity_event` function, for example from one of the various [hooks](../custom_quantum_functions).
|
||||
|
||||
## Usage
|
||||
|
@@ -5,7 +5,7 @@ The Send String API is part of QMK's macro system. It allows for sequences of ke
|
||||
The full ASCII character set is supported, along with all of the keycodes in the Basic Keycode range (as these are the only ones that will actually be sent to the host).
|
||||
|
||||
::: tip
|
||||
Unicode characters are **not** supported with this API -- see the [Unicode](feature_unicode) feature instead.
|
||||
Unicode characters are **not** supported with this API -- see the [Unicode](unicode) feature instead.
|
||||
:::
|
||||
|
||||
## Usage {#usage}
|
||||
@@ -22,12 +22,12 @@ Add the following to your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|-----------------|----------------|------------------------------------------------------------------------------------------------------------|
|
||||
|`SENDSTRING_BELL`|*Not defined* |If the [Audio](feature_audio) feature is enabled, the `\a` character (ASCII `BEL`) will beep the speaker.|
|
||||
|`SENDSTRING_BELL`|*Not defined* |If the [Audio](audio) feature is enabled, the `\a` character (ASCII `BEL`) will beep the speaker.|
|
||||
|`BELL_SOUND` |`TERMINAL_SOUND`|The song to play when the `\a` character is encountered. By default, this is an eighth note of C5. |
|
||||
|
||||
## Keycodes {#keycodes}
|
||||
|
||||
The Send String functions accept C string literals, but specific keycodes can be injected with the below macros. All of the keycodes in the [Basic Keycode range](keycodes_basic) are supported (as these are the only ones that will actually be sent to the host), but with an `X_` prefix instead of `KC_`.
|
||||
The Send String functions accept C string literals, but specific keycodes can be injected with the below macros. All of the keycodes in the [Basic Keycode range](../keycodes_basic) are supported (as these are the only ones that will actually be sent to the host), but with an `X_` prefix instead of `KC_`.
|
||||
|
||||
|Macro |Description |
|
||||
|--------------|-------------------------------------------------------------------|
|
||||
@@ -48,7 +48,7 @@ The following characters are also mapped to their respective keycodes for conven
|
||||
|
||||
### Language Support {#language-support}
|
||||
|
||||
By default, Send String assumes your OS keyboard layout is set to US ANSI. If you are using a different keyboard layout, you can [override the lookup tables used to convert ASCII characters to keystrokes](reference_keymap_extras#sendstring-support).
|
||||
By default, Send String assumes your OS keyboard layout is set to US ANSI. If you are using a different keyboard layout, you can [override the lookup tables used to convert ASCII characters to keystrokes](../reference_keymap_extras#sendstring-support).
|
||||
|
||||
## Examples {#examples}
|
||||
|
@@ -3,7 +3,7 @@
|
||||
Since QMK has experimental support for MIDI, you can now turn your keyboard into a [step sequencer](https://en.wikipedia.org/wiki/Music_sequencer#Step_sequencers)!
|
||||
|
||||
::: warning
|
||||
**IMPORTANT:** This feature is highly experimental, it has only been tested on a Planck EZ so far. Also, the scope will be limited to support the drum machine use-case to start with.
|
||||
This feature is highly experimental, it has only been tested on a Planck EZ so far. Also, the scope will be limited to support the drum machine use-case to start with.
|
||||
:::
|
||||
|
||||
## Enable the step sequencer
|
@@ -24,7 +24,7 @@ Firstly, in your keymap, do one of the following:
|
||||
|
||||
## Caveats
|
||||
|
||||
Space Cadet's functionality can conflict with the default Command functionality when both Shift keys are held at the same time. See the [Command feature](feature_command) for info on how to change it, or make sure that Command is disabled in your `rules.mk` with:
|
||||
Space Cadet's functionality can conflict with the default Command functionality when both Shift keys are held at the same time. See the [Command feature](command) for info on how to change it, or make sure that Command is disabled in your `rules.mk` with:
|
||||
|
||||
```make
|
||||
COMMAND_ENABLE = no
|
@@ -20,12 +20,12 @@ Both sides must use the same MCU family, for eg two Pro Micro-compatible control
|
||||
|
||||
| Transport | AVR | ARM |
|
||||
|------------------------------|--------------------|--------------------|
|
||||
| ['serial'](serial_driver) | :heavy_check_mark: | :white_check_mark: <sup>1</sup> |
|
||||
| ['serial'](../drivers/serial) | :heavy_check_mark: | :white_check_mark: <sup>1</sup> |
|
||||
| I2C | :heavy_check_mark: | |
|
||||
|
||||
Notes:
|
||||
|
||||
1. Both hardware and software limitations are detailed within the [driver documentation](serial_driver).
|
||||
1. Both hardware and software limitations are detailed within the [driver documentation](../drivers/serial).
|
||||
|
||||
## Hardware Configuration
|
||||
|
||||
@@ -173,10 +173,10 @@ Some controllers (e.g. Blackpill with DFU compatible bootloader) will need to be
|
||||
:::
|
||||
|
||||
::: tip
|
||||
[QMK Toolbox]() can also be used to flash EEPROM handedness files. Place the controller in bootloader mode and select menu option Tools -> EEPROM -> Set Left/Right Hand
|
||||
[QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases/) can also be used to flash EEPROM handedness files. Place the controller in bootloader mode and select menu option Tools -> EEPROM -> Set Left/Right Hand
|
||||
:::
|
||||
|
||||
This setting is not changed when re-initializing the EEPROM using the `EE_CLR` key, or using the `eeconfig_init()` function. However, if you reset the EEPROM outside of the firmware's built in options (such as flashing a file that overwrites the `EEPROM`, like how the [QMK Toolbox]()'s "Reset EEPROM" button works), you'll need to re-flash the controller with the `EEPROM` files.
|
||||
This setting is not changed when re-initializing the EEPROM using the `EE_CLR` key, or using the `eeconfig_init()` function. However, if you reset the EEPROM outside of the firmware's built in options (such as flashing a file that overwrites the `EEPROM`, like how the [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases/)'s "Reset EEPROM" button works), you'll need to re-flash the controller with the `EEPROM` files.
|
||||
|
||||
You can find the `EEPROM` files in the QMK firmware repo, [here](https://github.com/qmk/qmk_firmware/tree/master/quantum/split_common).
|
||||
|
||||
@@ -307,7 +307,7 @@ This enables transmitting the current ST7565 on/off status to the slave side of
|
||||
This enables transmitting the pointing device status to the master side of the split keyboard. The purpose of this feature is to enable use pointing devices on the slave side.
|
||||
|
||||
::: warning
|
||||
There is additional required configuration for `SPLIT_POINTING_ENABLE` outlined in the [pointing device documentation](feature_pointing_device#split-keyboard-configuration).
|
||||
There is additional required configuration for `SPLIT_POINTING_ENABLE` outlined in the [pointing device documentation](pointing_device#split-keyboard-configuration).
|
||||
:::
|
||||
|
||||
```c
|
@@ -25,7 +25,7 @@ Note: Due to hardware limitations, you might not be able to run both a virtual s
|
||||
:::
|
||||
|
||||
::: warning
|
||||
Serial stenography protocols are not supported on [V-USB keyboards](compatible_microcontrollers#atmel-avr).
|
||||
Serial stenography protocols are not supported on [V-USB keyboards](../compatible_microcontrollers#atmel-avr).
|
||||
:::
|
||||
|
||||
To enable stenography protocols, add the following lines to your `rules.mk`:
|
||||
@@ -94,7 +94,7 @@ STENO_ENABLE = yes
|
||||
STENO_PROTOCOL = all
|
||||
```
|
||||
|
||||
If you want to switch protocols programatically, as part of a custom macro for example, don't use `tap_code(QK_STENO_*)`, as `tap_code` only supports [basic keycodes](keycodes_basic). Instead, you should use `steno_set_mode(STENO_MODE_*)`, whose valid arguments are `STENO_MODE_BOLT` and `STENO_MODE_GEMINI`.
|
||||
If you want to switch protocols programatically, as part of a custom macro for example, don't use `tap_code(QK_STENO_*)`, as `tap_code` only supports [basic keycodes](../keycodes_basic). Instead, you should use `steno_set_mode(STENO_MODE_*)`, whose valid arguments are `STENO_MODE_BOLT` and `STENO_MODE_GEMINI`.
|
||||
|
||||
The default protocol is Gemini PR but the last protocol used is stored in non-volatile memory so QMK will remember your choice between reboots of your keyboard — assuming that your keyboard features (emulated) EEPROM.
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Swap-Hands Action
|
||||
|
||||
The swap-hands action allows support for one-handed typing without requiring a separate layer. Set `SWAP_HANDS_ENABLE` in the Makefile and define a `hand_swap_config` entry in your keymap. Now whenever the `ACTION_SWAP_HANDS` command key is pressed the keyboard is mirrored. For instance, to type "Hello, World" on QWERTY you would type `^Ge^s^s^w^c W^wr^sd`
|
||||
The swap-hands action allows support for one-handed typing without requiring a separate layer. Set `SWAP_HANDS_ENABLE = yes` in your keymap's `rules.mk` (creating it if needed), and define a `hand_swap_config` entry in your keymap. Now whenever the `ACTION_SWAP_HANDS` command key is pressed the keyboard is mirrored. For instance, to type "Hello, World" on QWERTY you would type `^Ge^s^s^w^c W^wr^sd`
|
||||
|
||||
## Configuration
|
||||
|
||||
@@ -30,7 +30,7 @@ Note that the array indices are reversed same as the matrix and the values are o
|
||||
|`QK_SWAP_HANDS_TAP_TOGGLE` |`SH_TT` |Momentary swap when held, toggle when tapped |
|
||||
|`QK_SWAP_HANDS_ONE_SHOT` |`SH_OS` |Turn on hand swap while held or until next key press|
|
||||
|
||||
`SH_TT` swap-hands tap-toggle key is similar to [layer tap-toggle](feature_layers#switching-and-toggling-layers). Tapping repeatedly (5 taps by default) will toggle swap-hands on or off, like `SH_TOGG`. Tap-toggle count can be changed by defining a value for `TAPPING_TOGGLE`.
|
||||
`SH_TT` swap-hands tap-toggle key is similar to [layer tap-toggle](../feature_layers#switching-and-toggling-layers). Tapping repeatedly (5 taps by default) will toggle swap-hands on or off, like `SH_TOGG`. Tap-toggle count can be changed by defining a value for `TAPPING_TOGGLE`.
|
||||
|
||||
## Encoder Mapping
|
||||
|
@@ -17,7 +17,7 @@ Optionally, you might want to set a custom `TAPPING_TERM` time by adding somethi
|
||||
#define TAPPING_TERM_PER_KEY
|
||||
```
|
||||
|
||||
The `TAPPING_TERM` time is the maximum time allowed between taps of your Tap Dance key, and is measured in milliseconds. For example, if you used the above `#define` statement and set up a Tap Dance key that sends `Space` on single-tap and `Enter` on double-tap, then this key will send `ENT` only if you tap this key twice in less than 175ms. If you tap the key, wait more than 175ms, and tap the key again you'll end up sending `SPC SPC` instead. The `TAPPING_TERM_PER_KEY` definition is only needed if you control the tapping term through a [custom `get_tapping_term` function](tap_hold#tapping_term), which may be needed because `TAPPING_TERM` affects not just tap-dance keys.
|
||||
The `TAPPING_TERM` time is the maximum time allowed between taps of your Tap Dance key, and is measured in milliseconds. For example, if you used the above `#define` statement and set up a Tap Dance key that sends `Space` on single-tap and `Enter` on double-tap, then this key will send `ENT` only if you tap this key twice in less than 175ms. If you tap the key, wait more than 175ms, and tap the key again you'll end up sending `SPC SPC` instead. The `TAPPING_TERM_PER_KEY` definition is only needed if you control the tapping term through a [custom `get_tapping_term` function](../tap_hold#tapping_term), which may be needed because `TAPPING_TERM` affects not just tap-dance keys.
|
||||
|
||||
Next, you will want to define some tap-dance keys, which is easiest to do with the `TD()` macro. That macro takes a number which will later be used as an index into the `tap_dance_actions` array and turns it into a tap-dance keycode.
|
||||
|
||||
@@ -33,7 +33,7 @@ After this, you'll want to use the `tap_dance_actions` array to specify what act
|
||||
The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE_DOUBLE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise.
|
||||
|
||||
::: warning
|
||||
Keep in mind that only [basic keycodes](keycodes_basic) are supported here. Custom keycodes are not supported.
|
||||
Keep in mind that only [basic keycodes](../keycodes_basic) are supported here. Custom keycodes are not supported.
|
||||
:::
|
||||
|
||||
Similar to the first option, the second and third option are good for simple layer-switching cases.
|
@@ -8,14 +8,14 @@ TRI_LAYER_ENABLE = yes
|
||||
|
||||
Note that the "upper", "lower" and "adjust" names don't have a particular significance, they are just used to identify and clarify the behavior. Layers are processed from highest numeric value to lowest, however the values are not required to be consecutive.
|
||||
|
||||
For a detailed explanation of how the layer stack works, check out [Keymap Overview](keymap#keymap-and-layers).
|
||||
For a detailed explanation of how the layer stack works, check out [Keymap Overview](../keymap#keymap-and-layers).
|
||||
|
||||
## Keycodes {#keycodes}
|
||||
|
||||
| Keycode | Alias | Description |
|
||||
|----------------------|-----------|---------------------------------------------------------------------------------------------------------|
|
||||
| `QK_TRI_LAYER_LOWER` | `TL_LOWR` | Momentarily enables the "lower" layer. Enables the "adjust" layer if the "upper" layer is also enabled" |
|
||||
| `QK_TRI_LAYER_UPPER` | `TL_UPPR` | Momentarily enables the "upper" layer. Enables the "adjust" layer if the "lower" layer is also enabled" |
|
||||
| `QK_TRI_LAYER_LOWER` | `TL_LOWR` | Momentarily enables the "lower" layer. Enables the "adjust" layer if the "upper" layer is also enabled. |
|
||||
| `QK_TRI_LAYER_UPPER` | `TL_UPPR` | Momentarily enables the "upper" layer. Enables the "adjust" layer if the "lower" layer is also enabled. |
|
||||
|
||||
## Configuration
|
||||
|
@@ -31,7 +31,7 @@ Add the following to your `config.h`:
|
||||
|
||||
### Audio Feedback {#audio-feedback}
|
||||
|
||||
If you have the [Audio](feature_audio) feature enabled on your board, you can configure it to play sounds when the input mode is changed.
|
||||
If you have the [Audio](audio) feature enabled on your board, you can configure it to play sounds when the input mode is changed.
|
||||
|
||||
Add the following to your `config.h`:
|
||||
|
||||
@@ -199,7 +199,7 @@ Emacs supports code point input with the `insert-char` command.
|
||||
|
||||
**Mode Name:** `UNICODE_MODE_BSD`
|
||||
|
||||
Not currently implemented. If you're a BSD user and want to contribute support for this input mode, please [feel free](contributing)!
|
||||
Not currently implemented. If you're a BSD user and want to contribute support for this input mode, please [feel free](../contributing)!
|
||||
|
||||
:::::
|
||||
|
||||
@@ -242,13 +242,13 @@ Set the Unicode input mode.
|
||||
|
||||
---
|
||||
|
||||
### `void unicode_input_mode_step(void)` : {#api-unicode-input-mode-step}
|
||||
### `void unicode_input_mode_step(void)` {#api-unicode-input-mode-step}
|
||||
|
||||
Change to the next Unicode input mode.
|
||||
|
||||
---
|
||||
|
||||
### `void unicode_input_mode_step_reverse(void)` : {#api-unicode-input-mode-step-reverse}
|
||||
### `void unicode_input_mode_step_reverse(void)` {#api-unicode-input-mode-step-reverse}
|
||||
|
||||
Change to the previous Unicode input mode.
|
||||
|
@@ -53,7 +53,7 @@ QMK maintains [a fork of the LUFA DFU bootloader](https://github.com/qmk/lufa/tr
|
||||
//#define QMK_LED E6
|
||||
//#define QMK_SPEAKER C6
|
||||
```
|
||||
Currently we do not recommend making `QMK_ESC` the same key as the one designated for [Bootmagic Lite](feature_bootmagic), as holding it down will cause the MCU to loop back and forth between entering and exiting the bootloader.
|
||||
Currently we do not recommend making `QMK_ESC` the same key as the one designated for [Bootmagic Lite](features/bootmagic), as holding it down will cause the MCU to loop back and forth between entering and exiting the bootloader.
|
||||
|
||||
The manufacturer and product strings are automatically pulled from `config.h`, with " Bootloader" appended to the product string.
|
||||
|
||||
@@ -209,7 +209,7 @@ To enable the additional features, add the following defines to your `config.h`:
|
||||
//#define QMK_SPEAKER C6
|
||||
```
|
||||
|
||||
Currently we do not recommend making `QMK_ESC` the same key as the one designated for [Bootmagic Lite](feature_bootmagic), as holding it down will cause the MCU to loop back and forth between entering and exiting the bootloader.
|
||||
Currently we do not recommend making `QMK_ESC` the same key as the one designated for [Bootmagic Lite](features/bootmagic), as holding it down will cause the MCU to loop back and forth between entering and exiting the bootloader.
|
||||
|
||||
The manufacturer and product strings are automatically pulled from `config.h`, with " Bootloader" appended to the product string.
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user