Skip to content

Commit

Permalink
Merge branch 'master' into sjb/all-keyboard
Browse files Browse the repository at this point in the history
* master: (54 commits)
  [chore] keyboards/tzarc: Alignment with clang-format. (qmk#20265)
  Check for multiple matrix positions assigned to same key (qmk#20039)
  [Documentation] Pointing device minor rewrite (qmk#19641)
  Bump actions/stale from 7 to 8 (qmk#20246)
  Add CannonKeys Bakeneko65 Hotswap ISO PCB to QMK (qmk#20131)
  [Keyboard]Viktus Minne - Topre variant (qmk#20044)
  [keyboard] Correcting info.JSON for Viktus Minne (qmk#20244)
  EC ProX PCB (qmk#20047)
  EC 23U PCB (qmk#20049)
  EC 60 PCB (qmk#20050)
  [jacky_studio/piggy60] warn about incompatible PCB rev (qmk#20232)
  [Keyboard] Fix tata80 wkl layout (qmk#20195)
  [Keyboard] Ymd09 config updates (qmk#20124)
  [Keyboard] Add Geistmaschine Geist (qmk#20117)
  [Keyboard] Add via support for jotanck keyboard (qmk#20146)
  fixup: correct filename (qmk#20212)
  Adding Bad Wings Support (qmk#20153)
  [Keyboard] update creek70 change rgb num (qmk#20196)
  [Keyboard] Add tiny board 16 rgb keyboard (qmk#20158)
  [Keyboard] Olly Orion: Disable SWD and JTAG (qmk#20169)
  ...
  • Loading branch information
SjB committed Mar 28, 2023
2 parents ccca0c0 + 3ee17cd commit 87ebcb9
Show file tree
Hide file tree
Showing 339 changed files with 14,539 additions and 902 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/ci_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ jobs:

strategy:
matrix:
keymap:
- default
- via
keymap: [default, via]

container: qmkfm/qmk_cli

Expand All @@ -38,3 +36,13 @@ jobs:

- name: Run `qmk mass-compile` (keymap ${{ matrix.keymap }})
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 }}

- name: 'Upload binaries'
uses: actions/upload-artifact@v3
with:
name: binaries-${{ matrix.keymap }}
if-no-files-found: ignore
path: |
*.bin
*.hex
*.uf2
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v7
- uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

Expand Down
6 changes: 3 additions & 3 deletions data/constants/keycodes/keycodes_0.0.1_basic.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -253,15 +253,15 @@
"0x002F": {
"group": "basic",
"key": "KC_LEFT_BRACKET",
"label": "]",
"label": "[",
"aliases": [
"KC_LBRC"
]
},
"0x0030": {
"group": "basic",
"key": "KC_RIGHT_BRACKET",
"label": "[",
"label": "]",
"aliases": [
"KC_RBRC"
]
Expand Down Expand Up @@ -1512,4 +1512,4 @@
]
}
}
}
}
43 changes: 36 additions & 7 deletions docs/cli_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ qmk compile [-c] <configuratorExport.json>
qmk compile [-c] [-e <var>=<value>] [-j <num_jobs>] -kb <keyboard_name> -km <keymap_name>
```

**Usage in Keyboard Directory**:
**Usage in Keyboard Directory**:

Must be in keyboard directory with a default keymap, or in keymap directory for keyboard, or supply one with `--keymap <keymap_name>`
```
Expand All @@ -44,7 +44,7 @@ $ qmk compile
or with optional keymap argument

```
$ cd ~/qmk_firmware/keyboards/clueboard/66/rev4
$ cd ~/qmk_firmware/keyboards/clueboard/66/rev4
$ qmk compile -km 66_iso
Ψ Compiling keymap with make clueboard/66/rev4:66_iso
...
Expand All @@ -58,7 +58,7 @@ $ qmk compile
...
```

**Usage in Layout Directory**:
**Usage in Layout Directory**:

Must be under `qmk_firmware/layouts/`, and in a keymap folder.
```
Expand Down Expand Up @@ -149,6 +149,34 @@ To exit out into the parent shell, simply type `exit`.
qmk cd
```

## `qmk find`

This command allows for searching through keyboard/keymap targets, filtering by specific criteria. `info.json` and `rules.mk` files contribute to the search data, as well as keymap configurations, and the results can be filtered using "dotty" syntax matching the overall `info.json` file format.

For example, one could search for all keyboards using STM32F411:

```
qmk find -f 'processor=STM32F411'
```

...and one can further constrain the list to keyboards using STM32F411 as well as rgb_matrix support:

```
qmk find -f 'processor=STM32F411' -f 'features.rgb_matrix=true'
```

**Usage**:

```
qmk find [-h] [-km KEYMAP] [-f FILTER]
options:
-km KEYMAP, --keymap KEYMAP
The keymap name to build. Default is 'default'.
-f FILTER, --filter FILTER
Filter the list of keyboards based on the supplied value in rules.mk. Matches info.json structure, and accepts the formats 'features.rgblight=true' or 'exists(matrix_pins.direct)'. May be passed multiple times, all filters need to match. Value may include wildcards such as '*' and '?'.
```

## `qmk console`

This command lets you connect to keyboard consoles to get debugging messages. It only works if your keyboard firmware has been compiled with `CONSOLE_ENABLE=yes`.
Expand Down Expand Up @@ -269,7 +297,8 @@ qmk json2c [-o OUTPUT] filename

## `qmk c2json`

Creates a keymap.json from a keymap.c.
Creates a keymap.json from a keymap.c.

**Note:** Parsing C source files is not easy, therefore this subcommand may not work with your keymap. In some cases not using the C pre-processor helps.

**Usage**:
Expand Down Expand Up @@ -442,7 +471,7 @@ $ qmk import-kbfirmware ~/Downloads/gh62.json

## `qmk format-text`

This command formats text files to have proper line endings.
This command formats text files to have proper line endings.

Every text file in the repository needs to have Unix (LF) line ending.
If you are working on **Windows**, you must ensure that line endings are corrected in order to get your PRs merged.
Expand All @@ -453,7 +482,7 @@ qmk format-text

## `qmk format-c`

This command formats C code using clang-format.
This command formats C code using clang-format.

Run it with no arguments to format all core code that has been changed. Default checks `origin/master` with `git diff`, branch can be changed using `-b <branch_name>`

Expand Down Expand Up @@ -556,7 +585,7 @@ qmk kle2json [-f] <filename>
**Examples**:

```
$ qmk kle2json kle.txt
$ qmk kle2json kle.txt
☒ File info.json already exists, use -f or --force to overwrite.
```

Expand Down
58 changes: 57 additions & 1 deletion docs/custom_quantum_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,70 @@ This function gets called at the end of all QMK processing, before starting the

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.

### 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.md). For RGB Matrix, the [builtin](https://docs.qmk.fm/#/feature_rgb_matrix?id=additional-configh-options) `RGB_MATRIX_TIMEOUT` should be used.

First, add the following lines to your keymap's `config.h`:

```c
#define RGBLIGHT_SLEEP // enable rgblight_suspend() and rgblight_wakeup() in keymap.c
#define RGBLIGHT_TIMEOUT 900000 // ms to wait until rgblight time out, 900K ms is 15min.
```
Next, add the following code to your `keymap.c`:
```c
static uint32_t key_timer; // timer for last keyboard activity, use 32bit value and function to make longer idle time possible
static void refresh_rgb(void); // refreshes the activity timer and RGB, invoke whenever any activity happens
static void check_rgb_timeout(void); // checks if enough time has passed for RGB to timeout
bool is_rgb_timeout = false; // store if RGB has timed out or not in a boolean
void refresh_rgb(void) {
key_timer = timer_read32(); // store time of last refresh
if (is_rgb_timeout)
{
is_rgb_timeout = false;
rgblight_wakeup();
}
}
void check_rgb_timeout(void) {
if (!is_rgb_timeout && timer_elapsed32(key_timer) > RGBLIGHT_TIMEOUT) // check if RGB has already timeout and if enough time has passed
{
rgblight_suspend();
is_rgb_timeout = true;
}
}
/* Then, call the above functions from QMK's built in post processing functions like so */
/* Runs at the end of each scan loop, check if RGB timeout has occured or not */
void housekeeping_task_user(void) {
#ifdef RGBLIGHT_TIMEOUT
check_rgb_timeout();
#endif
}
/* Runs after each key press, check if activity occurred */
void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef RGBLIGHT_TIMEOUT
if (record->event.pressed)
refresh_rgb();
#endif
}
/* Runs after each encoder tick, check if activity occurred */
void post_encoder_update_user(uint8_t index, bool clockwise) {
#ifdef RGBLIGHT_TIMEOUT
refresh_rgb();
#endif
}
```

# Keyboard Idling/Wake Code

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.

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.


### Example suspend_power_down_user() and suspend_wakeup_init_user() Implementation
### Example `suspend_power_down_user()` and `suspend_wakeup_init_user()` Implementation


```c
Expand Down
5 changes: 5 additions & 0 deletions docs/feature_advanced_keycodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +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?id=simple-example).

# Advanced topics :id=advanced-topics

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

* [Tap-Hold Configuration Options](tap_hold.md)

## Key Overrides :id=key-overrides

* [Key Overrides](feature_key_overrides.md)
12 changes: 12 additions & 0 deletions docs/feature_autocorrect.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,18 @@ bool apply_autocorrect(uint8_t backspaces, const char *str) {
}
```

### Autocorrect Status

Additional user callback functions to manipulate Autocorrect:

| Function | Description |
|----------------------------|----------------------------------------------|
| `autocorrect_enable()` | Turns Autocorrect on. |
| `autocorrect_disable()` | Turns Autocorrect off. |
| `autocorrect_toggle()` | Toggles Autocorrect. |
| `autocorrect_is_enabled()` | Returns true if Autocorrect is currently on. |


## Appendix: Trie binary data format :id=appendix

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.
Expand Down
Loading

0 comments on commit 87ebcb9

Please sign in to comment.