Skip to content

Commit 5923f28

Browse files
committed
Merge remote-tracking branch 'upstream/master'
* upstream/master: (34 commits) Update keycodes_0.0.1_basic.hjson (qmk#20129) [Doc] Add example to keyboard housekeeping and some minor fixes (qmk#19968) [Keyboard] Add Atlantis PS17 (qmk#19952) add tiger80 iso layout support (qmk#19975) [Keyboard] Add hineybush/h87_g2 (qmk#20053) add new board: splaytoraid (qmk#20052) [Keyboard] New Keyboard - Sugar Glider (qmk#19933) Let's use workflows to parallelise the builds. (qmk#20120) [Keyboard] Add KP60 (qmk#20096) Update newbs_getting_started to include instructions for apple silicon (qmk#19579) RF R1 8-9Xu PCB (qmk#20048) Document Autocorrect callback functions (qmk#20115) Move Ferris Sweep to data-driven (qmk#20111) [keyboard] Prevent LED flicker when connecting AnnePro 2 (qmk#19709) Allow for CI builds to run for 23 hours, instead of 6. (part deux) (qmk#20095) Allow for CI builds to run for 23 hours, instead of 6. (qmk#20094) Add Chimera65 Hotswap keyboard (qmk#20038) [Keyboard] Add k83 (qmk#19896) Ketch LGUI/LALT key transposed on Minivan layout (qmk#20025) [Keyboard] Change pierce vendor ID (qmk#20088) ...
2 parents b48a614 + 7654c2a commit 5923f28

File tree

207 files changed

+9557
-418
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

207 files changed

+9557
-418
lines changed

.github/workflows/ci_builds.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ on:
1111

1212
jobs:
1313
ci_builds:
14+
name: "CI Build"
1415
runs-on: self-hosted
16+
timeout-minutes: 1380
1517

1618
if: github.repository == 'qmk/qmk_firmware'
1719

1820
strategy:
1921
matrix:
20-
keymap:
21-
- default
22-
- via
22+
keymap: [default, via]
23+
keyboard_folder: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z]
2324

2425
container: qmkfm/qmk_cli
2526

@@ -34,5 +35,15 @@ jobs:
3435
- name: Install dependencies
3536
run: pip3 install -r requirements.txt
3637

37-
- name: Run `qmk mass-compile` (keymap ${{ matrix.keymap }})
38-
run: qmk mass-compile -j $(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null) -km ${{ matrix.keymap }}
38+
- name: Run `qmk mass-compile` (keyboards ${{ matrix.keyboard_folder }}*, keymap ${{ matrix.keymap }})
39+
run: qmk mass-compile -j $(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null) -km ${{ matrix.keymap }} -f 'keyboard_folder=${{ matrix.keyboard_folder }}*'
40+
41+
- name: 'Upload binaries'
42+
uses: actions/upload-artifact@v3
43+
with:
44+
name: binaries-${{ matrix.keyboard_folder }}-${{ matrix.keymap }}
45+
if-no-files-found: ignore
46+
path: |
47+
*.bin
48+
*.hex
49+
*.uf2

data/constants/keycodes/keycodes_0.0.1_basic.hjson

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,15 +253,15 @@
253253
"0x002F": {
254254
"group": "basic",
255255
"key": "KC_LEFT_BRACKET",
256-
"label": "]",
256+
"label": "[",
257257
"aliases": [
258258
"KC_LBRC"
259259
]
260260
},
261261
"0x0030": {
262262
"group": "basic",
263263
"key": "KC_RIGHT_BRACKET",
264-
"label": "[",
264+
"label": "]",
265265
"aliases": [
266266
"KC_RBRC"
267267
]
@@ -1512,4 +1512,4 @@
15121512
]
15131513
}
15141514
}
1515-
}
1515+
}

docs/custom_quantum_functions.md

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,70 @@ This function gets called at the end of all QMK processing, before starting the
202202

203203
Similar to `matrix_scan_*`, these are called as often as the MCU can handle. To keep your board responsive, it's suggested to do as little as possible during these function calls, potentially throtting their behaviour if you do indeed require implementing something special.
204204

205+
### Example `void housekeeping_task_user(void)` implementation
206+
207+
This example will show you how to use `void housekeeping_task_user(void)` to turn off [RGB Light](feature_rgblight.md). For RGB Matrix, the [builtin](https://docs.qmk.fm/#/feature_rgb_matrix?id=additional-configh-options) `RGB_MATRIX_TIMEOUT` should be used.
208+
209+
First, add the following lines to your keymap's `config.h`:
210+
211+
```c
212+
#define RGBLIGHT_SLEEP // enable rgblight_suspend() and rgblight_wakeup() in keymap.c
213+
#define RGBLIGHT_TIMEOUT 900000 // ms to wait until rgblight time out, 900K ms is 15min.
214+
```
215+
216+
Next, add the following code to your `keymap.c`:
217+
218+
```c
219+
static uint32_t key_timer; // timer for last keyboard activity, use 32bit value and function to make longer idle time possible
220+
static void refresh_rgb(void); // refreshes the activity timer and RGB, invoke whenever any activity happens
221+
static void check_rgb_timeout(void); // checks if enough time has passed for RGB to timeout
222+
bool is_rgb_timeout = false; // store if RGB has timed out or not in a boolean
223+
224+
void refresh_rgb(void) {
225+
key_timer = timer_read32(); // store time of last refresh
226+
if (is_rgb_timeout)
227+
{
228+
is_rgb_timeout = false;
229+
rgblight_wakeup();
230+
}
231+
}
232+
void check_rgb_timeout(void) {
233+
if (!is_rgb_timeout && timer_elapsed32(key_timer) > RGBLIGHT_TIMEOUT) // check if RGB has already timeout and if enough time has passed
234+
{
235+
rgblight_suspend();
236+
is_rgb_timeout = true;
237+
}
238+
}
239+
/* Then, call the above functions from QMK's built in post processing functions like so */
240+
/* Runs at the end of each scan loop, check if RGB timeout has occured or not */
241+
void housekeeping_task_user(void) {
242+
#ifdef RGBLIGHT_TIMEOUT
243+
check_rgb_timeout();
244+
#endif
245+
}
246+
/* Runs after each key press, check if activity occurred */
247+
void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
248+
#ifdef RGBLIGHT_TIMEOUT
249+
if (record->event.pressed)
250+
refresh_rgb();
251+
#endif
252+
}
253+
/* Runs after each encoder tick, check if activity occurred */
254+
void post_encoder_update_user(uint8_t index, bool clockwise) {
255+
#ifdef RGBLIGHT_TIMEOUT
256+
refresh_rgb();
257+
#endif
258+
}
259+
```
260+
205261
# Keyboard Idling/Wake Code
206262

207263
If the board supports it, it can be "idled", by stopping a number of functions. A good example of this is RGB lights or backlights. This can save on power consumption, or may be better behavior for your keyboard.
208264

209265
This is controlled by two functions: `suspend_power_down_*` and `suspend_wakeup_init_*`, which are called when the system board is idled and when it wakes up, respectively.
210266

211267

212-
### Example suspend_power_down_user() and suspend_wakeup_init_user() Implementation
268+
### Example `suspend_power_down_user()` and `suspend_wakeup_init_user()` Implementation
213269

214270

215271
```c

docs/feature_advanced_keycodes.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
160160
return true;
161161
};
162162
```
163+
Alternatively, this can be done with [Key Overrides](feature_key_overrides?id=simple-example).
163164

164165
# Advanced topics :id=advanced-topics
165166

@@ -180,3 +181,7 @@ This page used to encompass a large set of features. We have moved many sections
180181
## Tap-Hold Configuration Options :id=tap-hold-configuration-options
181182

182183
* [Tap-Hold Configuration Options](tap_hold.md)
184+
185+
## Key Overrides :id=key-overrides
186+
187+
* [Key Overrides](feature_key_overrides.md)

docs/feature_autocorrect.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,18 @@ bool apply_autocorrect(uint8_t backspaces, const char *str) {
236236
}
237237
```
238238

239+
### Autocorrect Status
240+
241+
Additional user callback functions to manipulate Autocorrect:
242+
243+
| Function | Description |
244+
|----------------------------|----------------------------------------------|
245+
| `autocorrect_enable()` | Turns Autocorrect on. |
246+
| `autocorrect_disable()` | Turns Autocorrect off. |
247+
| `autocorrect_toggle()` | Toggles Autocorrect. |
248+
| `autocorrect_is_enabled()` | Returns true if Autocorrect is currently on. |
249+
250+
239251
## Appendix: Trie binary data format :id=appendix
240252

241253
This section details how the trie is serialized to byte data in autocorrect_data. You don’t need to care about this to use this autocorrection implementation. But it is documented for the record in case anyone is interested in modifying the implementation, or just curious how it works.

docs/feature_key_overrides.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Key Overrides
1+
# Key Overrides :id=key-overrides
22

33
Key overrides allow you to override modifier-key combinations to send a different modifier-key combination or perform completely custom actions. Don't want `shift` + `1` to type `!` on your computer? Use a key override to make your keyboard type something different when you press `shift` + `1`. The general behavior is like this: If `modifiers w` + `key x` are pressed, replace these keys with `modifiers y` + `key z` in the keyboard report.
44

@@ -10,13 +10,13 @@ You can use key overrides in a similar way to momentary layer/fn keys to activat
1010
- Create custom shortcuts or change existing ones: E.g. Send `ctrl`+`shift`+`z` when `ctrl`+`y` is pressed.
1111
- Run custom code when `ctrl` + `alt` + `esc` is pressed.
1212

13-
## Setup
13+
## Setup :id=setup
1414

1515
To enable this feature, you need to add `KEY_OVERRIDE_ENABLE = yes` to your `rules.mk`.
1616

1717
Then, in your `keymap.c` file, you'll need to define the array `key_overrides`, which defines all key overrides to be used. Each override is a value of type `key_override_t`. The array `key_overrides` is `NULL`-terminated and contains pointers to `key_override_t` values (`const key_override_t **`).
1818

19-
## Creating Key Overrides
19+
## Creating Key Overrides :id=creating-key-overrides
2020

2121
The `key_override_t` struct has many options that allow you to precisely tune your overrides. The full reference is shown below. Instead of manually creating a `key_override_t` value, it is recommended to use these dedicated initializers:
2222

@@ -34,7 +34,7 @@ Additionally takes a bitmask `options` that specifies additional options. See `k
3434

3535
For more customization possibilities, you may directly create a `key_override_t`, which allows you to customize even more behavior. Read further below for details and examples.
3636

37-
## Simple Example
37+
## Simple Example :id=simple-example
3838

3939
This shows how the mentioned example of sending `delete` when `shift` + `backspace` are pressed is realized:
4040

@@ -48,9 +48,9 @@ const key_override_t **key_overrides = (const key_override_t *[]){
4848
};
4949
```
5050

51-
## Intermediate Difficulty Examples
51+
## Intermediate Difficulty Examples :id=intermediate-difficulty-examples
5252

53-
### Media Controls & Screen Brightness
53+
### Media Controls & Screen Brightness :id=media-controls-amp-screen-brightness
5454

5555
In this example a single key is configured to control media, volume and screen brightness by using key overrides.
5656

@@ -102,7 +102,7 @@ const key_override_t **key_overrides = (const key_override_t *[]){
102102
};
103103
```
104104
105-
### Flexible macOS-friendly Grave Escape
105+
### Flexible macOS-friendly Grave Escape :id=flexible-macos-friendly-grave-escape
106106
The [Grave Escape feature](feature_grave_esc.md) is limited in its configurability and has [bugs when used on macOS](feature_grave_esc.md#caveats). Key overrides can be used to achieve a similar functionality as Grave Escape, but with more customization and without bugs on macOS.
107107
108108
```c
@@ -121,8 +121,8 @@ const key_override_t **key_overrides = (const key_override_t *[]){
121121

122122
In addition to not encountering unexpected bugs on macOS, you can also change the behavior as you wish. Instead setting `GUI` + `ESC` = `` ` `` you may change it to an arbitrary other modifier, for example `Ctrl` + `ESC` = `` ` ``.
123123

124-
## Advanced Examples
125-
### Modifiers as Layer Keys
124+
## Advanced Examples :id=advanced-examples
125+
### Modifiers as Layer Keys :id=modifiers-as-layer-keys
126126

127127
Do you really need a dedicated key to toggle your fn layer? With key overrides, perhaps not. This example shows how you can configure to use `rGUI` + `rAlt` (right GUI and right alt) to access a momentary layer like an fn layer. With this you completely eliminate the need to use a dedicated layer key. Of course the choice of modifier keys can be changed as needed, `rGUI` + `rAlt` is just an example here.
128128

@@ -150,15 +150,15 @@ const key_override_t fn_override = {.trigger_mods = MOD_BIT(KC_RGUI) |
150150
.enabled = NULL};
151151
```
152152
153-
## Keycodes
153+
## Keycodes :id=keycodes
154154
155155
|Keycode |Aliases |Description |
156156
|------------------------|---------|----------------------|
157157
|`QK_KEY_OVERRIDE_TOGGLE`|`KO_TOGG`|Toggle key overrides |
158158
|`QK_KEY_OVERRIDE_ON` |`KO_ON` |Turn on key overrides |
159159
|`QK_KEY_OVERRIDE_OFF` |`KO_OFF` |Turn off key overrides|
160160
161-
## Reference for `key_override_t`
161+
## Reference for `key_override_t` :id=reference-for-key_override_t
162162
163163
Advanced users may need more customization than what is offered by the simple `ko_make` initializers. For this, directly create a `key_override_t` value and set all members. Below is a reference for all members of `key_override_t`.
164164
@@ -175,7 +175,7 @@ Advanced users may need more customization than what is offered by the simple `k
175175
| `void *context` | A context that will be passed to the custom action function. |
176176
| `bool *enabled` | If this points to false this override will not be used. Set to NULL to always have this override enabled. |
177177
178-
### Reference for `ko_option_t`
178+
## Reference for `ko_option_t` :id=reference-for-ko_option_t
179179
180180
Bitfield with various options controlling the behavior of a key override.
181181
@@ -189,11 +189,11 @@ Bitfield with various options controlling the behavior of a key override.
189189
| `ko_option_no_reregister_trigger` | If set, the trigger key will never be registered again after the override is deactivated. |
190190
| `ko_options_default` | The default options used by the `ko_make_xxx` functions |
191191
192-
## For Advanced Users: Inner Workings
192+
## For Advanced Users: Inner Workings :id=for-advanced-users-inner-workings
193193
194194
This section explains how a key override works in detail, explaining where each member of `key_override_t` comes into play. Understanding this is essential to be able to take full advantage of all the options offered by key overrides.
195195
196-
#### Activation
196+
#### Activation :id=activation
197197
198198
When the necessary keys are pressed (`trigger_mods` + `trigger`), the override is 'activated' and the replacement key is registered in the keyboard report (`replacement`), while the `trigger` key is removed from the keyboard report. The trigger modifiers may also be removed from the keyboard report upon activation of an override (`suppressed_mods`). The override will not activate if any of the `negative_modifiers` are pressed.
199199
@@ -207,11 +207,11 @@ Use the `option` member to customize which of these events are allowed to activa
207207
208208
In any case, a key override can only activate if the `trigger` key is the _last_ non-modifier key that was pressed down. This emulates the behavior of how standard OSes (macOS, Windows, Linux) handle normal key input (to understand: Hold down `a`, then also hold down `b`, then hold down `shift`; `B` will be typed but not `A`).
209209
210-
#### Deactivation
210+
#### Deactivation :id=deactivation
211211
212212
An override is 'deactivated' when one of the trigger keys (`trigger_mods`, `trigger`) is lifted, another non-modifier key is pressed down, or one of the `negative_modifiers` is pressed down. When an override deactivates, the `replacement` key is removed from the keyboard report, while the `suppressed_mods` that are still held down are re-added to the keyboard report. By default, the `trigger` key is re-added to the keyboard report if it is still held down and no other non-modifier key has been pressed since. This again emulates the behavior of how standard OSes handle normal key input (To understand: hold down `a`, then also hold down `b`, then also `shift`, then release `b`; `A` will not be typed even though you are holding the `a` and `shift` keys). Use the `option` field `ko_option_no_reregister_trigger` to prevent re-registering the trigger key in all cases.
213213
214-
#### Key Repeat Delay
214+
#### Key Repeat Delay :id=key-repeat-delay
215215
216216
A third way in which standard OS-handling of modifier-key input is emulated in key overrides is with a ['key repeat delay'](https://www.dummies.com/computers/pcs/set-your-keyboards-repeat-delay-and-repeat-rate/). To explain what this is, let's look at how normal keyboard input is handled by mainstream OSes again: If you hold down `a`, followed by `shift`, you will see the letter `a` is first typed, then for a short moment nothing is typed and then repeating `A`s are typed. Take note that, although shift is pressed down just after `a` is pressed, it takes a moment until `A` is typed. This is caused by the aforementioned key repeat delay, and it is a feature that prevents unwanted repeated characters from being typed.
217217
@@ -222,6 +222,6 @@ This applies equally to releasing a modifier: When you hold `shift`, then press
222222
The duration of the key repeat delay is controlled with the `KEY_OVERRIDE_REPEAT_DELAY` macro. Define this value in your `config.h` file to change it. It is 500ms by default.
223223
224224
225-
## Difference to Combos
225+
## Difference to Combos :id=difference-to-combos
226226
227227
Note that key overrides are very different from [combos](https://docs.qmk.fm/#/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 interacton 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.

docs/newbs_getting_started.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,17 @@ QMK maintains a Homebrew tap and formula which will automatically install the CL
5656

5757
You will need to install Homebrew. Follow the instructions on https://brew.sh.
5858

59+
!> **NOTE:** If you are using Apple Silicon, such as the M1, you will need to install a rosetta compatible version of Homebrew. This version does not override the base Homebrew. This can be done by running `arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"`. See here: [Rosetta-compatible Homebrew](https://stackoverflow.com/questions/64882584/how-to-run-the-homebrew-installer-under-rosetta-2-on-m1-macbook)
60+
5961
#### Installation
6062

6163
Install the QMK CLI by running:
6264

6365
brew install qmk/qmk/qmk
66+
67+
Install the QMK CLI on an Apple Silicon Mac by running:
68+
69+
arch -x86_64 brew install qmk/qmk/qmk
6470

6571
### ** Linux/WSL **
6672

keyboards/0xcb/splaytoraid/32u4/rules.mk

Whitespace-only changes.

keyboards/0xcb/splaytoraid/config.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright 2023 Conor Burns (@Conor-Burns)
2+
/* SPDX-License-Identifier: GPL-2.0-or-later */
3+
4+
#pragma once
5+
6+
#define RGB_DI_PIN D0
7+
8+
#define RGB_MATRIX_LED_COUNT 18
9+
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
10+
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_BREATHING
11+
#define RGB_MATRIX_DEFAULT_HUE 152
12+
#define RGB_MATRIX_DEFAULT_SAT 232
13+
#define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
14+
#define RGB_MATRIX_DEFAULT_SPD 50
15+
16+
#define ENABLE_RGB_MATRIX_BREATHING
17+
#define ENABLE_RGB_MATRIX_SOLID_COLOR
18+
#define ENABLE_RGB_MATRIX_BAND_SAT
19+
#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
20+
#define ENABLE_RGB_MATRIX_CYCLE_ALL
21+
#define ENABLE_RGB_MATRIX_RAINDROPS
22+
#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT

0 commit comments

Comments
 (0)