diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..1df0848c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "npm" + directory: "/docs" + schedule: + interval: "daily" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 58da8c41..d7011283 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,6 +32,8 @@ jobs: - cradio_right - crbn - eek + - helix_left + - helix_right - iris_left - iris_right - jian_left diff --git a/app/Kconfig b/app/Kconfig index 4341df11..f5d92a88 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -293,6 +293,50 @@ config ZMK_KSCAN_COMPOSITE_DRIVER #KSCAN Settings endmenu +menu "USB Logging" + +config ZMK_USB_LOGGING + bool "Enable USB CDC ACM logging to help debug" + select LOG + select USB + select USB_DEVICE_STACK + select USB_CDC_ACM + select SERIAL + select CONSOLE + select UART_INTERRUPT_DRIVEN + select UART_LINE_CTRL + select UART_CONSOLE + select USB_UART_CONSOLE + +if ZMK_USB_LOGGING + +config ZMK_LOG_LEVEL + default 4 + +config USB_CDC_ACM_RINGBUF_SIZE + default 1024 + +config USB_CDC_ACM_DEVICE_NAME + default "CDC_ACM" + +config USB_CDC_ACM_DEVICE_COUNT + default 1 + +config UART_CONSOLE_ON_DEV_NAME + default "CDC_ACM_0" + +config LOG_BUFFER_SIZE + default 8192 + +config LOG_STRDUP_BUF_COUNT + default 16 + +#ZMK_USB_LOGGING +endif + +#USB Logging +endmenu + if SETTINGS config ZMK_SETTINGS_SAVE_DEBOUNCE @@ -317,6 +361,9 @@ config KERNEL_BIN_NAME config REBOOT default y +config USB + default y if HAS_HW_NRF_USBD + module = ZMK module-str = zmk source "subsys/logging/Kconfig.template.log_config" diff --git a/app/boards/arm/nrf52840_m2/CMakeLists.txt b/app/boards/arm/nrf52840_m2/CMakeLists.txt index 84b2ab99..044f93cd 100644 --- a/app/boards/arm/nrf52840_m2/CMakeLists.txt +++ b/app/boards/arm/nrf52840_m2/CMakeLists.txt @@ -1,7 +1,5 @@ -# # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -# set_property(GLOBAL APPEND PROPERTY extra_post_build_commands COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/../tools/uf2/utils/uf2conv.py diff --git a/app/boards/arm/nrf52840_m2/Kconfig b/app/boards/arm/nrf52840_m2/Kconfig index faff4925..c7edeb8d 100644 --- a/app/boards/arm/nrf52840_m2/Kconfig +++ b/app/boards/arm/nrf52840_m2/Kconfig @@ -1,7 +1,5 @@ -# # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -# config BOARD_ENABLE_DCDC bool "Enable DCDC mode" diff --git a/app/boards/arm/nrf52840_m2/Kconfig.board b/app/boards/arm/nrf52840_m2/Kconfig.board index 6ade68c1..49901039 100644 --- a/app/boards/arm/nrf52840_m2/Kconfig.board +++ b/app/boards/arm/nrf52840_m2/Kconfig.board @@ -1,8 +1,7 @@ # Maker Diary nrf52840 M.2 board configuration -# + # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -# config BOARD_NRF52840_M2 bool "nrf52480_m2" diff --git a/app/boards/arm/nrf52840_m2/Kconfig.defconfig b/app/boards/arm/nrf52840_m2/Kconfig.defconfig index 98fcd083..f3e1f0eb 100644 --- a/app/boards/arm/nrf52840_m2/Kconfig.defconfig +++ b/app/boards/arm/nrf52840_m2/Kconfig.defconfig @@ -1,7 +1,5 @@ -# # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -# if BOARD_NRF52840_M2 diff --git a/app/boards/arm/nrf52840_m2/board.cmake b/app/boards/arm/nrf52840_m2/board.cmake index 55b44e27..ae1e2607 100644 --- a/app/boards/arm/nrf52840_m2/board.cmake +++ b/app/boards/arm/nrf52840_m2/board.cmake @@ -1,7 +1,5 @@ -# # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -# board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset") diff --git a/app/boards/arm/nrf52840_m2/nrf52840_m2_defconfig b/app/boards/arm/nrf52840_m2/nrf52840_m2_defconfig index e74438b7..2f563c38 100644 --- a/app/boards/arm/nrf52840_m2/nrf52840_m2_defconfig +++ b/app/boards/arm/nrf52840_m2/nrf52840_m2_defconfig @@ -1,7 +1,5 @@ -# # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -# CONFIG_SOC_SERIES_NRF52X=y CONFIG_SOC_NRF52840_QIAA=y diff --git a/app/boards/shields/bfo9000/Kconfig.defconfig b/app/boards/shields/bfo9000/Kconfig.defconfig index e4b02e8c..a8584886 100644 --- a/app/boards/shields/bfo9000/Kconfig.defconfig +++ b/app/boards/shields/bfo9000/Kconfig.defconfig @@ -3,12 +3,12 @@ if SHIELD_BFO9000_LEFT -config ZMK_SPLIT_BLE_ROLE_CENTRAL - default y - config ZMK_KEYBOARD_NAME default "BFO9000 Left" +config ZMK_SPLIT_BLE_ROLE_CENTRAL + default y + endif if SHIELD_BFO9000_RIGHT diff --git a/app/boards/shields/bfo9000/readme.md b/app/boards/shields/bfo9000/README.md similarity index 100% rename from app/boards/shields/bfo9000/readme.md rename to app/boards/shields/bfo9000/README.md diff --git a/app/boards/shields/clueboard_california/readme.md b/app/boards/shields/clueboard_california/README.md similarity index 100% rename from app/boards/shields/clueboard_california/readme.md rename to app/boards/shields/clueboard_california/README.md diff --git a/app/boards/shields/corne/Kconfig.defconfig b/app/boards/shields/corne/Kconfig.defconfig index 6cf60b18..ef4817b5 100644 --- a/app/boards/shields/corne/Kconfig.defconfig +++ b/app/boards/shields/corne/Kconfig.defconfig @@ -12,9 +12,6 @@ if SHIELD_CORNE_RIGHT config ZMK_KEYBOARD_NAME default "Corne Right" - -config USB - default y endif diff --git a/app/boards/shields/cradio/Kconfig.defconfig b/app/boards/shields/cradio/Kconfig.defconfig index 25bb4331..5e826bf0 100644 --- a/app/boards/shields/cradio/Kconfig.defconfig +++ b/app/boards/shields/cradio/Kconfig.defconfig @@ -16,9 +16,6 @@ if SHIELD_CRADIO_RIGHT config ZMK_KEYBOARD_NAME default "cradio right" -config USB - default y - endif if SHIELD_CRADIO_LEFT || SHIELD_CRADIO_RIGHT diff --git a/app/boards/shields/crbn/Kconfig.defconfig b/app/boards/shields/crbn/Kconfig.defconfig index 378a3f83..2a5c8e39 100644 --- a/app/boards/shields/crbn/Kconfig.defconfig +++ b/app/boards/shields/crbn/Kconfig.defconfig @@ -1,7 +1,5 @@ -# # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -# if SHIELD_CRBN diff --git a/app/boards/shields/crbn/Kconfig.shield b/app/boards/shields/crbn/Kconfig.shield index c66f280f..ceeb5f63 100644 --- a/app/boards/shields/crbn/Kconfig.shield +++ b/app/boards/shields/crbn/Kconfig.shield @@ -1,7 +1,5 @@ -# # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -# config SHIELD_CRBN def_bool $(shields_list_contains,crbn) diff --git a/app/boards/shields/crbn/readme.md b/app/boards/shields/crbn/README.md similarity index 100% rename from app/boards/shields/crbn/readme.md rename to app/boards/shields/crbn/README.md diff --git a/app/boards/shields/eek/Kconfig.defconfig b/app/boards/shields/eek/Kconfig.defconfig index 65d69b7d..b84dd288 100644 --- a/app/boards/shields/eek/Kconfig.defconfig +++ b/app/boards/shields/eek/Kconfig.defconfig @@ -1,8 +1,5 @@ -# # Copyright (c) 2020 The ZMK Contributors -# # SPDX-License-Identifier: MIT -# if SHIELD_EEK diff --git a/app/boards/shields/eek/readme.md b/app/boards/shields/eek/README.md similarity index 100% rename from app/boards/shields/eek/readme.md rename to app/boards/shields/eek/README.md diff --git a/app/boards/shields/helix/Kconfig.defconfig b/app/boards/shields/helix/Kconfig.defconfig new file mode 100644 index 00000000..f0a4f880 --- /dev/null +++ b/app/boards/shields/helix/Kconfig.defconfig @@ -0,0 +1,26 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if SHIELD_HELIX_LEFT + +config ZMK_KEYBOARD_NAME + default "Helix Left" + +config ZMK_SPLIT_BLE_ROLE_CENTRAL + default y + +endif + +if SHIELD_HELIX_RIGHT + +config ZMK_KEYBOARD_NAME + default "Helix Right" + +endif + +if SHIELD_HELIX_LEFT || SHIELD_HELIX_RIGHT + +config ZMK_SPLIT + default y + +endif \ No newline at end of file diff --git a/app/boards/shields/helix/Kconfig.shield b/app/boards/shields/helix/Kconfig.shield new file mode 100644 index 00000000..7e5bb9ae --- /dev/null +++ b/app/boards/shields/helix/Kconfig.shield @@ -0,0 +1,8 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config SHIELD_HELIX_LEFT + def_bool $(shields_list_contains,helix_left) + +config SHIELD_HELIX_RIGHT + def_bool $(shields_list_contains,helix_right) \ No newline at end of file diff --git a/app/boards/shields/helix/README.md b/app/boards/shields/helix/README.md new file mode 100644 index 00000000..f8b0e13f --- /dev/null +++ b/app/boards/shields/helix/README.md @@ -0,0 +1,12 @@ +#### Note to user: + +- If desired, RGB underglow must be manually enabled before building and flashing. Check 'helix.conf' to do so. +- Peripheral RGB function is impaired until full support is implemented in the master branch. +- OLED displays are not currently included in this shield. This will be updated after OLED support is live. +- 'KANA' and 'EISUU' input is currently utilized under the 'LANG1' and 'LANG2' keycodes respectively. + +--- + +Thanks to Nicell, KemoNine, petejohanson, TJ "Chormbo The Great", joelspadin/Rinh, Wofiel, Okke, innovaker, +and the rest of the ZMK contributors for their support in constructing this shield. I appreciate your assistance greatly. +This has been a valuable learning experience for me. May this contribution serve the community well. diff --git a/app/boards/shields/helix/boards/nice_nano.overlay b/app/boards/shields/helix/boards/nice_nano.overlay new file mode 100644 index 00000000..78576d13 --- /dev/null +++ b/app/boards/shields/helix/boards/nice_nano.overlay @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +&spi1 { + compatible = "nordic,nrf-spim"; + status = "okay"; + mosi-pin = <6>; + // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. + sck-pin = <5>; + miso-pin = <7>; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <32>; /* number of LEDs */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; diff --git a/app/boards/shields/helix/helix.conf b/app/boards/shields/helix/helix.conf new file mode 100644 index 00000000..a8e57338 --- /dev/null +++ b/app/boards/shields/helix/helix.conf @@ -0,0 +1,6 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +# Enables RGB functionality (Uncomment lines below to enable.) +# CONFIG_ZMK_RGB_UNDERGLOW=y +# CONFIG_WS2812_STRIP=y \ No newline at end of file diff --git a/app/boards/shields/helix/helix.dtsi b/app/boards/shields/helix/helix.dtsi new file mode 100644 index 00000000..8df943f0 --- /dev/null +++ b/app/boards/shields/helix/helix.dtsi @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <14>; + rows = <5>; +// | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 | +// | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 | +// | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 | +// | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 | SW25 | | SW25 | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | +// | SW26 | SW27 | SW28 | SW29 | SW30 | SW31 | SW32 | | SW32 | SW31 | SW30 | SW29 | SW28 | SW27 | SW26 | + map = < +RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) +RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) +RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) +RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13) +RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13) + >; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + + diode-direction = "col2row"; + row-gpios + = <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + + }; +}; \ No newline at end of file diff --git a/app/boards/shields/helix/helix.keymap b/app/boards/shields/helix/helix.keymap new file mode 100644 index 00000000..82327c32 --- /dev/null +++ b/app/boards/shields/helix/helix.keymap @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + + #include + #include + #include + #include + #include + #include + + #define DEFAULT 0 + #define LOWER 1 + #define RAISE 2 + #define ADJUST 3 + +/* NOTE: At the time of the creation of this keymap, there are no specified codes for 'eisuu' and 'kana' input in ZMK. +However, 'LANG1' and 'LANG2' are fully-functioning candidates for 'kana' and 'eisuu' input respectively. +As such, those are in use within the default layer at this time.*/ + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + // --------------------------------------------------------------------------------------------------------------------------------- + // | GRAVE | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | DEL | + // | TAB | Q | W | E | R | T | | Y | U | I | O | P | BSPC | + // | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' | + // | SHIFT | Z | X | C | V | B | LBKT | | RBKT | N | M | , | . | / | RET | + // | ADJUST | ESC | ALT | LGUI | EISUU | LOWER | SPACE | | SPACE | RAISE | KANA | LEFT | DOWN | UP | RIGHT | + bindings = < + &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp DEL + &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC + &kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT + &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LBKT &kp RBKT &kp N &kp M &kp COMMA &kp PERIOD &kp SLASH &kp RET + &mo ADJUST &kp ESC &kp LALT &kp LGUI &kp LANG2 &mo LOWER &kp SPACE &kp SPACE &mo RAISE &kp LANG1 &kp LEFT &kp DOWN &kp UP &kp RIGHT + >; + }; + lower_layer { + // --------------------------------------------------------------------------------------------------------------------------------- + // | | | | | | | | | | | | | | + // | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + // | | | | | | | | | _ | + | { | } | PIPE | + // | | | | | | | ( | | ) | | | | HOME | END | | + // | | | | | | | | | | | | | | | | + bindings = < + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &kp TILDE &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &trans + &trans &trans &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE + &trans &trans &trans &trans &trans &trans &kp LPAR &kp RPAR &trans &trans &trans &kp HOME &kp END &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + >; + }; + raise_layer { + // --------------------------------------------------------------------------------------------------------------------------------- + // | | | | | | | | | | | | | | + // | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | DEL | + // | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + // | | F7 | F8 | F9 | F10 | F11 | | | | F12 | | PSCRN | PG_DN | PG_UP | | + // | | | | | | | | | | | | NEXT | VOL- | VOL+ | PLAY | + bindings = < + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp DEL + &trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH + &trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &trans &trans &kp F12 &trans &kp PSCRN &kp PG_DN &kp PG_UP &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP + >; + }; + adjust_layer { + // --------------------------------------------------------------------------------------------------------------------------------- + // | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | EP TOG | + // | BT CLR | BT SEL0 | BT SEL1 | BT SEL2 | BGT SEL3 | BT SEL4 | | RGB EFF+ | RGB HUE+ | RGB SAT+ | RGB SPD+ | RGB BRI+ | RGB TOG | + // | BT NXT | OUT TOG | OUT USB | OUT BLE | | | | RGB EFF- | RGB HUE- | RGB SAT- | RGB SPD- | RGB BRI- | | + // | BT PRV | | | | | | { | | } | | | | | | | + // | | | | | | | | | | | | | | | | + bindings = < + &kp GRAVE &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &ext_power EP_TOG + &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &rgb_ug RGB_EFF &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_SPI &rgb_ug RGB_BRI &rgb_ug RGB_TOG + &bt BT_NXT &out OUT_TOG &out OUT_USB &out OUT_BLE &trans &trans &rgb_ug RGB_EFR &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_SPD &rgb_ug RGB_BRD &trans + &bt BT_PRV &trans &trans &trans &trans &trans &kp LBRC &kp RBRC &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + >; + }; + }; +}; \ No newline at end of file diff --git a/app/boards/shields/helix/helix_left.overlay b/app/boards/shields/helix/helix_left.overlay new file mode 100644 index 00000000..733e55f9 --- /dev/null +++ b/app/boards/shields/helix/helix_left.overlay @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "helix.dtsi" + +&kscan0 { + col-gpios + = <&pro_micro_a 3 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 2 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 16 GPIO_ACTIVE_HIGH> + ; +}; diff --git a/app/boards/shields/helix/helix_right.overlay b/app/boards/shields/helix/helix_right.overlay new file mode 100644 index 00000000..2383a30e --- /dev/null +++ b/app/boards/shields/helix/helix_right.overlay @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "helix.dtsi" + +&default_transform { + col-offset = <7>; +}; + +&kscan0 { + col-gpios + = <&pro_micro_d 16 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 2 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 3 GPIO_ACTIVE_HIGH> + ; +}; diff --git a/app/boards/shields/iris/Kconfig.defconfig b/app/boards/shields/iris/Kconfig.defconfig index a43c0073..57b8c1ee 100644 --- a/app/boards/shields/iris/Kconfig.defconfig +++ b/app/boards/shields/iris/Kconfig.defconfig @@ -16,9 +16,6 @@ if SHIELD_IRIS_RIGHT config ZMK_KEYBOARD_NAME default "Iris Right" -config USB - default y - endif if SHIELD_IRIS_LEFT || SHIELD_IRIS_RIGHT diff --git a/app/boards/shields/jian/Kconfig.defconfig b/app/boards/shields/jian/Kconfig.defconfig index 07023a24..fc1f1995 100644 --- a/app/boards/shields/jian/Kconfig.defconfig +++ b/app/boards/shields/jian/Kconfig.defconfig @@ -14,9 +14,6 @@ if SHIELD_JIAN_RIGHT config ZMK_KEYBOARD_NAME default "Jian Right" - -config USB - default y endif diff --git a/app/boards/shields/jorne/Kconfig.defconfig b/app/boards/shields/jorne/Kconfig.defconfig index 18dcabe1..860cb12f 100644 --- a/app/boards/shields/jorne/Kconfig.defconfig +++ b/app/boards/shields/jorne/Kconfig.defconfig @@ -14,9 +14,6 @@ if SHIELD_JORNE_RIGHT config ZMK_KEYBOARD_NAME default "Jorne Right" - -config USB - default y endif diff --git a/app/boards/shields/jorne/Kconfig.shield b/app/boards/shields/jorne/Kconfig.shield index 11766113..88fd4e5a 100644 --- a/app/boards/shields/jorne/Kconfig.shield +++ b/app/boards/shields/jorne/Kconfig.shield @@ -1,4 +1,4 @@ -# Copyright (c) 2020 The ZMK Contributors +# Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT config SHIELD_JORNE_LEFT diff --git a/app/boards/shields/kyria/Kconfig.defconfig b/app/boards/shields/kyria/Kconfig.defconfig index d0c17105..99e47bfe 100644 --- a/app/boards/shields/kyria/Kconfig.defconfig +++ b/app/boards/shields/kyria/Kconfig.defconfig @@ -15,9 +15,6 @@ if SHIELD_KYRIA_RIGHT config ZMK_KEYBOARD_NAME default "Kyria Right" -config USB - default y - endif if SHIELD_KYRIA_LEFT || SHIELD_KYRIA_RIGHT diff --git a/app/boards/shields/lily58/Kconfig.defconfig b/app/boards/shields/lily58/Kconfig.defconfig index ebcfa7b7..915cc70e 100644 --- a/app/boards/shields/lily58/Kconfig.defconfig +++ b/app/boards/shields/lily58/Kconfig.defconfig @@ -14,9 +14,6 @@ if SHIELD_LILY58_RIGHT config ZMK_KEYBOARD_NAME default "Lily58 Right" -config USB - default y - endif if SHIELD_LILY58_LEFT || SHIELD_LILY58_RIGHT diff --git a/app/boards/shields/m60/Kconfig.defconfig b/app/boards/shields/m60/Kconfig.defconfig index e31d5a53..ad105ed9 100644 --- a/app/boards/shields/m60/Kconfig.defconfig +++ b/app/boards/shields/m60/Kconfig.defconfig @@ -1,7 +1,5 @@ -# # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -# if SHIELD_M60 diff --git a/app/boards/shields/m60/Kconfig.shield b/app/boards/shields/m60/Kconfig.shield index 47a28e24..4ed58c49 100644 --- a/app/boards/shields/m60/Kconfig.shield +++ b/app/boards/shields/m60/Kconfig.shield @@ -1,7 +1,5 @@ -# # Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -# config SHIELD_M60 def_bool $(shields_list_contains,m60) diff --git a/app/boards/shields/m60/readme.md b/app/boards/shields/m60/README.md similarity index 100% rename from app/boards/shields/m60/readme.md rename to app/boards/shields/m60/README.md diff --git a/app/boards/shields/microdox/Kconfig.defconfig b/app/boards/shields/microdox/Kconfig.defconfig index 0afd7491..be39c9f8 100644 --- a/app/boards/shields/microdox/Kconfig.defconfig +++ b/app/boards/shields/microdox/Kconfig.defconfig @@ -17,9 +17,6 @@ if SHIELD_MICRODOX_RIGHT config ZMK_KEYBOARD_NAME default "Microdox Right" -config USB - default y - endif if SHIELD_MICRODOX_LEFT || SHIELD_MICRODOX_RIGHT diff --git a/app/boards/shields/quefrency/Kconfig.defconfig b/app/boards/shields/quefrency/Kconfig.defconfig index b4041cbf..de44702f 100644 --- a/app/boards/shields/quefrency/Kconfig.defconfig +++ b/app/boards/shields/quefrency/Kconfig.defconfig @@ -1,5 +1,5 @@ -#Copyright (c) 2020 The ZMK Contributors -#SPDX-License-Identifier: MIT +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT if SHIELD_QUEFRENCY_LEFT @@ -17,9 +17,6 @@ if SHIELD_QUEFRENCY_RIGHT config ZMK_KEYBOARD_NAME default "Quefrency Right" -config USB - default y - endif if SHIELD_QUEFRENCY_LEFT || SHIELD_QUEFRENCY_RIGHT diff --git a/app/boards/shields/sofle/Kconfig.defconfig b/app/boards/shields/sofle/Kconfig.defconfig index 765afea4..6a580bfe 100644 --- a/app/boards/shields/sofle/Kconfig.defconfig +++ b/app/boards/shields/sofle/Kconfig.defconfig @@ -16,9 +16,6 @@ if SHIELD_SOFLE_RIGHT config ZMK_KEYBOARD_NAME default "Sofle Right" -config USB - default y - endif if SHIELD_SOFLE_LEFT || SHIELD_SOFLE_RIGHT diff --git a/app/boards/shields/splitreus62/Kconfig.defconfig b/app/boards/shields/splitreus62/Kconfig.defconfig index 988041c0..fdaa3779 100644 --- a/app/boards/shields/splitreus62/Kconfig.defconfig +++ b/app/boards/shields/splitreus62/Kconfig.defconfig @@ -1,6 +1,6 @@ -#Copyright (c) 2020 Derek Schmell -#SPDX-License-Identifier: MIT +# Copyright (c) 2020 Derek Schmell +# SPDX-License-Identifier: MIT if SHIELD_SPLITREUS62_LEFT @@ -18,9 +18,6 @@ if SHIELD_SPLITREUS62_RIGHT config ZMK_KEYBOARD_NAME default "Splitreus62 Right" -config USB - default y - endif if SHIELD_SPLITREUS62_LEFT || SHIELD_SPLITREUS62_RIGHT diff --git a/app/boards/shields/tg4x/Kconfig.defconfig b/app/boards/shields/tg4x/Kconfig.defconfig index ca9fa2c3..6312c080 100644 --- a/app/boards/shields/tg4x/Kconfig.defconfig +++ b/app/boards/shields/tg4x/Kconfig.defconfig @@ -4,6 +4,6 @@ if SHIELD_TG4X config ZMK_KEYBOARD_NAME - default "TG4X" + default "TG4x" -endif \ No newline at end of file +endif diff --git a/app/boards/shields/tg4x/Kconfig.shield b/app/boards/shields/tg4x/Kconfig.shield index 7e98b710..27166b10 100644 --- a/app/boards/shields/tg4x/Kconfig.shield +++ b/app/boards/shields/tg4x/Kconfig.shield @@ -2,4 +2,4 @@ # SPDX-License-Identifier: MIT config SHIELD_TG4X - def_bool $(shields_list_contains,tg4x) + def_bool $(shields_list_contains,tg4x) diff --git a/app/boards/shields/tg4x/README.md b/app/boards/shields/tg4x/README.md new file mode 100644 index 00000000..087ce251 --- /dev/null +++ b/app/boards/shields/tg4x/README.md @@ -0,0 +1,11 @@ +# TG4x + +Standard setup for the [TG4x](https://github.com/MythosMann/tg4x/) 40% keyboard. + +## Board Revision and Layout Notes + +This TG4x implementation is for... + +* rev 2.1 of the board +* Split spacebar with 2.25U on the left and 2.75U on the right +* 2U right shift diff --git a/app/boards/shields/tg4x/boards/nice_nano.conf b/app/boards/shields/tg4x/boards/nice_nano.conf new file mode 100644 index 00000000..7b077948 --- /dev/null +++ b/app/boards/shields/tg4x/boards/nice_nano.conf @@ -0,0 +1,7 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +# Enable underglow +CONFIG_ZMK_RGB_UNDERGLOW=y +# Use the STRIP config specific to the LEDs you're using +CONFIG_WS2812_STRIP=y \ No newline at end of file diff --git a/app/boards/shields/tg4x/boards/nice_nano.overlay b/app/boards/shields/tg4x/boards/nice_nano.overlay new file mode 100644 index 00000000..60492bec --- /dev/null +++ b/app/boards/shields/tg4x/boards/nice_nano.overlay @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +&spi1 { + compatible = "nordic,nrf-spim"; + status = "okay"; + mosi-pin = <8>; + // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. + sck-pin = <5>; + miso-pin = <7>; + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <7>; /* number of LEDs */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; diff --git a/app/boards/shields/tg4x/tg4x.conf b/app/boards/shields/tg4x/tg4x.conf new file mode 100644 index 00000000..9d65bb60 --- /dev/null +++ b/app/boards/shields/tg4x/tg4x.conf @@ -0,0 +1,2 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT \ No newline at end of file diff --git a/app/boards/shields/tg4x/tg4x.keymap b/app/boards/shields/tg4x/tg4x.keymap index cadc41a4..d5e20094 100644 --- a/app/boards/shields/tg4x/tg4x.keymap +++ b/app/boards/shields/tg4x/tg4x.keymap @@ -8,51 +8,47 @@ #include #include -#define DEFAULT 0 -#define LOWER 1 -#define RAISE 2 - / { - behaviors { - hm: homerow_mods { - compatible = "zmk,behavior-hold-tap"; - label = "homerow mods"; - #binding-cells = <2>; - tapping_term_ms = <225>; - flavor = "tap-preferred"; - bindings = <&kp>, <&kp>; - }; - }; + behaviors { + ht: hold_tap { + compatible = "zmk,behavior-hold-tap"; + label = "Hold Tap"; + #binding-cells = <2>; + tapping_term_ms = <200>; + flavor = "tap-preferred"; + bindings = <&kp>, <&kp>; + }; + }; + + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < +&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp SEMI &kp BSPC +&ht CAPS TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp APOS &kp RET +&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp RSHFT +&kp LCTRL &kp LGUI &kp LALT < 1 SPACE &kp SPACE &kp RALT &kp RGUI &mo 2 &kp RCTRL + >; + }; + + function_layer { + bindings = < +&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp DEL +&none &kp HOME &kp PG_UP &trans &trans &trans &kp LBKT &kp RBKT &kp EQUAL &kp BSLH &kp FSLH &trans +&trans &kp END &kp PG_DN &trans &trans &trans &trans &trans &trans &kp UP &trans +&trans &trans &trans &trans &trans &trans &kp LEFT &kp DOWN &kp RIGHT + >; + }; + + other_layer { + bindings = < +&kp PRINTSCREEN &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&trans &bt BT_CLR &bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &bootloader &reset &trans +&trans &trans &trans &trans &trans &kp C_VOL_UP &kp C_VOL_DN &kp C_PP + >; + }; + + }; }; - -/ { - keymap { - compatible = "zmk,keymap"; - - default_layer { - bindings = < - &kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC - &kp TAB &hm LGUI A &hm LALT S &hm LCTRL D &hm LSHFT F &kp G &kp H &hm RSHFT J &hm RCTRL K &hm RALT L &hm RGUI SEMI &kp RET - &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp SQT - &kp LCTRL &kp LALT &kp LGUI < 1 BSPC < 2 SPACE &kp LEFT &kp DOWN &kp UP &kp RIGHT - >; - }; - lower { - bindings = < - &kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp PSCRN - &kp DEL &trans &kp K_VOL_UP &trans &trans &trans &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans - &trans &trans &kp K_VOL_DN &trans &trans &trans &trans &trans &trans &bt BT_PRV &bt BT_NXT &bt BT_CLR - &bootloader &reset &trans &trans &trans &trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 - >; - }; - - raise { - bindings = < - &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp PSCRN - &kp DEL &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH - &trans &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp TILDE &kp HOME &kp PG_UP &kp PG_DN &kp END - &trans &trans &trans &trans &trans &trans &kp C_NEXT &kp C_VOL_DN &kp C_VOL_UP &kp C_PP - >; - }; - }; -}; \ No newline at end of file diff --git a/app/boards/shields/tg4x/tg4x.overlay b/app/boards/shields/tg4x/tg4x.overlay index 4b9d4f5b..38e4faa7 100644 --- a/app/boards/shields/tg4x/tg4x.overlay +++ b/app/boards/shields/tg4x/tg4x.overlay @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 The ZMK Contrbutors + * Copyright (c) 2020 The ZMK Contributors * * SPDX-License-Identifier: MIT */ @@ -7,50 +7,49 @@ #include / { - chosen { - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; - }; - - default_transform: keymap_transform_0 { - compatible = "zmk,matrix-transform"; - columns = <7>; - rows = <8>; - map = < - RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,5) - RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) - RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(6,0) RC(6,1) RC(6,2) RC(6,3) RC(6,4) - RC(3,0) RC(3,1) RC(3,2) RC(3,4) RC(3,5) RC(7,1) RC(7,2) RC(7,3) RC(7,4) - >; - }; - kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; label = "KSCAN"; - diode-direction = "col2row"; - col-gpios - = <&pro_micro_d 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> - , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 2 GPIO_ACTIVE_HIGH> - , <&pro_micro_a 3 GPIO_ACTIVE_HIGH> - ; + diode-direction = "col2row"; row-gpios - = <&pro_micro_a 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_a 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_a 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_a 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro_d 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + = <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; + col-gpios + = <&pro_micro_d 1 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 14 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 15 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 0 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 1 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 2 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 3 GPIO_ACTIVE_HIGH> + ; }; -}; + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + rows = <8>; + columns = <7>; + map = < +RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) +RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) +RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(6,0) RC(6,1) RC(6,2) RC(6,4) +RC(3,0) RC(3,1) RC(3,2) RC(3,4) RC(3,5) RC(7,1) RC(7,2) RC(7,3) RC(7,4) + >; + }; + + chosen { + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; + }; +}; diff --git a/app/dts/behaviors/rgb_underglow.dtsi b/app/dts/behaviors/rgb_underglow.dtsi index 22aff93f..8b88f8c8 100644 --- a/app/dts/behaviors/rgb_underglow.dtsi +++ b/app/dts/behaviors/rgb_underglow.dtsi @@ -9,7 +9,7 @@ rgb_ug: behavior_rgb_underglow { compatible = "zmk,behavior-rgb-underglow"; label = "RGB_UNDERGLOW"; - #binding-cells = <1>; + #binding-cells = <2>; }; }; }; diff --git a/app/dts/bindings/behaviors/one_param.yaml b/app/dts/bindings/behaviors/one_param.yaml index 1f33aee2..8eabba1b 100644 --- a/app/dts/bindings/behaviors/one_param.yaml +++ b/app/dts/bindings/behaviors/one_param.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2020, Pete Johanson +# Copyright (c) 2020 Pete Johanson # SPDX-License-Identifier: MIT properties: diff --git a/app/dts/bindings/behaviors/two_param.yaml b/app/dts/bindings/behaviors/two_param.yaml index f8b3af93..c508c401 100644 --- a/app/dts/bindings/behaviors/two_param.yaml +++ b/app/dts/bindings/behaviors/two_param.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2020, Pete Johanson +# Copyright (c) 2020 Pete Johanson # SPDX-License-Identifier: MIT properties: diff --git a/app/dts/bindings/behaviors/zero_param.yaml b/app/dts/bindings/behaviors/zero_param.yaml index 20f15288..6defbb20 100644 --- a/app/dts/bindings/behaviors/zero_param.yaml +++ b/app/dts/bindings/behaviors/zero_param.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2020, Pete Johanson +# Copyright (c) 2020 Pete Johanson # SPDX-License-Identifier: MIT properties: diff --git a/app/dts/bindings/behaviors/zmk,behavior-bluetooth.yaml b/app/dts/bindings/behaviors/zmk,behavior-bluetooth.yaml index 127ebe0b..9ce56734 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-bluetooth.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-bluetooth.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2020, Peter Johanson +# Copyright (c) 2020 Peter Johanson # SPDX-License-Identifier: MIT description: Bluetooth Behavior diff --git a/app/dts/bindings/behaviors/zmk,behavior-ext-power.yaml b/app/dts/bindings/behaviors/zmk,behavior-ext-power.yaml index d86c6f9f..69949d7f 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-ext-power.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-ext-power.yaml @@ -1,7 +1,5 @@ -# -# Copyright (c) 2020, The ZMK Contributors +# Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -# description: External power control Behavior diff --git a/app/dts/bindings/behaviors/zmk,behavior-key-press.yaml b/app/dts/bindings/behaviors/zmk,behavior-key-press.yaml index 0169d7d5..37f1886f 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-key-press.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-key-press.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2020, Pete Johanson +# Copyright (c) 2020 Pete Johanson # SPDX-License-Identifier: MIT description: Key press/release behavior diff --git a/app/dts/bindings/behaviors/zmk,behavior-momentary-layer.yaml b/app/dts/bindings/behaviors/zmk,behavior-momentary-layer.yaml index 70c7c7f9..b8f26af6 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-momentary-layer.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-momentary-layer.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2020, Pete Johanson +# Copyright (c) 2020 Pete Johanson # SPDX-License-Identifier: MIT description: Momentary layer on press/release behavior diff --git a/app/dts/bindings/behaviors/zmk,behavior-none.yaml b/app/dts/bindings/behaviors/zmk,behavior-none.yaml index 9c66c947..4d1ad406 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-none.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-none.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2020, Pete Johanson +# Copyright (c) 2020 Pete Johanson # SPDX-License-Identifier: MIT description: None Binding Behavior diff --git a/app/dts/bindings/behaviors/zmk,behavior-outputs.yaml b/app/dts/bindings/behaviors/zmk,behavior-outputs.yaml index 8bcefd94..6bc0c837 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-outputs.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-outputs.yaml @@ -1,7 +1,5 @@ -# -# Copyright (c) 2020, The ZMK Contributors +# Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -# description: Output Selection Behavior diff --git a/app/dts/bindings/behaviors/zmk,behavior-reset.yaml b/app/dts/bindings/behaviors/zmk,behavior-reset.yaml index 061b15e3..6133411e 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-reset.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-reset.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2020, Pete Johanson +# Copyright (c) 2020 Pete Johanson # SPDX-License-Identifier: MIT description: Keyboard Reset Behavior diff --git a/app/dts/bindings/behaviors/zmk,behavior-rgb-underglow.yaml b/app/dts/bindings/behaviors/zmk,behavior-rgb-underglow.yaml index 2cb74b9c..d301998a 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-rgb-underglow.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-rgb-underglow.yaml @@ -5,4 +5,4 @@ description: RGB Underglow Action compatible: "zmk,behavior-rgb-underglow" -include: one_param.yaml +include: two_param.yaml diff --git a/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-key-press.yaml b/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-key-press.yaml index b34507f7..1fc60fcf 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-key-press.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-key-press.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2020, The ZMK Contributors +# Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT description: Sensor rotate key press/release behavior diff --git a/app/dts/bindings/behaviors/zmk,behavior-transparent.yaml b/app/dts/bindings/behaviors/zmk,behavior-transparent.yaml index 33f1abae..19c25ffa 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-transparent.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-transparent.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2020, Pete Johanson +# Copyright (c) 2020 Pete Johanson # SPDX-License-Identifier: MIT description: Transparent Binding Behavior diff --git a/app/dts/bindings/zmk,ext-power-generic.yaml b/app/dts/bindings/zmk,ext-power-generic.yaml index 6d36d213..acaf9ccc 100644 --- a/app/dts/bindings/zmk,ext-power-generic.yaml +++ b/app/dts/bindings/zmk,ext-power-generic.yaml @@ -1,7 +1,5 @@ -# -# Copyright (c) 2020, The ZMK Contributors +# Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -# description: | Generic driver for controlling the external power output diff --git a/app/dts/bindings/zmk,keymap-sensors.yaml b/app/dts/bindings/zmk,keymap-sensors.yaml index 86ae5c22..a879684f 100644 --- a/app/dts/bindings/zmk,keymap-sensors.yaml +++ b/app/dts/bindings/zmk,keymap-sensors.yaml @@ -1,7 +1,5 @@ -# -# Copyright (c) 2020, The ZMK Contributors +# Copyright (c) 2020 The ZMK Contributors # SPDX-License-Identifier: MIT -# description: | Allows defining the collection of sensors bound in the keymap layers diff --git a/app/include/dt-bindings/zmk/rgb.h b/app/include/dt-bindings/zmk/rgb.h index eb721807..1f7b44ec 100644 --- a/app/include/dt-bindings/zmk/rgb.h +++ b/app/include/dt-bindings/zmk/rgb.h @@ -4,14 +4,29 @@ * SPDX-License-Identifier: MIT */ -#define RGB_TOG 0 -#define RGB_HUI 1 -#define RGB_HUD 2 -#define RGB_SAI 3 -#define RGB_SAD 4 -#define RGB_BRI 5 -#define RGB_BRD 6 -#define RGB_SPI 7 -#define RGB_SPD 8 -#define RGB_EFF 9 -#define RGB_EFR 10 +#define RGB_TOG_CMD 0 +#define RGB_HUI_CMD 1 +#define RGB_HUD_CMD 2 +#define RGB_SAI_CMD 3 +#define RGB_SAD_CMD 4 +#define RGB_BRI_CMD 5 +#define RGB_BRD_CMD 6 +#define RGB_SPI_CMD 7 +#define RGB_SPD_CMD 8 +#define RGB_EFF_CMD 9 +#define RGB_EFR_CMD 10 +#define RGB_COLOR_HSB_CMD 11 + +#define RGB_TOG RGB_TOG_CMD 0 +#define RGB_HUI RGB_HUI_CMD 0 +#define RGB_HUD RGB_HUD_CMD 0 +#define RGB_SAI RGB_SAI_CMD 0 +#define RGB_SAD RGB_SAD_CMD 0 +#define RGB_BRI RGB_BRI_CMD 0 +#define RGB_BRD RGB_BRD_CMD 0 +#define RGB_SPI RGB_SPI_CMD 0 +#define RGB_SPD RGB_SPD_CMD 0 +#define RGB_EFF RGB_EFF_CMD 0 +#define RGB_EFR RGB_EFR_CMD 0 +#define RGB_COLOR_HSB(h, s, v) RGB_COLOR_HSB_CMD(((h) << 16) + ((s) << 8) + (v)) +#define RGB_COLOR_HSV RGB_COLOR_HSB \ No newline at end of file diff --git a/app/include/zmk/keymap.h b/app/include/zmk/keymap.h index 9192772f..4bcdc2b4 100644 --- a/app/include/zmk/keymap.h +++ b/app/include/zmk/keymap.h @@ -16,5 +16,6 @@ int zmk_keymap_layer_activate(uint8_t layer); int zmk_keymap_layer_deactivate(uint8_t layer); int zmk_keymap_layer_toggle(uint8_t layer); int zmk_keymap_layer_to(uint8_t layer); +const char *zmk_keymap_layer_label(uint8_t layer); int zmk_keymap_position_state_changed(uint32_t position, bool pressed, int64_t timestamp); diff --git a/app/include/zmk/rgb_underglow.h b/app/include/zmk/rgb_underglow.h index 94cc32cc..7fcd42dd 100644 --- a/app/include/zmk/rgb_underglow.h +++ b/app/include/zmk/rgb_underglow.h @@ -12,3 +12,4 @@ int zmk_rgb_underglow_change_hue(int direction); int zmk_rgb_underglow_change_sat(int direction); int zmk_rgb_underglow_change_brt(int direction); int zmk_rgb_underglow_change_spd(int direction); +int zmk_rgb_underglow_set_hsb(uint16_t hue, uint8_t saturation, uint8_t brightness); \ No newline at end of file diff --git a/app/run-test.sh b/app/run-test.sh index ea3f91bb..dd3c752b 100755 --- a/app/run-test.sh +++ b/app/run-test.sh @@ -1,9 +1,8 @@ #!/bin/sh -# + # Copyright (c) 2020 The ZMK Contributors -# # SPDX-License-Identifier: MIT -# + if [ -z "$1" ]; then echo "Usage: ./run-test.sh " exit 1 diff --git a/app/scripts/west-commands.yml b/app/scripts/west-commands.yml index 75be89da..81d6946f 100644 --- a/app/scripts/west-commands.yml +++ b/app/scripts/west-commands.yml @@ -1,4 +1,4 @@ -# Copyright (c) 2020, ZMK Contributors +# Copyright (c) 2020 ZMK Contributors # SPDX-License-Identifier: MIT west-commands: diff --git a/app/scripts/west_commands/test.py b/app/scripts/west_commands/test.py index f79547b9..ac64bb6f 100644 --- a/app/scripts/west_commands/test.py +++ b/app/scripts/west_commands/test.py @@ -1,5 +1,4 @@ # Copyright (c) 2020 The ZMK Contributors -# # SPDX-License-Identifier: MIT '''Test runner for ZMK.''' diff --git a/app/src/behaviors/behavior_rgb_underglow.c b/app/src/behaviors/behavior_rgb_underglow.c index 399123a3..07f24940 100644 --- a/app/src/behaviors/behavior_rgb_underglow.c +++ b/app/src/behaviors/behavior_rgb_underglow.c @@ -21,28 +21,31 @@ static int behavior_rgb_underglow_init(const struct device *dev) { return 0; } static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { switch (binding->param1) { - case RGB_TOG: + case RGB_TOG_CMD: return zmk_rgb_underglow_toggle(); - case RGB_HUI: + case RGB_HUI_CMD: return zmk_rgb_underglow_change_hue(1); - case RGB_HUD: + case RGB_HUD_CMD: return zmk_rgb_underglow_change_hue(-1); - case RGB_SAI: + case RGB_SAI_CMD: return zmk_rgb_underglow_change_sat(1); - case RGB_SAD: + case RGB_SAD_CMD: return zmk_rgb_underglow_change_sat(-1); - case RGB_BRI: + case RGB_BRI_CMD: return zmk_rgb_underglow_change_brt(1); - case RGB_BRD: + case RGB_BRD_CMD: return zmk_rgb_underglow_change_brt(-1); - case RGB_SPI: + case RGB_SPI_CMD: return zmk_rgb_underglow_change_spd(1); - case RGB_SPD: + case RGB_SPD_CMD: return zmk_rgb_underglow_change_spd(-1); - case RGB_EFF: + case RGB_EFF_CMD: return zmk_rgb_underglow_cycle_effect(1); - case RGB_EFR: + case RGB_EFR_CMD: return zmk_rgb_underglow_cycle_effect(-1); + case RGB_COLOR_HSB_CMD: + return zmk_rgb_underglow_set_hsb((binding->param2 >> 16) & 0xFFFF, + (binding->param2 >> 8) & 0xFF, binding->param2 & 0xFF); } return -ENOTSUP; diff --git a/app/src/display/widgets/layer_status.c b/app/src/display/widgets/layer_status.c index fb9f6897..6700bb30 100644 --- a/app/src/display/widgets/layer_status.c +++ b/app/src/display/widgets/layer_status.c @@ -33,12 +33,23 @@ void layer_status_init() { void set_layer_symbol(lv_obj_t *label) { int active_layer_index = zmk_keymap_highest_layer_active(); - char text[6] = {}; LOG_DBG("Layer changed to %i", active_layer_index); - sprintf(text, LV_SYMBOL_KEYBOARD "%i ", active_layer_index); - lv_label_set_text(label, text); + const char *layer_label = zmk_keymap_layer_label(active_layer_index); + if (layer_label == NULL) { + char text[6] = {}; + + sprintf(text, LV_SYMBOL_KEYBOARD "%i", active_layer_index); + + lv_label_set_text(label, text); + } else { + char text[12] = {}; + + snprintf(text, 12, LV_SYMBOL_KEYBOARD "%s", layer_label); + + lv_label_set_text(label, text); + } } int zmk_widget_layer_status_init(struct zmk_widget_layer_status *widget, lv_obj_t *parent) { diff --git a/app/src/keymap.c b/app/src/keymap.c index 786a1773..322a9369 100644 --- a/app/src/keymap.c +++ b/app/src/keymap.c @@ -59,6 +59,8 @@ static uint8_t _zmk_keymap_layer_default = 0; #endif /* ZMK_KEYMAP_HAS_SENSORS */ +#define LAYER_LABEL(node) COND_CODE_0(DT_NODE_HAS_PROP(node, label), (NULL), (DT_LABEL(node))), + // State // When a behavior handles a key position "down" event, we record the layer state @@ -69,6 +71,9 @@ static uint32_t zmk_keymap_active_behavior_layer[ZMK_KEYMAP_LEN]; static struct zmk_behavior_binding zmk_keymap[ZMK_KEYMAP_LAYERS_LEN][ZMK_KEYMAP_LEN] = { DT_INST_FOREACH_CHILD(0, TRANSFORMED_LAYER)}; +static const char *zmk_keymap_layer_names[ZMK_KEYMAP_LAYERS_LEN] = { + DT_INST_FOREACH_CHILD(0, LAYER_LABEL)}; + #if ZMK_KEYMAP_HAS_SENSORS static struct zmk_behavior_binding zmk_sensor_keymap[ZMK_KEYMAP_LAYERS_LEN] @@ -143,6 +148,18 @@ int zmk_keymap_layer_to(uint8_t layer) { return 0; } +bool is_active_layer(uint8_t layer, zmk_keymap_layers_state_t layer_state) { + return (layer_state & BIT(layer)) == BIT(layer) || layer == _zmk_keymap_layer_default; +} + +const char *zmk_keymap_layer_label(uint8_t layer) { + if (layer >= ZMK_KEYMAP_LAYERS_LEN) { + return NULL; + } + + return zmk_keymap_layer_names[layer]; +} + int zmk_keymap_apply_position_state(int layer, uint32_t position, bool pressed, int64_t timestamp) { struct zmk_behavior_binding *binding = &zmk_keymap[layer][position]; const struct device *behavior; diff --git a/app/src/rgb_underglow.c b/app/src/rgb_underglow.c index 73a5c5e9..f3bd7a9d 100644 --- a/app/src/rgb_underglow.c +++ b/app/src/rgb_underglow.c @@ -346,6 +346,18 @@ int zmk_rgb_underglow_toggle() { return zmk_rgb_underglow_save_state(); } +int zmk_rgb_underglow_set_hsb(uint16_t hue, uint8_t saturation, uint8_t brightness) { + if (hue > 360 || saturation > 100 || brightness > 100) { + return -ENOTSUP; + } + + state.hue = hue; + state.saturation = saturation; + state.brightness = brightness; + + return 0; +} + int zmk_rgb_underglow_change_hue(int direction) { if (!led_strip) return -ENODEV; diff --git a/docs/docs/behaviors/lighting.md b/docs/docs/behaviors/lighting.md index 2d4f532e..6e6732be 100644 --- a/docs/docs/behaviors/lighting.md +++ b/docs/docs/behaviors/lighting.md @@ -21,19 +21,20 @@ This will allow you to reference the actions defined in this header such as `RGB Here is a table describing the action for each define: -| Define | Action | -| --------- | --------------------------------------------------------- | -| `RGB_TOG` | Toggles the RGB feature on and off | -| `RGB_HUI` | Increases the hue of the RGB feature | -| `RGB_HUD` | Decreases the hue of the RGB feature | -| `RGB_SAI` | Increases the saturation of the RGB feature | -| `RGB_SAD` | Decreases the saturation of the RGB feature | -| `RGB_BRI` | Increases the brightness of the RGB feature | -| `RGB_BRD` | Decreases the brightness of the RGB feature | -| `RGB_SPI` | Increases the speed of the RGB feature effect's animation | -| `RGB_SPD` | Decreases the speed of the RGB feature effect's animation | -| `RGB_EFF` | Cycles the RGB feature's effect forwards | -| `RGB_EFR` | Cycles the RGB feature's effect reverse | +| Define | Action | +| --------------- | ---------------------------------------------------------------------------------------------- | +| `RGB_TOG` | Toggles the RGB feature on and off | +| `RGB_HUI` | Increases the hue of the RGB feature | +| `RGB_HUD` | Decreases the hue of the RGB feature | +| `RGB_SAI` | Increases the saturation of the RGB feature | +| `RGB_SAD` | Decreases the saturation of the RGB feature | +| `RGB_BRI` | Increases the brightness of the RGB feature | +| `RGB_BRD` | Decreases the brightness of the RGB feature | +| `RGB_SPI` | Increases the speed of the RGB feature effect's animation | +| `RGB_SPD` | Decreases the speed of the RGB feature effect's animation | +| `RGB_EFF` | Cycles the RGB feature's effect forwards | +| `RGB_EFR` | Cycles the RGB feature's effect reverse | +| `RGB_COLOR_HSB` | Sets a specific [HSB (HSV)](https://en.wikipedia.org/wiki/HSL_and_HSV) value for the underglow | ## RGB Underglow @@ -42,10 +43,31 @@ The "RGB underglow" behavior completes an RGB action given on press. ### Behavior Binding - Reference: `&rgb_ug` -- Parameter: The RGB action define, e.g. `RGB_TOG` or `RGB_BRI` +- Parameter #1: The RGB action define, e.g. `RGB_TOG` or `RGB_BRI` +- Parameter #2: Only applies to `RGB_COLOR_HSB` and is the HSB values of the color to set within parenthesis and separated by a common (see below for an example) -Example: +:::note HSB Values -``` -&rgb_ug RGB_TOG -``` +When specifying HSB values you'll need to use `RGB_COLOR_HSB(h, s, b)` in your keymap file. See below for an example. + +Value Limits: + +- Hue values can _not_ exceed 360 (degrees) +- Saturation values can _not_ exceed 100 (percent) +- Brightness values can _not_ exceed 100 (percent) + +::: + +### Examples + +1. Toggle underglow on/off + + ``` + &rgb_ug RGB_TOG + ``` + +1. Set a specific HSB color (green) + + ``` + &rgb_ug RGB_COLOR_HSB(128,100,100) + ``` diff --git a/docs/docs/development/new-shield.md b/docs/docs/development/new-shield.md index 18f8b420..6fac2075 100644 --- a/docs/docs/development/new-shield.md +++ b/docs/docs/development/new-shield.md @@ -91,6 +91,9 @@ endif ``` Similarly to defining the halves of a split board in `Kconfig.shield` it is important to set the `ZMK_KEYBOARD_NAME` for each half of a split keyboard. +You'll also want to set which half is the central side. Most boards set it to the left. +Then on the peripheral half, you'll want to turn USB on so that it shows USB status on displays properly. +Finally, you'll want to turn on the split option for both sides. This can all be seen below. ``` if SHIELD_MY_BOARD_LEFT @@ -98,6 +101,9 @@ if SHIELD_MY_BOARD_LEFT config ZMK_KEYBOARD_NAME default "My Awesome Keyboard Left" +config ZMK_SPLIT_BLE_ROLE_CENTRAL + default y + endif if SHIELD_MY_BOARD_RIGHT @@ -105,6 +111,13 @@ if SHIELD_MY_BOARD_RIGHT config ZMK_KEYBOARD_NAME default "My Awesome Keyboard Right" +endif + +if SHIELD_MY_BOARD_LEFT || SHIELD_MY_BOARD_RIGHT + +config ZMK_SPLIT + default y + endif ``` @@ -203,6 +216,7 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,2) RC(4,9) RC(3,6) RC(3,7) ; }; +}; ``` :::note @@ -264,24 +278,7 @@ For example, a split board called `my_awesome_split_board` would have the follow - `my_awesome_split_board_left.conf` - Configuration elements only affect left half - `my_awesome_split_board_right.conf` - Configuration elements only affect right half -For proper communication between keyboard halves and that between the central half and the computer, -the **the central and peripheral halves of the keyboard must be defined**. This can be seen below. - -``` -// Central Half (Usually the left side: my_awesome_split_board_left.conf) - -CONFIG_ZMK_SPLIT=y -CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y -``` - -``` -// Peripheral Half (Usually the right side: my_awesome_split_board_right.conf) - -CONFIG_ZMK_SPLIT=y -CONFIG_ZMK_SPLIT_BLE_ROLE_Peripheral=y -``` - -Using the .conf file that affects both halves of a split board would be for adding features like deep-sleep or rotary encoders. +In most case you'll only need to use the .conf file that affects both halves of a split board. It's used for adding features like deep-sleep or rotary encoders. ``` // my_awesome_split_board.conf diff --git a/docs/docs/development/usb-logging.md b/docs/docs/development/usb-logging.md index 420b98d1..4149ef43 100644 --- a/docs/docs/development/usb-logging.md +++ b/docs/docs/development/usb-logging.md @@ -20,8 +20,8 @@ It is recommended to only enable logging when needed, and not leaving it on by d ## Kconfig -The following KConfig values need to be set, either by copy and pasting into the `app/prj.conf` file, or by running -`west build -t menuconfig` and manually enabling the various settings in that UI. +The `CONFIG_ZMK_USB_LOGGING` KConfig value needs to be set, either by copy and pasting into the `app/prj.conf` file, or by running +`west build -t menuconfig` and manually enabling the setting in that UI at `ZMK -> Advanced -> USB Logging`. :::note If you are debugging your own keyboard in your [user config repository](./user-setup.md), use @@ -32,27 +32,7 @@ for you successfully. ``` # Turn on logging, and set ZMK logging to debug output -CONFIG_LOG=y -CONFIG_ZMK_LOG_LEVEL_DBG=y - -# Turn on USB CDC ACM device -CONFIG_USB=y -CONFIG_USB_DEVICE_STACK=y -CONFIG_USB_CDC_ACM=y -CONFIG_USB_CDC_ACM_RINGBUF_SIZE=1024 -CONFIG_USB_CDC_ACM_DEVICE_NAME="CDC_ACM" -CONFIG_USB_CDC_ACM_DEVICE_COUNT=1 - -# Enable serial console -CONFIG_SERIAL=y -CONFIG_CONSOLE=y -CONFIG_UART_INTERRUPT_DRIVEN=y -CONFIG_UART_LINE_CTRL=y - -# Enable USB UART, and set the console device -CONFIG_UART_CONSOLE=y -CONFIG_USB_UART_CONSOLE=y -CONFIG_UART_CONSOLE_ON_DEV_NAME="CDC_ACM_0" +CONFIG_ZMK_USB_LOGGING=y ``` ## Viewing Logs diff --git a/docs/docs/hardware.md b/docs/docs/hardware.md index 244bdd60..0dc17782 100644 --- a/docs/docs/hardware.md +++ b/docs/docs/hardware.md @@ -25,6 +25,7 @@ That being said, there are currently only a few specific [boards](/docs/faq#what - [Kyria](https://splitkb.com/products/kyria-pcb-kit) (`kyria_left` and `kyria_right`) - [Corne](https://github.com/foostan/crkbd) (`corne_left` and `corne_right`) +- [Helix](https://github.com/mcmadhatter/helix) (`helix_left` and `helix_right`) - [Lily58](https://github.com/kata0510/Lily58) (`lily58_left` and `lily58_right`) - [Sofle](https://github.com/josefadamcik/SofleKeyboard) (`sofle_left` and `sofle_right`) - [Splitreus62](https://github.com/Na-Cly/splitreus62) (`splitreus62_left` and `splitreus62_right`) diff --git a/docs/docs/intro.md b/docs/docs/intro.md index 564eedb7..57670ea0 100644 --- a/docs/docs/intro.md +++ b/docs/docs/intro.md @@ -23,17 +23,17 @@ ZMK is currently missing some features found in other popular firmware. This tab | [Keyboard Codes](codes/#keyboard) | ✅ | ✅ | ✅ | | [Media](codes/#media-controls) & [Consumer](codes/#consumer-controls) Codes | ✅ | ✅ | ✅ | | [Encoders](features/encoders)[^1] | ✅ | | ✅ | -| [OLED Display Support](features/displays)[^2] | 🚧 | 🚧 | ✅ | +| [Display Support](features/displays)[^2] | 🚧 | 🚧 | ✅ | | [RGB Underglow](features/underglow) | ✅ | ✅ | ✅ | -| One Shot Keys | 🚧 | ✅ | ✅ | -| Combo Keys | 🚧 | | ✅ | +| One Shot Keys | ✅ | ✅ | ✅ | +| [Combo Keys](https://github.com/zmkfirmware/zmk/pull/504) | 🚧 | | ✅ | | Macros | 🚧 | ✅ | ✅ | -| Mouse Keys | | ✅ | ✅ | +| Mouse Keys | 💡 | ✅ | ✅ | | Low Active Power Usage | ✅ | | | -| [Low Power Sleep States](https://github.com/zmkfirmware/zmk/pull/211) | 🚧 | ✅ | | -| [Low Power Mode (VCC Shutoff)](https://github.com/zmkfirmware/zmk/pull/242) | 🚧 | | | -| [Battery Reporting](https://github.com/zmkfirmware/zmk/issues/47) | 🚧 | ✅ | | -| Shell over BLE | | | | +| Low Power Sleep States | ✅ | ✅ | | +| [Low Power Mode (VCC Shutoff)](behaviors/power) | ✅ | | | +| Battery Reporting | ✅ | ✅ | | +| Shell over BLE | 💡 | | | | Realtime Keymap Updating | 💡 | | ✅ | | AVR/8 Bit | | | ✅ | | [Wide Range of ARM Chips Supported](https://docs.zephyrproject.org/latest/boards/index.html) | ✅ | | | diff --git a/docs/docs/troubleshooting.md b/docs/docs/troubleshooting.md index 0fe0b665..23403eec 100644 --- a/docs/docs/troubleshooting.md +++ b/docs/docs/troubleshooting.md @@ -54,7 +54,10 @@ Since then, a much simpler procedure of performing a bluetooth reset for split k **New Procedure:** -1. Log into Github and download the "settings clear" UF2 image from the [latest build in Github Actions](https://github.com/zmkfirmware/zmk/actions?query=workflow%3ABuild+branch%3Amain) +1. [Open the GitHub `Actions` tab and select the `Build` workflow](https://github.com/zmkfirmware/zmk/actions?query=workflow%3ABuild+branch%3Amain). +1. Select the top 'result' on that page. +1. From the next page under "Artifacts", download the `$boardname-settings_reset-zmk` zip file. +1. Unzip the downloaded file. 1. Put each half of the split keyboard into bootloader mode 1. Flash one of the halves of the split with the "settings clear" UF2 image from step 1. Immediately after flashing "settings clear" to the chosen half, immediately put it into bootloader mode to avoid accidental bonding between the halves. diff --git a/docs/static/setup.ps1 b/docs/static/setup.ps1 index ffd938f4..bcea9f7a 100644 --- a/docs/static/setup.ps1 +++ b/docs/static/setup.ps1 @@ -1,5 +1,4 @@ # Copyright (c) 2020 The ZMK Contributors -# # SPDX-License-Identifier: MIT $ErrorActionPreference = "Stop" @@ -91,9 +90,9 @@ Write-Host "Keyboard Shield Selection:" $prompt = "Pick a keyboard" # TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos. -$options = "Kyria", "Lily58", "Corne", "Splitreus62", "Sofle", "Iris", "Reviung41", "RoMac", "RoMac+", "makerdiary M60", "Microdox", "TG4X", "QAZ", "NIBBLE", "Jorne", "Jian", "CRBN", "Tidbit", "Eek!", "BFO-9000" -$names = "kyria", "lily58", "corne", "splitreus62", "sofle", "iris", "reviung41", "romac", "romac_plus", "m60", "microdox", "tg4x", "qaz", "nibble", "jorne", "jian", "crbn", "tidbit", "eek", "bfo9000" -$splits = "y", "y", "y", "y", "y", "y", "n", "n", "n", "n", "y", "n", "n", "n", "y", "y", "n", "n", "n", "n" +$options = "Kyria", "Lily58", "Corne", "Splitreus62", "Sofle", "Iris", "Reviung41", "RoMac", "RoMac+", "makerdiary M60", "Microdox", "TG4X", "QAZ", "NIBBLE", "Jorne", "Jian", "CRBN", "Tidbit", "Eek!", "BFO-9000", "Helix" +$names = "kyria", "lily58", "corne", "splitreus62", "sofle", "iris", "reviung41", "romac", "romac_plus", "m60", "microdox", "tg4x", "qaz", "nibble", "jorne", "jian", "crbn", "tidbit", "eek", "bfo9000", "helix" +$splits = "y", "y", "y", "y", "y", "y", "n", "n", "n", "n", "y", "n", "n", "n", "y", "y", "n", "n", "n", "n", "y" $choice = Get-Choice-From-Options -Options $options -Prompt $prompt $shield_title = $($options[$choice]) diff --git a/docs/static/setup.sh b/docs/static/setup.sh index 486bb06c..8ac39435 100644 --- a/docs/static/setup.sh +++ b/docs/static/setup.sh @@ -1,7 +1,6 @@ #!/bin/bash # Copyright (c) 2020 The ZMK Contributors -# # SPDX-License-Identifier: MIT set -e @@ -92,7 +91,7 @@ echo "" echo "Keyboard Shield Selection:" prompt="Pick an keyboard:" -options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle" "Iris" "Reviung41" "RoMac" "RoMac+" "makerdiary M60" "Microdox" "TG4X" "QAZ" "Jorne" "Jian" "CRBN" "Tidbit" "Eek!" "BF0-9000") +options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle" "Iris" "Reviung41" "RoMac" "RoMac+" "makerdiary M60" "Microdox" "TG4X" "QAZ" "NIBBLE" "Jorne" "Jian" "CRBN" "Tidbit" "Eek!" "BF0-9000" "Helix") PS3="$prompt " # TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos. @@ -120,7 +119,8 @@ select opt in "${options[@]}" "Quit"; do 17 ) shield_title="CRBN" shield="crbn"; split="n"; break;; 18 ) shield_title="Tidbit" shield="tidbit"; split="n" break;; 19 ) shield_title="Eek!" shield="eek"; split="n" break;; - 17 ) shield_title="BFO-9000" shield="bfo9000"; split="y"; break;; + 20 ) shield_title="BFO-9000" shield="bfo9000"; split="y"; break;; + 21 ) shield_title="Helix" shield="helix"; split="y"; break;; # Add link to docs on adding your own custom shield in your ZMK config! # $(( ${#options[@]}+1 )) ) echo "Other!"; break;;