Skip to content

Commit

Permalink
Merge branch 'Keychron:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
KeychronMacro authored Oct 7, 2023
2 parents 34fd079 + 69c1790 commit b6dea83
Show file tree
Hide file tree
Showing 709 changed files with 43,325 additions and 3,677 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Get changed files
id: file_changes
uses: tj-actions/changed-files@v38
uses: tj-actions/changed-files@v39

- name: Run qmk formatters
shell: 'bash {0}'
Expand Down
27 changes: 3 additions & 24 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

- name: Get changed files
id: file_changes
uses: tj-actions/changed-files@v38
uses: tj-actions/changed-files@v39

- name: Print info
run: |
Expand Down Expand Up @@ -74,31 +74,10 @@ jobs:
fi
exit $exit_code
- name: Verify at most one added keyboard
- name: Verify keyboard aliases
if: always()
shell: 'bash {0}'
run: |
git reset --hard
git clean -xfd
# Get the keyboard list and count for the target branch
git checkout -f ${{ github.base_ref }}
git pull --ff-only
QMK_KEYBOARDS_BASE=$(qmk list-keyboards)
QMK_KEYBOARDS_BASE_COUNT=$(qmk list-keyboards | wc -l)
# Get the keyboard list and count for the PR
git checkout -f ${{ github.head_ref }}
git merge --no-commit --squash ${{ github.base_ref }}
QMK_KEYBOARDS_PR=$(qmk list-keyboards)
QMK_KEYBOARDS_PR_COUNT=$(qmk list-keyboards | wc -l)
echo "::group::Keyboards changes in this PR"
diff -d -U 0 <(echo "$QMK_KEYBOARDS_BASE") <(echo "$QMK_KEYBOARDS_PR") | grep -vE '^(---|\+\+\+|@@)' | sed -e 's@^-@Removed: @g' -e 's@^+@ Added: @g'
echo "::endgroup::"
if [[ $QMK_KEYBOARDS_PR_COUNT -gt $(($QMK_KEYBOARDS_BASE_COUNT + 1)) ]]; then
echo "More than one keyboard added in this PR -- see the PR Checklist."
echo "::error::More than one keyboard added in this PR -- see the PR Checklist."
exit 1
fi
qmk ci-validate-aliases
64 changes: 37 additions & 27 deletions data/mappings/keyboard_aliases.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
// "target": "<keyboard_folder>"
// }
//

/* This list of aliases is for testing purposes -- ensures "linked list" recursive traversal works correctly. */
"_test_a": { "target": "_test_b" },
"_test_b": { "target": "_test_c" },
"_test_c": { "target": "planck/rev6" },

/* The main list of aliases for moved keyboards within QMK. */
"2_milk": {
"target": "spaceman/2_milk"
},
Expand Down Expand Up @@ -35,7 +42,7 @@
"target": "amjkeyboard/amjpad"
},
"angel64": {
"target": "angel64/alpha"
"target": "kakunpc/angel64/alpha"
},
"ashpil/modelm_usbc": {
"target": "ibm/model_m/ashpil_usbc"
Expand All @@ -47,10 +54,10 @@
"target": "viktus/at101_bh"
},
"atom47/rev2": {
"target": "maartenwut/atom47/rev2"
"target": "evyd13/atom47/rev2"
},
"atom47/rev3": {
"target": "maartenwut/atom47/rev3"
"target": "evyd13/atom47/rev3"
},
"bakeneko60": {
"target": "kkatano/bakeneko60"
Expand All @@ -65,7 +72,7 @@
"target": "bear_face/v1"
},
"bm16a": {
"target": "kprepublic/bm16a"
"target": "kprepublic/bm16a/v1"
},
"bm16s": {
"target": "kprepublic/bm16s"
Expand All @@ -77,16 +84,16 @@
"target": "kprepublic/bm43a"
},
"bm60poker": {
"target": "kprepublic/bm60poker"
"target": "kprepublic/bm60hsrgb_poker/rev1"
},
"bm60rgb": {
"target": "kprepublic/bm60rgb"
"target": "kprepublic/bm60hsrgb/rev1"
},
"bm60rgb_iso": {
"target": "kprepublic/bm60rgb_iso"
"target": "kprepublic/bm60hsrgb_iso/rev1"
},
"bm68rgb": {
"target": "kprepublic/bm68rgb"
"target": "kprepublic/bm68hsrgb/rev1"
},
"bpiphany/pegasushoof": {
"target": "bpiphany/pegasushoof/2013"
Expand Down Expand Up @@ -140,7 +147,10 @@
"target": "jagdpietr/drakon"
},
"durgod/k320": {
"target": "durgod/k3x0/k320"
"target": "durgod/k320/base"
},
"durgod/k3x0/k320": {
"target": "durgod/k320/base"
},
"durgod/hades": {
"target": "durgod/dgk6x/hades_ansi"
Expand Down Expand Up @@ -269,7 +279,7 @@
"target": "idb/idb_60"
},
"idobo": {
"target": "idobao/id75"
"target": "idobao/id75/v1"
},
"jacky_studio/piggy60": {
"target": "jacky_studio/piggy60/rev1"
Expand Down Expand Up @@ -401,7 +411,7 @@
"target": "mechlovin/adelais/rgb_led/rev1"
},
"mechlovin/adelais/standard_led": {
"target": "mechlovin/adelais/standard_led/rev2"
"target": "mechlovin/adelais/standard_led/arm/rev2"
},
"mechlovin/delphine": {
"target": "mechlovin/delphine/mono_led"
Expand Down Expand Up @@ -455,10 +465,10 @@
"target": "pabile/p20/ver1"
},
"pancake/feather": {
"target": "spaceman/pancake/feather"
"target": "spaceman/pancake/rev1/feather"
},
"pancake/promicro": {
"target": "spaceman/pancake/promicro"
"target": "spaceman/pancake/rev1/promicro"
},
"peiorisboards/ixora": {
"target": "coarse/ixora"
Expand All @@ -467,7 +477,7 @@
"target": "dm9records/plaid"
},
"plain60": {
"target": "maartenwut/plain60"
"target": "evyd13/plain60"
},
"ploopyco/trackball": {
"target": "ploopyco/trackball/rev1_005"
Expand Down Expand Up @@ -503,10 +513,10 @@
"target": "wilba_tech/rama_works_u80_a"
},
"ramonimbao/herringbone": {
"target": "ramonimbao/herringbone/v1"
"target": "rmi_kb/herringbone/v1"
},
"ramonimbao/mona": {
"target": "ramonimbao/mona/v1"
"target": "rmi_kb/mona/v1"
},
"rgbkb/pan": {
"target": "rgbkb/pan/rev1/32a"
Expand Down Expand Up @@ -542,10 +552,10 @@
"target": "tkw/stoutgat/v1"
},
"suihankey": {
"target": "suihankey/split/alpha"
"target": "kakunpc/suihankey/split/alpha"
},
"ta65": {
"target": "maartenwut/ta65"
"target": "evyd13/ta65"
},
"tartan": {
"target": "dm9records/tartan"
Expand All @@ -563,13 +573,13 @@
"target": "matthewdias/txuu"
},
"underscore33": {
"target": "underscore33/rev1"
"target": "tominabox1/underscore33/rev1"
},
"vinta": {
"target": "coarse/vinta"
},
"wasdat": {
"target": "maartenwut/wasdat"
"target": "evyd13/wasdat"
},
"westfoxtrot/cypher": {
"target": "westfoxtrot/cypher/rev1"
Expand All @@ -581,10 +591,10 @@
"target": "xiudi/xd002"
},
"xd004": {
"target": "xiudi/xd004"
"target": "xiudi/xd004/v1"
},
"xd60": {
"target": "xiudi/xd60"
"target": "xiudi/xd60/rev2"
},
"xd68": {
"target": "xiudi/xd68"
Expand Down Expand Up @@ -831,7 +841,7 @@
"target": "kagizaraya/halberd"
},
"handwired/hillside/0_1": {
"target": "handwired/hillside/48"
"target": "hillside/48/0_1"
},
"hecomi/alpha": {
"target": "takashiski/hecomi/alpha"
Expand All @@ -843,10 +853,10 @@
"target": "bpiphany/hid_liber"
},
"id67/default_rgb": {
"target": "idobao/id67/default_rgb"
"target": "idobao/id67"
},
"id67/rgb": {
"target": "idobao/id67/rgb"
"target": "idobao/id67"
},
"id80": {
"target": "idobao/id80/v2/ansi"
Expand Down Expand Up @@ -1236,7 +1246,7 @@
"target": "marksard/treadstone48/rev2"
},
"tronguylabs/m122_3270": {
"target": "ibm/model_m_122/m122_3270"
"target": "ibm/model_m_122/m122_3270/teensy"
},
"ua62": {
"target": "nacly/ua62"
Expand Down Expand Up @@ -1290,7 +1300,7 @@
"target": "ydkb/yd68"
},
"ymd75": {
"target": "ymdk/ymd75"
"target": "ymdk/ymd75/rev1"
},
"ymd96": {
"target": "ymdk/ymd96"
Expand Down
4 changes: 4 additions & 0 deletions data/schemas/definitions.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
"minLength": 1,
"maxLength": 250
},
"snake_case": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"layout_macro": {
"oneOf": [
{
Expand Down
9 changes: 8 additions & 1 deletion data/schemas/keyboard.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,11 @@
"enabled": {"type": "boolean"}
}
},
"features": {"$ref": "qmk.definitions.v1#/boolean_array"},
"features": {
"$ref": "qmk.definitions.v1#/boolean_array",
"propertyNames": { "$ref": "qmk.definitions.v1#/snake_case" }

},
"indicators": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -370,6 +374,7 @@
"properties": {
"animations": {
"type": "object",
"propertyNames": { "$ref": "qmk.definitions.v1#/snake_case" }
"additionalProperties": {
"type": "boolean"
}
Expand Down Expand Up @@ -419,6 +424,7 @@
"properties": {
"animations": {
"type": "object",
"propertyNames": { "$ref": "qmk.definitions.v1#/snake_case" }
"additionalProperties": {
"type": "boolean"
}
Expand Down Expand Up @@ -471,6 +477,7 @@
"properties": {
"animations": {
"type": "object",
"propertyNames": { "$ref": "qmk.definitions.v1#/snake_case" }
"additionalProperties": {
"type": "boolean"
}
Expand Down
2 changes: 1 addition & 1 deletion docs/_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
* [Caps Word](feature_caps_word.md)
* [Combos](feature_combo.md)
* [Debounce API](feature_debounce_type.md)
* [Digitizer](feature_digitizer.md)
* [EEPROM](feature_eeprom.md)
* [Key Lock](feature_key_lock.md)
* [Key Overrides](feature_key_overrides.md)
Expand Down Expand Up @@ -115,7 +116,6 @@
* [Bootmagic Lite](feature_bootmagic.md)
* [Converters](feature_converters.md)
* [Custom Matrix](custom_matrix.md)
* [Digitizer](feature_digitizer.md)
* [DIP Switch](feature_dip_switch.md)
* [Encoders](feature_encoders.md)
* [Haptic Feedback](feature_haptic_feedback.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The QMK CLI makes building and working with QMK keyboards easier. We have provid

### Requirements :id=requirements

QMK requires Python 3.6 or greater. We try to keep the number of requirements small but you will also need to install the packages listed in [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt). These are installed automatically when you install the QMK CLI.
QMK requires Python 3.7 or greater. We try to keep the number of requirements small but you will also need to install the packages listed in [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt). These are installed automatically when you install the QMK CLI.

### Install Using Homebrew (macOS, some Linux) :id=install-using-homebrew

Expand All @@ -20,7 +20,7 @@ qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build

### Install Using pip :id=install-using-easy_install-or-pip

If your system is not listed above you can install QMK manually. First ensure that you have Python 3.6 (or later) installed and have installed pip. Then install QMK with this command:
If your system is not listed above you can install QMK manually. First ensure that you have Python 3.7 (or later) installed and have installed pip. Then install QMK with this command:

```
python3 -m pip install qmk
Expand Down
6 changes: 3 additions & 3 deletions docs/cli_development.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def hello(cli):

First we import the `cli` object from `milc`. This is how we interact with the user and control the script's behavior. We use `@cli.argument()` to define a command line flag, `--name`. This also creates a configuration variable named `hello.name` (and the corresponding `user.name`) which the user can set so they don't have to specify the argument. The `cli.subcommand()` decorator designates this function as a subcommand. The name of the subcommand will be taken from the name of the function.

Once inside our function we find a typical "Hello, World!" program. We use `cli.log` to access the underlying [Logger Object](https://docs.python.org/3.6/library/logging.html#logger-objects), whose behavior is user controllable. We also access the value for name supplied by the user as `cli.config.hello.name`. The value for `cli.config.hello.name` will be determined by looking at the `--name` argument supplied by the user, if not provided it will use the value in the `qmk.ini` config file, and if neither of those is provided it will fall back to the default supplied in the `cli.argument()` decorator.
Once inside our function we find a typical "Hello, World!" program. We use `cli.log` to access the underlying [Logger Object](https://docs.python.org/3.7/library/logging.html#logger-objects), whose behavior is user controllable. We also access the value for name supplied by the user as `cli.config.hello.name`. The value for `cli.config.hello.name` will be determined by looking at the `--name` argument supplied by the user, if not provided it will use the value in the `qmk.ini` config file, and if neither of those is provided it will fall back to the default supplied in the `cli.argument()` decorator.

# User Interaction

Expand All @@ -56,13 +56,13 @@ There are two main methods for outputting text in a subcommand- `cli.log` and `c

You can use special tokens to colorize your text, to make it easier to understand the output of your program. See [Colorizing Text](#colorizing-text) below.

Both of these methods support built-in string formatting using python's [printf style string format operations](https://docs.python.org/3.6/library/stdtypes.html#old-string-formatting). You can use tokens such as `%s` and `%d` within your text strings then pass the values as arguments. See our Hello, World program above for an example.
Both of these methods support built-in string formatting using python's [printf style string format operations](https://docs.python.org/3.7/library/stdtypes.html#old-string-formatting). You can use tokens such as `%s` and `%d` within your text strings then pass the values as arguments. See our Hello, World program above for an example.

You should never use the format operator (`%`) directly, always pass values as arguments.

### Logging (`cli.log`)

The `cli.log` object gives you access to a [Logger Object](https://docs.python.org/3.6/library/logging.html#logger-objects). We have configured our log output to show the user a nice emoji for each log level (or the log level name if their terminal does not support unicode.) This way the user can tell at a glance which messages are most important when something goes wrong.
The `cli.log` object gives you access to a [Logger Object](https://docs.python.org/3.7/library/logging.html#logger-objects). We have configured our log output to show the user a nice emoji for each log level (or the log level name if their terminal does not support unicode.) This way the user can tell at a glance which messages are most important when something goes wrong.

The default log level is `INFO`. If the user runs `qmk -v <subcommand>` the default log level will be set to `DEBUG`.

Expand Down
2 changes: 1 addition & 1 deletion docs/coding_conventions_python.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ At the time of this writing our tests are not very comprehensive. Looking at the

## Integration Tests

Integration tests can be found in `lib/python/qmk/tests/test_cli_commands.py`. This is where CLI commands are actually run and their overall behavior is verified. We use [`subprocess`](https://docs.python.org/3.6/library/subprocess.html#module-subprocess) to launch each CLI command and a combination of checking output and returncode to determine if the right thing happened.
Integration tests can be found in `lib/python/qmk/tests/test_cli_commands.py`. This is where CLI commands are actually run and their overall behavior is verified. We use [`subprocess`](https://docs.python.org/3.7/library/subprocess.html#module-subprocess) to launch each CLI command and a combination of checking output and returncode to determine if the right thing happened.

## Unit Tests

Expand Down
3 changes: 2 additions & 1 deletion docs/feature_oled_driver.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Tested combinations:
|SSD1306 |128x32 |AVR |Primary support |
|SSD1306 |128x64 |AVR |Verified working |
|SSD1306 |128x32 |Arm | |
|SSD1306 |128x64 |Arm |Verified working |
|SH1106 |128x64 |AVR |No scrolling |
|SH1107 |64x128 |AVR |No scrolling |
|SH1107 |64x128 |Arm |No scrolling |
Expand Down Expand Up @@ -398,7 +399,7 @@ void oled_scroll_set_area(uint8_t start_line, uint8_t end_line);
// Sets scroll speed, 0-7, fastest to slowest. Default is three.
// Does not take effect until scrolling is either started or restarted
// the ssd1306 supports 8 speeds with the delay
// listed below betwen each frame of the scrolling effect
// listed below between each frame of the scrolling effect
// 0=2, 1=3, 2=4, 3=5, 4=25, 5=64, 6=128, 7=256
void oled_scroll_set_speed(uint8_t speed);

Expand Down
Loading

0 comments on commit b6dea83

Please sign in to comment.