Skip to content

Commit

Permalink
Merge branch 'master' of github.com:qmk/qmk_firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
kylemccreery committed May 4, 2023
2 parents f7deaca + a4b36f0 commit a94bff7
Show file tree
Hide file tree
Showing 892 changed files with 49,794 additions and 6,854 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
fetch-depth: 0

- name: Bump version and push tag
uses: anothrNick/github-tag-action@1.61.0
uses: anothrNick/github-tag-action@1.62.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BUMP: 'patch'
45 changes: 35 additions & 10 deletions .github/workflows/ci_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,27 @@ permissions:

on:
push:
branches:
- master
- develop
branches: [master, develop]
workflow_dispatch:
inputs:
branch:
type: choice
description: 'Branch to build'
options: [master, develop]

concurrency: ci_build-${{ github.event.inputs.branch || github.ref_name }}

jobs:
ci_builds:
if: github.repository == 'qmk/qmk_firmware'
name: "CI Build"
runs-on: self-hosted
timeout-minutes: 1380

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

strategy:
fail-fast: false
matrix:
keymap: [default, via]
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]

container: qmkfm/qmk_cli

Expand All @@ -31,19 +36,39 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: recursive
ref: ${{ github.event.inputs.branch || github.ref }}

- name: Install dependencies
run: pip3 install -r requirements.txt

- name: Run `qmk mass-compile` (keyboards ${{ matrix.keyboard_folder }}*, 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 }} -f 'keyboard_folder=${{ matrix.keyboard_folder }}*'
- name: Run `qmk mass-compile` (keymap ${{ matrix.keymap }})
run: |
export NCPUS=$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null)
qmk mass-compile -t -j $NCPUS -km ${{ matrix.keymap }} -e DUMP_CI_METADATA=yes || touch .failed
# Generate the step summary markdown
./util/ci/generate_failure_markdown.sh > $GITHUB_STEP_SUMMARY || true
# Truncate to a maximum of 1MB to deal with GitHub workflow limit
truncate --size='<960K' $GITHUB_STEP_SUMMARY || true
# Exit with failure if the compilation stage failed
[ ! -f .failed ] || exit 1
- name: 'Upload binaries'
- name: 'Upload artifacts'
uses: actions/upload-artifact@v3
if: always()
with:
name: binaries-${{ matrix.keyboard_folder }}-${{ matrix.keymap }}
name: artifacts-${{ github.event.inputs.branch || github.ref_name }}-${{ matrix.keymap }}
if-no-files-found: ignore
path: |
*.bin
*.hex
*.uf2
.build/failed.*
- name: 'CI Discord Notification'
if: always()
working-directory: util/ci/
env:
DISCORD_WEBHOOK: ${{ secrets.CI_DISCORD_WEBHOOK }}
run: |
python3 -m pip install -r requirements.txt
python3 ./discord-results.py --branch ${{ github.event.inputs.branch || github.ref_name }} --keymap ${{ matrix.keymap }} --url ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
2 changes: 1 addition & 1 deletion .github/workflows/format_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
git config user.email '[email protected]'
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
if: ${{ github.repository == 'qmk/qmk_firmware'}}
with:
token: ${{ secrets.QMK_BOT_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/regen_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
git config user.email '[email protected]'
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
if: ${{ github.repository == 'qmk/qmk_firmware'}}
with:
token: ${{ secrets.QMK_BOT_TOKEN }}
Expand Down
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ quantum/version.h
*.qmk
*.uf2

# DD config at wrong location
/keyboards/**/keymaps/*/info.json

# Old-style QMK Makefiles
/keyboards/**/Makefile

Expand Down
5 changes: 5 additions & 0 deletions builddefs/build_keyboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ KEYBOARD_FILESAFE := $(subst /,_,$(KEYBOARD))
TARGET ?= $(KEYBOARD_FILESAFE)_$(KEYMAP)
KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD_FILESAFE)

ifeq ($(strip $(DUMP_CI_METADATA)),yes)
$(info CI Metadata: KEYBOARD=$(KEYBOARD))
$(info CI Metadata: KEYMAP=$(KEYMAP))
endif

# Force expansion
TARGET := $(TARGET)

Expand Down
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
8 changes: 4 additions & 4 deletions docs/feature_advanced_keycodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ For more information on bitwise operators in C, click [here](https://en.wikipedi

In practice, this means that you can check whether a given modifier is active with `get_mods() & MOD_BIT(KC_<modifier>)` (see the [list of modifier keycodes](keycodes_basic.md#modifiers)) or with `get_mods() & MOD_MASK_<modifier>` if the difference between left and right hand modifiers is not important and you want to match both. Same thing can be done for one-shot modifiers if you replace `get_mods()` with `get_oneshot_mods()`.

To check that *only* a specific set of mods is active at a time, AND the modifier state and your desired mod mask as explained above and compare the result to the mod mask itself: `get_mods() & <mod mask> == <mod mask>`.
To check that *only* a specific set of mods is active at a time, use a simple equality operator: `get_mods() == <mod mask>`.

For example, let's say you want to trigger a piece of custom code if one-shot left control and one-shot left shift are on but every other one-shot mods are off. To do so, you can compose the desired mod mask by combining the mod bits for left control and shift with `(MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT))` and then plug it in: `get_oneshot_mods() & (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT)) == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT))`. Using `MOD_MASK_CS` instead for the mod bitmask would have forced you to press four modifier keys (both versions of control and shift) to fulfill the condition.
For example, let's say you want to trigger a piece of custom code if one-shot left control and one-shot left shift are on but every other one-shot mods are off. To do so, you can compose the desired mod mask by combining the mod bits for left control and shift with `(MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT))` and then plug it in: `get_oneshot_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT))`. Using `MOD_MASK_CS` instead for the mod bitmask would have forced you to press four modifier keys (both versions of control and shift) to fulfill the condition.

The full list of mod masks is as follows:

Expand Down Expand Up @@ -91,7 +91,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {

case KC_ESC:
// Detect the activation of only Left Alt
if ((get_mods() & MOD_BIT(KC_LALT)) == MOD_BIT(KC_LALT)) {
if (get_mods() == MOD_BIT(KC_LALT)) {
if (record->event.pressed) {
// No need to register KC_LALT because it's already active.
// The Alt modifier will apply on this KC_TAB.
Expand Down Expand Up @@ -184,4 +184,4 @@ This page used to encompass a large set of features. We have moved many sections

## Key Overrides :id=key-overrides

* [Key Overrides](feature_key_overrides.md)
* [Key Overrides](feature_key_overrides.md)
2 changes: 1 addition & 1 deletion docs/feature_combo.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END};
const uint16_t PROGMEM qw_combo[] = {KC_Q, KC_W, COMBO_END};
const uint16_t PROGMEM sd_combo[] = {KC_S, KC_D, COMBO_END};

combo_t key_combos[COMBO_COUNT] = {
combo_t key_combos[] = {
[AB_ESC] = COMBO(ab_combo, KC_ESC),
[JK_TAB] = COMBO(jk_combo, KC_TAB),
[QW_SFT] = COMBO(qw_combo, KC_LSFT),
Expand Down
1 change: 0 additions & 1 deletion docs/feature_converters.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Currently the following converters are available:
| `promicro` | `bit_c_pro` |
| `promicro` | `stemcell` |
| `promicro` | `bonsai_c4` |
| `promicro` | `elite_pi` |
| `promicro` | `rp2040_ce` |
| `promicro` | `elite_pi` |
| `promicro` | `helios` |
Expand Down
Loading

0 comments on commit a94bff7

Please sign in to comment.