From 62e3b573b920b17f3f00781dde53d965dbe8a613 Mon Sep 17 00:00:00 2001 From: Evan Callicoat Date: Sun, 26 Dec 2021 13:21:58 -0600 Subject: [PATCH 01/20] Typos --- docs/docs/behaviors/hold-tap.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs/behaviors/hold-tap.md b/docs/docs/behaviors/hold-tap.md index 972df0be..8e35f759 100644 --- a/docs/docs/behaviors/hold-tap.md +++ b/docs/docs/behaviors/hold-tap.md @@ -62,12 +62,12 @@ For example, if you press `&mt LEFT_SHIFT A` and then release it without pressin #### Positional hold-tap and `hold-trigger-key-positions` -- Including `hold-trigger-key-postions` in your hold-tap definition turns on the positional hold-tap feature. +- Including `hold-trigger-key-positions` in your hold-tap definition turns on the positional hold-tap feature. - With positional hold-tap enabled, if you press any key **NOT** listed in `hold-trigger-key-positions` before `tapping-term-ms` expires, it will produce a tap. - In all other situations, positional hold-tap will not modify the behavior of your hold-tap. - Positional hold-tap is useful with home-row modifiers. If you have a home-row modifier key in the left hand for example, by including only keys positions from the right hand in `hold-trigger-key-positions`, you will only get hold behaviors during cross-hand key combinations. -- Note that `hold-trigger-key-postions` is an array of key position indexes. Key positions are numbered according to your keymap, starting with 0. So if the first key in your keymap is Q, this key is in position 0. The next key (probably W) will be in position 1, et cetera. -- See the following example, which uses a hold-tap behavior definition, configured with the `hold-preferrred` flavor, and with positional hold-tap enabled: +- Note that `hold-trigger-key-positions` is an array of key position indexes. Key positions are numbered according to your keymap, starting with 0. So if the first key in your keymap is Q, this key is in position 0. The next key (probably W) will be in position 1, et cetera. +- See the following example, which uses a hold-tap behavior definition, configured with the `hold-preferred` flavor, and with positional hold-tap enabled: ``` #include From a562578fd20c6601667206a62910a60ff3a60ee8 Mon Sep 17 00:00:00 2001 From: Albert Y <76888457+filterpaper@users.noreply.github.com> Date: Tue, 28 Dec 2021 18:04:18 +0800 Subject: [PATCH 02/20] docs: change quick_tap_ms to quick-tap-ms (#1071) --- docs/docs/behaviors/hold-tap.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/docs/behaviors/hold-tap.md b/docs/docs/behaviors/hold-tap.md index 8e35f759..edb9d593 100644 --- a/docs/docs/behaviors/hold-tap.md +++ b/docs/docs/behaviors/hold-tap.md @@ -42,9 +42,9 @@ For basic usage, please see [mod-tap](mod-tap.md) and [layer-tap](layers.md) pag Defines how long a key must be pressed to trigger Hold behavior. -#### `quick_tap_ms` +#### `quick-tap-ms` -If you press a tapped hold-tap again within `quick_tap_ms` milliseconds, it will always trigger the tap behavior. This is useful for things like a backspace, where a quick tap+hold holds backspace pressed. Set this to a negative value to disable. The default is -1 (disabled). +If you press a tapped hold-tap again within `quick-tap-ms` milliseconds, it will always trigger the tap behavior. This is useful for things like a backspace, where a quick tap+hold holds backspace pressed. Set this to a negative value to disable. The default is -1 (disabled). In QMK, unlike ZMK, this functionality is enabled by default, and you turn it off using `TAPPING_FORCE_HOLD`. @@ -150,7 +150,7 @@ The following are suggested hold-tap configurations that work well with home row label = "HOMEROW_MODS"; #binding-cells = <2>; tapping-term-ms = <150>; - quick_tap_ms = <0>; + quick-tap-ms = <0>; flavor = "tap-preferred"; bindings = <&kp>, <&kp>; }; @@ -181,7 +181,7 @@ The following are suggested hold-tap configurations that work well with home row label = "HOMEROW_MODS"; #binding-cells = <2>; tapping-term-ms = <200>; // <---[[moderate duration]] - quick_tap_ms = <0>; + quick-tap-ms = <0>; flavor = "balanced"; bindings = <&kp>, <&kp>; }; From 3114ce00b9676625e60c49c05eb1a91db51deb7b Mon Sep 17 00:00:00 2001 From: Ivan Smirnov Date: Tue, 28 Dec 2021 03:52:16 -0700 Subject: [PATCH 03/20] docs: reiterate building from `zmk/app/` (#1031) Co-authored-by: Cem Aksoylar --- docs/docs/development/build-flash.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/docs/development/build-flash.md b/docs/docs/development/build-flash.md index cb00b1a9..ac75b835 100644 --- a/docs/docs/development/build-flash.md +++ b/docs/docs/development/build-flash.md @@ -99,6 +99,10 @@ For instance, building kyria firmware from a user `myUser`'s `zmk-config` folder west build -b nice_nano -- -DSHIELD=kyria_left -DZMK_CONFIG="C:/Users/myUser/Documents/Github/zmk-config/config" ``` +:::caution +The above command must still be invoked from the `zmk/app` directory as noted above, rather than the config directory. Otherwise, you will encounter errors such as `ERROR: source directory "." does not contain a CMakeLists.txt; is this really what you want to build?`. Alternatively you can add the `-s /path/to/zmk/app` flag to your `west` command. +::: + In order to make your `zmk-config` folder available when building within the VSCode Remote Container, you need to create a docker volume named `zmk-config` by binding it to the full path of your config directory. If you have run the VSCode Remote Container before, it is likely that docker has created this volume automatically -- we need to delete the default volume before binding it to the correct path. Follow the following steps: From 8c321063a05c0caa43f697a2724f221e8a147a7b Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Fri, 22 Oct 2021 18:31:08 -0700 Subject: [PATCH 04/20] feat(docs): Add note for USB power in outputs page --- docs/docs/behaviors/outputs.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/docs/behaviors/outputs.md b/docs/docs/behaviors/outputs.md index ae812497..198d9acc 100644 --- a/docs/docs/behaviors/outputs.md +++ b/docs/docs/behaviors/outputs.md @@ -12,6 +12,12 @@ keyboard to USB for power but outputting to a different device over bluetooth. By default, output is sent to USB when both USB and BLE are connected. Once you select a different output, it will be remembered until you change it again. +:::note Powering the keyboard via USB +ZMK is not always able to detect if the other end of a USB connection accepts keyboard input or not. +So if you are using USB only to power your keyboard (for example with a charger or a portable power bank), you will want +to select the BLE output through below behavior to be able to send keystrokes to the selected bluetooth profile. +::: + ## Output Command Defines Output command defines are provided through the [`dt-bindings/zmk/outputs.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/outputs.h) From ef0d088cb8c5cfafe48db24973f42637c2f75380 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Fri, 22 Oct 2021 18:40:36 -0700 Subject: [PATCH 05/20] feat(docs): Link to outputs page in troubleshooting re: BT output --- docs/docs/troubleshooting.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/docs/troubleshooting.md b/docs/docs/troubleshooting.md index d3f3eeae..3055c131 100644 --- a/docs/docs/troubleshooting.md +++ b/docs/docs/troubleshooting.md @@ -3,9 +3,7 @@ title: Troubleshooting sidebar_title: Troubleshooting --- -### Summary - -The following page provides suggestions for common errors that may occur during firmware compilation. If the information provided is insufficient to resolve the issue, feel free to seek out help from the [ZMK Discord](https://zmk.dev/community/discord/invite). +The following page provides suggestions for common errors that may occur during firmware compilation or other issues with keyboard usage. If the information provided is insufficient to resolve the issue, feel free to seek out help from the [ZMK Discord](https://zmk.dev/community/discord/invite). ### File Transfer Error @@ -76,3 +74,7 @@ CONFIG_BT_CTLR_TX_PWR_PLUS_8=y ``` For the `nRF52840`, the value `PLUS_8` can be set to any multiple of four between `MINUS_20` and `PLUS_8`. The default value for this config is `0`, but if you are having connection issues it is recommended to set it to `PLUS_8` because the power consumption difference is negligible. For more information on changing the transmit power of your BLE device, please refer to [the Zephyr docs.](https://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_BT_CTLR_TX_PWR_PLUS_8.html) + +### Other notes and warnings + +- If you want to test bluetooth output on your keyboard and are powering it through the USB connection rather than a battery, you will be able to pair with a host device but may not see keystrokes sent. In this case you need to use the [output selection behavior](../docs/behaviors/outputs.md) to prefer sending keystrokes over bluetooth rather than USB. This might be necessary even if you are not powering from a device capable of receiving USB inputs, such as a USB charger. From 93e76835e4ea1b5b058066990abea720084ca470 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Wed, 22 Dec 2021 22:24:47 -0800 Subject: [PATCH 06/20] fix(setup): Use right flags for curl when wget doesn't exist. --- docs/src/templates/setup.sh.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/templates/setup.sh.mustache b/docs/src/templates/setup.sh.mustache index 54405fae..cec164a2 100644 --- a/docs/src/templates/setup.sh.mustache +++ b/docs/src/templates/setup.sh.mustache @@ -54,7 +54,7 @@ if [[ $curl_exists == "true" && $wget_exists == "true" ]]; then download_command="curl -fsOL " fi elif [[ $curl_exists == "true" ]]; then - download_command="curl -O " + download_command="curl -fsOL " elif [[ $wget_exists == "true" ]]; then download_command="wget " else From 387926761580fbfde98b2d43cfd9fce7b6fae11e Mon Sep 17 00:00:00 2001 From: KingCoinless <33333456+KingCoinless@users.noreply.github.com> Date: Wed, 29 Dec 2021 02:40:31 -0800 Subject: [PATCH 07/20] docs(codes): Windows Support: Display Adjustment Commands Co-authored-by: Cem Aksoylar --- docs/src/data/hid.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/src/data/hid.js b/docs/src/data/hid.js index 31e11d23..4432db74 100644 --- a/docs/src/data/hid.js +++ b/docs/src/data/hid.js @@ -5043,7 +5043,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=134", os: { - windows: null, + windows: false, linux: false, android: true, macos: null, @@ -5148,7 +5148,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=134", os: { - windows: null, + windows: false, linux: true, android: null, macos: null, @@ -5169,7 +5169,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=134", os: { - windows: null, + windows: true, linux: true, android: null, macos: true, @@ -5190,7 +5190,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=134", os: { - windows: null, + windows: true, linux: true, android: null, macos: true, @@ -5211,7 +5211,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=134", os: { - windows: null, + windows: false, linux: true, android: null, macos: null, @@ -5232,7 +5232,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=134", os: { - windows: null, + windows: false, linux: true, android: null, macos: null, @@ -5253,7 +5253,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=134", os: { - windows: null, + windows: false, linux: true, android: null, macos: null, @@ -5274,7 +5274,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=134", os: { - windows: null, + windows: false, linux: true, android: null, macos: null, From ee0f24412b7ac0e17444245892dfa9966b9f8d26 Mon Sep 17 00:00:00 2001 From: Kiessling Date: Fri, 8 Jan 2021 14:17:07 -0800 Subject: [PATCH 08/20] docs(codes): Windows Support: Symbols, Operations, and Punctuation --- docs/src/data/hid.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/src/data/hid.js b/docs/src/data/hid.js index 4432db74..cd53b105 100644 --- a/docs/src/data/hid.js +++ b/docs/src/data/hid.js @@ -1368,7 +1368,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=84", os: { - windows: null, + windows: true, linux: true, android: true, macos: true, @@ -1393,7 +1393,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=84", os: { - windows: null, + windows: true, linux: true, android: true, macos: true, @@ -2711,7 +2711,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=86", os: { - windows: null, + windows: false, linux: true, android: true, macos: null, @@ -3341,7 +3341,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=86", os: { - windows: null, + windows: false, linux: true, android: true, macos: null, @@ -3362,7 +3362,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=86", os: { - windows: null, + windows: false, linux: false, android: false, macos: null, @@ -4013,7 +4013,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=87", os: { - windows: null, + windows: false, linux: true, android: true, macos: false, @@ -4034,7 +4034,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=87", os: { - windows: null, + windows: false, linux: true, android: true, macos: false, From 4a547555bfcf28a20db502efd6963da6674f8806 Mon Sep 17 00:00:00 2001 From: Kiessling Date: Fri, 8 Jan 2021 14:02:54 -0800 Subject: [PATCH 09/20] docs(codes): Windows Support: Workflow Commands and Locks --- docs/src/data/hid.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/src/data/hid.js b/docs/src/data/hid.js index cd53b105..c45fa10e 100644 --- a/docs/src/data/hid.js +++ b/docs/src/data/hid.js @@ -3089,7 +3089,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=86", os: { - windows: null, + windows: false, linux: true, android: false, macos: null, @@ -3110,7 +3110,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=86", os: { - windows: null, + windows: false, linux: true, android: false, macos: null, @@ -3131,7 +3131,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=86", os: { - windows: null, + windows: false, linux: true, android: false, macos: null, @@ -3152,7 +3152,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=86", os: { - windows: null, + windows: false, linux: true, android: false, macos: null, @@ -3173,7 +3173,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=86", os: { - windows: null, + windows: false, linux: true, android: false, macos: null, @@ -3278,7 +3278,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=86", os: { - windows: null, + windows: false, linux: false, android: false, macos: null, @@ -3320,7 +3320,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=86", os: { - windows: null, + windows: true, linux: false, android: false, macos: null, @@ -3866,7 +3866,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=87", os: { - windows: null, + windows: false, linux: false, android: false, macos: null, @@ -7143,7 +7143,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=150", os: { - windows: null, + windows: false, linux: true, android: false, macos: null, @@ -7164,7 +7164,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=150", os: { - windows: null, + windows: false, linux: true, android: false, macos: null, @@ -7185,7 +7185,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=150", os: { - windows: null, + windows: false, linux: true, android: false, macos: null, @@ -7206,7 +7206,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=150", os: { - windows: null, + windows: false, linux: true, android: false, macos: null, @@ -7626,7 +7626,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=152", os: { - windows: null, + windows: false, linux: true, android: false, macos: null, From 1e4f0147ad7e269e339cd63174fe1d9d84320dfd Mon Sep 17 00:00:00 2001 From: Kiessling Date: Fri, 8 Jan 2021 13:20:10 -0800 Subject: [PATCH 10/20] docs(codes): Windows Support: Audio Controls --- docs/src/data/hid.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/src/data/hid.js b/docs/src/data/hid.js index c45fa10e..1d4c5d05 100644 --- a/docs/src/data/hid.js +++ b/docs/src/data/hid.js @@ -3215,7 +3215,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=86", os: { - windows: null, + windows: false, linux: true, android: true, macos: true, @@ -3236,7 +3236,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=86", os: { - windows: null, + windows: false, linux: true, android: true, macos: false, @@ -3257,7 +3257,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=86", os: { - windows: null, + windows: false, linux: true, android: true, macos: false, @@ -4375,7 +4375,7 @@ export default [ documentation: "https://source.android.com/devices/input/keyboard-devices#hid-keyboard-and-keypad-page-0x07", os: { - windows: null, + windows: false, linux: true, android: true, macos: false, @@ -4397,7 +4397,7 @@ export default [ documentation: "https://source.android.com/devices/input/keyboard-devices#hid-keyboard-and-keypad-page-0x07", os: { - windows: null, + windows: false, linux: true, android: true, macos: false, @@ -4419,7 +4419,7 @@ export default [ documentation: "https://source.android.com/devices/input/keyboard-devices#hid-keyboard-and-keypad-page-0x07", os: { - windows: null, + windows: false, linux: true, android: true, macos: false, @@ -6093,7 +6093,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=139", os: { - windows: null, + windows: true, linux: true, android: true, macos: null, @@ -6114,7 +6114,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=139", os: { - windows: null, + windows: false, linux: true, android: false, macos: null, @@ -6135,7 +6135,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=139", os: { - windows: null, + windows: true, linux: true, android: true, macos: true, @@ -6156,7 +6156,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=139", os: { - windows: null, + windows: true, linux: true, android: true, macos: true, From 7b2edbad43cb8da271f3f348b3171b81ba408429 Mon Sep 17 00:00:00 2001 From: Kiessling Date: Fri, 8 Jan 2021 12:52:27 -0800 Subject: [PATCH 11/20] docs(codes): Windows Support: Language/International Inputs --- docs/src/data/hid.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/src/data/hid.js b/docs/src/data/hid.js index 1d4c5d05..774cf6c7 100644 --- a/docs/src/data/hid.js +++ b/docs/src/data/hid.js @@ -3383,7 +3383,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=86", os: { - windows: null, + windows: false, linux: true, android: false, macos: null, @@ -3404,7 +3404,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=86", os: { - windows: null, + windows: false, linux: true, android: false, macos: null, @@ -3425,7 +3425,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=86", os: { - windows: null, + windows: false, linux: true, android: false, macos: null, @@ -3446,7 +3446,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=86", os: { - windows: null, + windows: false, linux: true, android: false, macos: null, @@ -3467,7 +3467,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=87", os: { - windows: null, + windows: false, linux: true, android: false, macos: null, @@ -3488,7 +3488,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=87", os: { - windows: null, + windows: false, linux: true, android: false, macos: null, @@ -3572,7 +3572,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=87", os: { - windows: null, + windows: true, linux: true, android: false, macos: null, @@ -3593,7 +3593,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=87", os: { - windows: null, + windows: true, linux: true, android: false, macos: null, @@ -3614,7 +3614,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=87", os: { - windows: null, + windows: false, linux: true, android: false, macos: null, @@ -3635,7 +3635,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=87", os: { - windows: null, + windows: false, linux: true, android: false, macos: null, @@ -3656,7 +3656,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=87", os: { - windows: null, + windows: false, linux: true, android: false, macos: null, From be343674de55bfa692cf943a06a11beb60be747f Mon Sep 17 00:00:00 2001 From: Evan Callicoat Date: Sun, 2 Jan 2022 04:34:21 -0600 Subject: [PATCH 12/20] docs: Fix typos and inconsistent spellings (#1079) --- docs/docs/development/build-flash.md | 2 +- docs/docs/development/hardware-metadata-files.md | 2 +- docs/docs/development/new-shield.md | 2 +- docs/docs/faq.md | 4 ++-- docs/docs/features/keymaps.md | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/docs/development/build-flash.md b/docs/docs/development/build-flash.md index ac75b835..95719d92 100644 --- a/docs/docs/development/build-flash.md +++ b/docs/docs/development/build-flash.md @@ -26,7 +26,7 @@ From here on, building and flashing ZMK should all be done from the `app/` subdi cd app ``` -To build for your particular keyboard, the behaviour varies slightly depending on if you are building for a keyboard with +To build for your particular keyboard, the behavior varies slightly depending on if you are building for a keyboard with an onboard MCU, or one that uses an MCU board addon. ### Keyboard (Shield) + MCU Board diff --git a/docs/docs/development/hardware-metadata-files.md b/docs/docs/development/hardware-metadata-files.md index ffe896e2..5d4902dc 100644 --- a/docs/docs/development/hardware-metadata-files.md +++ b/docs/docs/development/hardware-metadata-files.md @@ -100,7 +100,7 @@ Boards and shields should document the sets of hardware features found on them u The `siblings` array is used to identify multiple hardware items designed to be used together as one logical device. Right now, that primarily is used to identify the two halves of a split keyboard, but future enhancements will include more complicated and flexible combinations. -The array should contrain the complete harware IDs of the siblings that combine in the logical device, e.g. with the `corne.zmk.yml` file: +The array should contain the complete hardware IDs of the siblings that combine in the logical device, e.g. with the `corne.zmk.yml` file: ```yaml id: corne diff --git a/docs/docs/development/new-shield.md b/docs/docs/development/new-shield.md index d8b41698..6f65d869 100644 --- a/docs/docs/development/new-shield.md +++ b/docs/docs/development/new-shield.md @@ -360,7 +360,7 @@ The two `#include` lines at the top of the keymap are required in order to bring Further documentation on behaviors and bindings is forthcoming, but a summary of the current behaviors you can bind to key positions is as follows: - `kp` is the "key press" behavior, and takes a single binding argument of the key code from the 'keyboard/keypad" HID usage table. -- `mo` is the "momentary layer" behaviour, and takes a single binding argument of the numeric ID of the layer to momentarily enable when that key is held. +- `mo` is the "momentary layer" behavior, and takes a single binding argument of the numeric ID of the layer to momentarily enable when that key is held. - `trans` is the "transparent" behavior, useful to be place in higher layers above `mo` bindings to be sure the key release is handled by the lower layer. No binding arguments are required. - `mt` is the "mod-tap" behavior, and takes two binding arguments, the modifier to use if held, and the keycode to send if tapped. diff --git a/docs/docs/faq.md b/docs/docs/faq.md index d335d11e..6a16f6f8 100644 --- a/docs/docs/faq.md +++ b/docs/docs/faq.md @@ -12,7 +12,7 @@ As a best-in-class RTOS, Zephyr™ brings many [benefits](https://www.zephyrproj - Powerful hardware abstraction and configuration using [DeviceTree](https://docs.zephyrproject.org/latest/guides/dts/index.html) and [Kconfig](https://docs.zephyrproject.org/latest/guides/kconfig/index.html). - A BLE stack that periodically obtains [qualification](https://docs.zephyrproject.org/latest/guides/bluetooth/bluetooth-qual.html) listings, making it easier for final products to obtain qualification from the Bluetooth® SIG. - Multi-processor support, which is critical for power efficiency in upcoming MCUs. -- Permissive licencing with its Apache 2.0 open source [license](https://www.apache.org/licenses/LICENSE-2.0). +- Permissive licensing with its Apache 2.0 open source [license](https://www.apache.org/licenses/LICENSE-2.0). - A buzzing developer [community](https://github.com/zephyrproject-rtos/zephyr) including many leading [embedded technology](https://www.zephyrproject.org/project-members) companies. - Long term support (LTS) with security updates. @@ -23,7 +23,7 @@ That’s an excellent question! There are already great keyboard firmwares avail - Zephyr™ - See [Why Zephyr™?](#why-zephyr) - Licensing - - Just like other open source firmware, ZMK is all about the free and the sharing. However, some other projects use the GPL licence which prevents integration of libraries and drivers whose licenses are not GPL-compatible (such as some embedded BLE drivers). ZMK uses the permissive [MIT](https://github.com/zmkfirmware/zmk/blob/main/LICENSE) license which doesn’t have this limitation. + - Just like other open source firmware, ZMK is all about the free and the sharing. However, some other projects use the GPL license which prevents integration of libraries and drivers whose licenses are not GPL-compatible (such as some embedded BLE drivers). ZMK uses the permissive [MIT](https://github.com/zmkfirmware/zmk/blob/main/LICENSE) license which doesn’t have this limitation. - Wireless First - ZMK is designed for the future, and we believe the future is wireless. So power efficiency plays a critical role in every design decision, just like in Zephyr™. diff --git a/docs/docs/features/keymaps.md b/docs/docs/features/keymaps.md index be0aa203..59577d8f 100644 --- a/docs/docs/features/keymaps.md +++ b/docs/docs/features/keymaps.md @@ -128,7 +128,7 @@ that defines just one layer for this keymap: Each layer should have: -1. A `bindings` property this will be a list of behaviour bindings, one for each key position for the keyboard. +1. A `bindings` property this will be a list of behavior bindings, one for each key position for the keyboard. 1. (Optional) A `sensor-bindings` property that will be a list of behavior bindings for each sensor on the keyboard. (Currently, only encoders are supported as sensor hardware, but in the future devices like trackpoints would be supported the same way) For the full set of possible behaviors, start at the [Key Press](../behaviors/key-press.md) behavior. From e7a52e2cee151bd22290cdc6228b66092d3f6268 Mon Sep 17 00:00:00 2001 From: KingCoinless <33333456+KingCoinless@users.noreply.github.com> Date: Sun, 2 Jan 2022 02:44:55 -0800 Subject: [PATCH 13/20] docs(codes): Windows Support: Media Controls Co-authored-by: Cem Aksoylar --- docs/src/data/hid.js | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/src/data/hid.js b/docs/src/data/hid.js index 774cf6c7..572ccb95 100644 --- a/docs/src/data/hid.js +++ b/docs/src/data/hid.js @@ -2664,7 +2664,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=86", os: { - windows: null, + windows: true, linux: true, android: true, macos: true, @@ -4265,7 +4265,7 @@ export default [ documentation: "https://source.android.com/devices/input/keyboard-devices#hid-keyboard-and-keypad-page-0x07", os: { - windows: null, + windows: false, linux: true, android: true, macos: false, @@ -4287,7 +4287,7 @@ export default [ documentation: "https://source.android.com/devices/input/keyboard-devices#hid-keyboard-and-keypad-page-0x07", os: { - windows: null, + windows: false, linux: true, android: true, macos: false, @@ -4309,7 +4309,7 @@ export default [ documentation: "https://source.android.com/devices/input/keyboard-devices#hid-keyboard-and-keypad-page-0x07", os: { - windows: null, + windows: false, linux: true, android: true, macos: false, @@ -4331,7 +4331,7 @@ export default [ documentation: "https://source.android.com/devices/input/keyboard-devices#hid-keyboard-and-keypad-page-0x07", os: { - windows: null, + windows: false, linux: true, android: true, macos: false, @@ -4507,7 +4507,7 @@ export default [ documentation: "https://source.android.com/devices/input/keyboard-devices#hid-keyboard-and-keypad-page-0x07", os: { - windows: null, + windows: false, linux: true, android: true, macos: false, @@ -5001,7 +5001,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=134", os: { - windows: null, + windows: false, linux: true, android: true, macos: null, @@ -5022,7 +5022,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=134", os: { - windows: null, + windows: false, linux: true, android: null, macos: null, @@ -5778,7 +5778,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=137", os: { - windows: null, + windows: true, linux: true, android: true, macos: null, @@ -5799,7 +5799,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=137", os: { - windows: null, + windows: true, linux: true, android: true, macos: null, @@ -5820,7 +5820,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=137", os: { - windows: null, + windows: false, linux: true, android: true, macos: null, @@ -5841,7 +5841,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=137", os: { - windows: null, + windows: true, linux: true, android: true, macos: null, @@ -5862,7 +5862,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=137", os: { - windows: null, + windows: true, linux: true, android: true, macos: null, @@ -5883,7 +5883,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=137", os: { - windows: null, + windows: true, linux: true, android: true, macos: true, @@ -5904,7 +5904,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=137", os: { - windows: null, + windows: true, linux: true, android: true, macos: true, @@ -5925,7 +5925,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=137", os: { - windows: null, + windows: false, linux: true, android: true, macos: null, @@ -5967,7 +5967,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=137", os: { - windows: null, + windows: false, linux: true, android: false, macos: null, @@ -5988,7 +5988,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=137", os: { - windows: null, + windows: false, linux: true, android: false, macos: null, @@ -6009,7 +6009,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=137", os: { - windows: null, + windows: false, linux: true, android: null, macos: null, @@ -6051,7 +6051,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=137", os: { - windows: null, + windows: true, linux: true, android: true, macos: true, @@ -6177,7 +6177,7 @@ export default [ ], documentation: "https://usb.org/sites/default/files/hut1_2.pdf#page=141", os: { - windows: null, + windows: false, linux: true, android: null, macos: null, From e0620f1a2d726bee1859b8618ea4ed24b6b2145e Mon Sep 17 00:00:00 2001 From: Midge 't Hoen Date: Mon, 3 Jan 2022 14:14:38 +0100 Subject: [PATCH 14/20] Bump init delay to 50ms for nico-nano --- app/boards/arm/nice_nano/nice_nano_v2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/boards/arm/nice_nano/nice_nano_v2.dts b/app/boards/arm/nice_nano/nice_nano_v2.dts index b17f4787..8f72aad6 100644 --- a/app/boards/arm/nice_nano/nice_nano_v2.dts +++ b/app/boards/arm/nice_nano/nice_nano_v2.dts @@ -12,7 +12,7 @@ compatible = "zmk,ext-power-generic"; label = "EXT_POWER"; control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; - init-delay-ms = <10>; + init-delay-ms = <50>; }; vbatt { From f767abe13647d1bf6b05a1b67baf615f58fc046c Mon Sep 17 00:00:00 2001 From: okke Date: Sat, 11 Dec 2021 20:36:59 +0100 Subject: [PATCH 15/20] chore: make west scripts more pythonic and apply Black --- .vscode/settings.json | 3 +- app/scripts/west_commands/metadata.py | 49 +++++++++++++++------------ app/scripts/west_commands/test.py | 36 ++++++++++++-------- 3 files changed, 50 insertions(+), 38 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index eba95704..2730549a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,5 +2,6 @@ "files.associations": { "*.overlay": "dts", "*.keymap": "dts" - } + }, + "python.formatting.provider": "black" } \ No newline at end of file diff --git a/app/scripts/west_commands/metadata.py b/app/scripts/west_commands/metadata.py index a06024c5..244fb9bf 100644 --- a/app/scripts/west_commands/metadata.py +++ b/app/scripts/west_commands/metadata.py @@ -1,59 +1,64 @@ # Copyright (c) 2021 The ZMK Contributors # SPDX-License-Identifier: MIT -'''Metadata command for ZMK.''' +"""Metadata command for ZMK.""" from functools import cached_property import glob import json -from jsonschema import validate, ValidationError -import os +import jsonschema import sys import yaml -from textwrap import dedent # just for nicer code indentation from west.commands import WestCommand -from west import log # use this for user output +from west import log # use this for user output class Metadata(WestCommand): def __init__(self): super().__init__( - 'metadata', # gets stored as self.name - 'ZMK hardware metadata commands', # self.help - # self.description: - dedent('''Operate on the board/shield metadata.''')) + name="metadata", + help="ZMK hardware metadata commands", + description="Operate on the board/shield metadata.", + ) def do_add_parser(self, parser_adder): - parser = parser_adder.add_parser(self.name, - help=self.help, - description=self.description) + parser = parser_adder.add_parser( + self.name, help=self.help, description=self.description + ) - parser.add_argument('subcommand', default="check", - help='The subcommand to run. Defaults to "check".', nargs="?") - return parser # gets stored as self.parser + parser.add_argument( + "subcommand", + default="check", + help='The subcommand to run. Defaults to "check".', + nargs="?", + ) + return parser # gets stored as self.parser @cached_property def schema(self): - return json.load( - open("../schema/hardware-metadata.schema.json", 'r')) + return json.load(open("../schema/hardware-metadata.schema.json", "r")) def validate_file(self, file): print("Validating: " + file) - with open(file, 'r') as stream: + with open(file, "r") as stream: try: - validate(yaml.safe_load(stream), self.schema) + jsonschema.validate(yaml.safe_load(stream), self.schema) except yaml.YAMLError as exc: print("Failed loading metadata yaml: " + file) print(exc) return False - except ValidationError as vexc: + except jsonschema.ValidationError as vexc: print("Failed validation of: " + file) print(vexc) return False return True def do_run(self, args, unknown_args): - status = all([self.validate_file(f) for f in glob.glob( - "boards/**/*.zmk.yml", recursive=True)]) + status = all( + [ + self.validate_file(f) + for f in glob.glob("boards/**/*.zmk.yml", recursive=True) + ] + ) sys.exit(0 if status else 1) diff --git a/app/scripts/west_commands/test.py b/app/scripts/west_commands/test.py index ac64bb6f..53133491 100644 --- a/app/scripts/west_commands/test.py +++ b/app/scripts/west_commands/test.py @@ -1,35 +1,41 @@ # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -'''Test runner for ZMK.''' +"""Test runner for ZMK.""" import os import subprocess -from textwrap import dedent # just for nicer code indentation from west.commands import WestCommand -from west import log # use this for user output +from west import log # use this for user output class Test(WestCommand): def __init__(self): super().__init__( - 'test', # gets stored as self.name - 'run ZMK testsuite', # self.help - # self.description: - dedent('''Run the ZMK testsuite.''')) + name="test", + help="run ZMK testsuite", + description="Run the ZMK testsuite.", + ) def do_add_parser(self, parser_adder): - parser = parser_adder.add_parser(self.name, - help=self.help, - description=self.description) + parser = parser_adder.add_parser( + self.name, + help=self.help, + description=self.description, + ) - parser.add_argument('test_path', default="all", - help='The path to the test. Defaults to "all".', nargs="?") - return parser # gets stored as self.parser + parser.add_argument( + "test_path", + default="all", + help='The path to the test. Defaults to "all".', + nargs="?", + ) + return parser def do_run(self, args, unknown_args): # the run-test script assumes the app directory is the current dir. - os.chdir(f'{self.topdir}/app') + os.chdir(f"{self.topdir}/app") completed_process = subprocess.run( - [f'{self.topdir}/app/run-test.sh', args.test_path]) + [f"{self.topdir}/app/run-test.sh", args.test_path] + ) exit(completed_process.returncode) From d59797ba13f623b6654e81cd9ee65ffca272d2d9 Mon Sep 17 00:00:00 2001 From: okke Date: Sat, 11 Dec 2021 20:41:20 +0100 Subject: [PATCH 16/20] test: Change length of fail and pend messages This makes scanning the output from "west test" easier, as the different states get different output lengths. --- app/run-test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/run-test.sh b/app/run-test.sh index b39f2db2..cbc6fbbf 100755 --- a/app/run-test.sh +++ b/app/run-test.sh @@ -28,17 +28,17 @@ echo "Running $testcase:" west build -d build/$testcase -b native_posix -- -DZMK_CONFIG="$(pwd)/$testcase" > /dev/null 2>&1 if [ $? -gt 0 ]; then - echo "FAIL: $testcase did not build" >> ./build/tests/pass-fail.log + echo "FAILED: $testcase did not build" >> ./build/tests/pass-fail.log exit 1 else ./build/$testcase/zephyr/zmk.exe | sed -e "s/.*> //" | tee build/$testcase/keycode_events_full.log | sed -n -f $testcase/events.patterns > build/$testcase/keycode_events.log diff -au $testcase/keycode_events.snapshot build/$testcase/keycode_events.log if [ $? -gt 0 ]; then if [ -f $testcase/pending ]; then - echo "PEND: $testcase" >> ./build/tests/pass-fail.log + echo "PENDING: $testcase" >> ./build/tests/pass-fail.log exit 0 else - echo "FAIL: $testcase" >> ./build/tests/pass-fail.log + echo "FAILED: $testcase" >> ./build/tests/pass-fail.log exit 1 fi else From f692d64d0557f898ec08e26ec75320383d937337 Mon Sep 17 00:00:00 2001 From: okke Date: Sat, 11 Dec 2021 20:55:56 +0100 Subject: [PATCH 17/20] test: print test output immediately and decrease indenting --- app/run-test.sh | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/app/run-test.sh b/app/run-test.sh index cbc6fbbf..da4803d6 100755 --- a/app/run-test.sh +++ b/app/run-test.sh @@ -28,21 +28,20 @@ echo "Running $testcase:" west build -d build/$testcase -b native_posix -- -DZMK_CONFIG="$(pwd)/$testcase" > /dev/null 2>&1 if [ $? -gt 0 ]; then - echo "FAILED: $testcase did not build" >> ./build/tests/pass-fail.log + echo "FAILED: $testcase did not build" | tee -a ./build/tests/pass-fail.log exit 1 -else - ./build/$testcase/zephyr/zmk.exe | sed -e "s/.*> //" | tee build/$testcase/keycode_events_full.log | sed -n -f $testcase/events.patterns > build/$testcase/keycode_events.log - diff -au $testcase/keycode_events.snapshot build/$testcase/keycode_events.log - if [ $? -gt 0 ]; then - if [ -f $testcase/pending ]; then - echo "PENDING: $testcase" >> ./build/tests/pass-fail.log - exit 0 - else - echo "FAILED: $testcase" >> ./build/tests/pass-fail.log - exit 1 - fi - else - echo "PASS: $testcase" >> ./build/tests/pass-fail.log +fi + +./build/$testcase/zephyr/zmk.exe | sed -e "s/.*> //" | tee build/$testcase/keycode_events_full.log | sed -n -f $testcase/events.patterns > build/$testcase/keycode_events.log +diff -au $testcase/keycode_events.snapshot build/$testcase/keycode_events.log +if [ $? -gt 0 ]; then + if [ -f $testcase/pending ]; then + echo "PENDING: $testcase" | tee -a ./build/tests/pass-fail.log exit 0 fi + echo "FAILED: $testcase" | tee -a ./build/tests/pass-fail.log + exit 1 fi + +echo "PASS: $testcase" | tee -a ./build/tests/pass-fail.log +exit 0 From d29236141e1b425669e049bb4e5ae5b65903cd62 Mon Sep 17 00:00:00 2001 From: zhiayang <500236+zhiayang@users.noreply.github.com> Date: Wed, 12 Jan 2022 05:07:30 +0800 Subject: [PATCH 18/20] fix(boards): Proper active high and init delay for Mikoto ext-power --- app/boards/arm/mikoto/mikoto_520.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/boards/arm/mikoto/mikoto_520.dts b/app/boards/arm/mikoto/mikoto_520.dts index 20703e85..de831c54 100644 --- a/app/boards/arm/mikoto/mikoto_520.dts +++ b/app/boards/arm/mikoto/mikoto_520.dts @@ -29,7 +29,8 @@ ext-power { compatible = "zmk,ext-power-generic"; label = "EXT_POWER"; - control-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; + control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; + init-delay-ms = <50>; }; vbatt { From 970e63bec6a63d498989ae5f358d60c8e538bf35 Mon Sep 17 00:00:00 2001 From: David Fiander Date: Wed, 12 Jan 2022 21:36:08 -0500 Subject: [PATCH 19/20] fix(boards): Properly use dfu-util to flash DZ60 --- app/boards/arm/dz60rgb/board.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/boards/arm/dz60rgb/board.cmake b/app/boards/arm/dz60rgb/board.cmake index 10f6e291..9da8ea91 100644 --- a/app/boards/arm/dz60rgb/board.cmake +++ b/app/boards/arm/dz60rgb/board.cmake @@ -3,5 +3,5 @@ board_runner_args(dfu-util "--pid=0483:df11" "--alt=0" "--dfuse") board_runner_args(jlink "--device=STM32F303CC" "--speed=4000") -include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) +include(${ZEPHYR_BASE}/boards/common/dfu-util.board.cmake) include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) From 2ad8f687c05dcbe2cc759a01174263d641554d16 Mon Sep 17 00:00:00 2001 From: Albert Y <76888457+filterpaper@users.noreply.github.com> Date: Thu, 13 Jan 2022 17:23:43 +0800 Subject: [PATCH 20/20] docs: Add a note for GitHub SSH scheme (#1089) Co-authored-by: Cem Aksoylar --- docs/docs/user-setup.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/docs/user-setup.md b/docs/docs/user-setup.md index 6c80f882..de47680f 100644 --- a/docs/docs/user-setup.md +++ b/docs/docs/user-setup.md @@ -143,6 +143,10 @@ GitHub Repo: https://github.com/petejohanson/zmk-config.git Only the GitHub username is required; if you are happy with the defaults offered in the square brackets, you can simply hit `Enter`. +:::note +If you are using SSH keys for git push, change GitHub Repo field to the SSH scheme, e.g. `git@github.com:petejohanson/zmk-config.git`. +::: + ### Confirming Selections The setup script will confirm all of your selections one last time, before performing the setup: