diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0aee5d7f..d7011283 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,12 +23,17 @@ jobs: - nrfmicro_13 - proton_c shield: + - bfo9000_left + - bfo9000_right - boardsource3x4 - corne_left - corne_right - cradio_left - cradio_right - crbn + - eek + - helix_left + - helix_right - iris_left - iris_right - jian_left @@ -57,6 +62,7 @@ jobs: - tidbit cmake-args: [""] include: + - board: bdn9_rev2 - board: dz60rgb_rev1 - board: nrf52840_m2 shield: m60 diff --git a/app/boards/arm/bdn9/Kconfig.board b/app/boards/arm/bdn9/Kconfig.board new file mode 100644 index 00000000..a67e9a51 --- /dev/null +++ b/app/boards/arm/bdn9/Kconfig.board @@ -0,0 +1,8 @@ +# keeb.io BDN9 board configuration + +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config BOARD_BDN9 + bool "BDN9 rev2" + depends on SOC_STM32F072XB diff --git a/app/boards/arm/bdn9/Kconfig.defconfig b/app/boards/arm/bdn9/Kconfig.defconfig new file mode 100644 index 00000000..9af7ca4c --- /dev/null +++ b/app/boards/arm/bdn9/Kconfig.defconfig @@ -0,0 +1,17 @@ +# keeb.io BDN9 board configuration + +# Copyright (c) 2020 Pete Johanson +# SPDX-License-Identifier: MIT + +if BOARD_BDN9 + +config BOARD + default "bdn9_rev2" + +config ZMK_KEYBOARD_NAME + default "BDN9 Rev2" + +config ZMK_USB + default y + +endif # BOARD_BDN9 diff --git a/app/boards/arm/bdn9/README.md b/app/boards/arm/bdn9/README.md new file mode 100644 index 00000000..7b4ef441 --- /dev/null +++ b/app/boards/arm/bdn9/README.md @@ -0,0 +1,37 @@ +# Building ZMK for the BDN9 + +Some general notes/commands for building standard BDN9 layouts from the assembly documentation. + +## Standard Build + +``` +west build -p -d build/bdn9 --board bdn9_rev2 +``` + +## Encoder Notes + +If you built your BDN9 with encoders, you'll need to change the following in your local BDN9 config or add them to the end of the file. + +``` +CONFIG_EC11=y +CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y +``` + +Then, you'll want to uncomment the necessary encoder lines in your `bdn9_rev2.keymap`: + +``` +&sensors { + status = "okay"; + sensors = <&left_encoder &mid_encoder &right_encoder>; +}; + +&left_encoder { status = "okay"; }; +&mid_encoder { status = "okay"; }; +&right_encoder { status = "okay"; }; +``` + +And then add the correct `sensor-bindings` array to each keymap layer, e.g.: + +``` +sensor-bindings = <&inc_dec_kp PG_UP PG_DN &inc_dec_kp M_VOLU M_VOLD &inc_dec_kp C_PREV C_NEXT>; +``` diff --git a/app/boards/arm/bdn9/bdn9_rev2.dts b/app/boards/arm/bdn9/bdn9_rev2.dts new file mode 100644 index 00000000..43854a16 --- /dev/null +++ b/app/boards/arm/bdn9/bdn9_rev2.dts @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +/dts-v1/; +#include + +/ { + model = "Keeb.io BDN9 rev2"; + compatible = "keebio,bdn9", "st,stm32f072"; + + chosen { + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zmk,kscan = &kscan; + /* TODO: Enable once the GPIO bitbanging driver supports STM32 + zmk,underglow = &led_strip; + */ + }; + + kscan: kscan { + compatible = "zmk,kscan-gpio-direct"; + label = "KSCAN"; + + input-gpios + = <&gpiob 12 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpiob 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpiob 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpiob 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpiob 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpiob 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpioa 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpiof 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&gpiof 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; + }; + + /* + led_strip: ws2812 { + compatible = "worldsemi,ws2812-gpio"; + label = "WS2812"; + + in-gpios = <&gpiob 15 0>; + + chain-length = <9>; + }; + */ + + left_encoder: encoder_left { + compatible = "alps,ec11"; + label = "LEFT_ENCODER"; + a-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&gpioa 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + resolution = <4>; + status = "disabled"; + }; + mid_encoder: encoder_mid { + compatible = "alps,ec11"; + label = "MID_ENCODER"; + a-gpios = <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + resolution = <4>; + status = "disabled"; + }; + right_encoder: encoder_right { + compatible = "alps,ec11"; + label = "RIGHT_ENCODER"; + a-gpios = <&gpioa 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&gpiob 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + resolution = <4>; + status = "disabled"; + }; + + sensors: sensors { + compatible = "zmk,keymap-sensors"; + status = "disabled"; + sensors = <>; + }; +}; + +&usb { + status = "okay"; +}; + +&rtc { + status = "okay"; +}; + +&flash0 { + /* + * For more information, see: + * http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions + */ + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + /* Set 6Kb of storage at the end of the 128Kb of flash */ + storage_partition: partition@3e800 { + label = "storage"; + reg = <0x0001e800 0x00001800>; + }; + }; +}; diff --git a/app/boards/arm/bdn9/bdn9_rev2.keymap b/app/boards/arm/bdn9/bdn9_rev2.keymap new file mode 100644 index 00000000..50c273c7 --- /dev/null +++ b/app/boards/arm/bdn9/bdn9_rev2.keymap @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include + +/* Uncomment and keep whatever encoders are on your BDN9 +&sensors { + status = "okay"; + sensors = <&left_encoder &mid_encoder &right_encoder>; +}; +*/ + +// Uncomment each encoder installed on your BDN9 +// &left_encoder { status = "okay"; }; +// &mid_encoder { status = "okay"; }; +// &right_encoder { status = "okay"; }; + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &kp HOME &kp K_PP &kp END + &kp PG_UP &kp UP &kp PG_DN + &kp LEFT &kp DOWN &kp RIGHT + >; + /* Uncomment and add necessary bindings. This examples is for one encoder + sensor-bindings = <&inc_dec_kp PG_UP PG_DN>; + */ + }; + }; +}; + diff --git a/app/boards/arm/bdn9/bdn9_rev2.yaml b/app/boards/arm/bdn9/bdn9_rev2.yaml new file mode 100644 index 00000000..bbae8833 --- /dev/null +++ b/app/boards/arm/bdn9/bdn9_rev2.yaml @@ -0,0 +1,14 @@ +identifier: bdn9 +name: keeb.io BDN9 +type: mcu +arch: arm +toolchain: + - zephyr + - gnuarmemb + - xtools +ram: 40 +supported: + - encoders + - switches + - underglow + - per_key diff --git a/app/boards/arm/bdn9/bdn9_rev2_defconfig b/app/boards/arm/bdn9/bdn9_rev2_defconfig new file mode 100644 index 00000000..139cf853 --- /dev/null +++ b/app/boards/arm/bdn9/bdn9_rev2_defconfig @@ -0,0 +1,29 @@ +# SPDX-License-Identifier: MIT + +CONFIG_SOC_SERIES_STM32F0X=y +CONFIG_SOC_STM32F072XB=y +# 72MHz system clock +CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000 + +# Floating Point Options +CONFIG_FPU=y + +# enable GPIO +CONFIG_GPIO=y + +# Needed to reduce this to size that will fit on F072 +CONFIG_HEAP_MEM_POOL_SIZE=1024 + +# clock configuration +CONFIG_CLOCK_CONTROL=y + +# Clock configuration for Cube Clock control driver +CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y +# use HSI as PLL input +CONFIG_CLOCK_STM32_PLL_SRC_HSI=y +# produce 72MHz clock at PLL output +CONFIG_CLOCK_STM32_PLL_PREDIV=1 +CONFIG_CLOCK_STM32_PLL_MULTIPLIER=12 +CONFIG_CLOCK_STM32_AHB_PRESCALER=1 +CONFIG_CLOCK_STM32_APB1_PRESCALER=2 +CONFIG_CLOCK_STM32_APB2_PRESCALER=1 diff --git a/app/boards/arm/bdn9/board.cmake b/app/boards/arm/bdn9/board.cmake new file mode 100644 index 00000000..4f430e12 --- /dev/null +++ b/app/boards/arm/bdn9/board.cmake @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: MIT + +board_runner_args(dfu-util "--pid=0483:df11" "--alt=0" "--dfuse") +board_runner_args(jlink "--device=STM32F072CB" "--speed=4000") + +include(${ZEPHYR_BASE}/boards/common/dfu-util.board.cmake) +include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) 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.dts b/app/boards/arm/nrf52840_m2/nrf52840_m2.dts index f9354edf..e090842c 100644 --- a/app/boards/arm/nrf52840_m2/nrf52840_m2.dts +++ b/app/boards/arm/nrf52840_m2/nrf52840_m2.dts @@ -1,5 +1,6 @@ /* * Copyright (c) 2020 The ZMK Contributors + * * SPDX-License-Identifier: MIT */ 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 new file mode 100644 index 00000000..1251113f --- /dev/null +++ b/app/boards/shields/bfo9000/Kconfig.defconfig @@ -0,0 +1,29 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if SHIELD_BFO9000_LEFT + +config ZMK_KEYBOARD_NAME + default "BFO9000 Left" + +config ZMK_SPLIT_BLE_ROLE_CENTRAL + default y + +endif + +if SHIELD_BFO9000_RIGHT + +config ZMK_KEYBOARD_NAME + default "BFO9000 Right" + +config USB + default y + +endif + +if SHIELD_BFO9000_LEFT || SHIELD_BFO9000_RIGHT + +config ZMK_SPLIT + default y + +endif \ No newline at end of file diff --git a/app/boards/shields/bfo9000/Kconfig.shield b/app/boards/shields/bfo9000/Kconfig.shield new file mode 100644 index 00000000..4750e43a --- /dev/null +++ b/app/boards/shields/bfo9000/Kconfig.shield @@ -0,0 +1,8 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config SHIELD_BFO9000_LEFT + def_bool $(shields_list_contains,bfo9000_left) + +config SHIELD_BFO9000_RIGHT + def_bool $(shields_list_contains,bfo9000_right) diff --git a/app/boards/shields/bfo9000/bfo9000.conf b/app/boards/shields/bfo9000/bfo9000.conf new file mode 100644 index 00000000..e69de29b diff --git a/app/boards/shields/bfo9000/bfo9000.dtsi b/app/boards/shields/bfo9000/bfo9000.dtsi new file mode 100644 index 00000000..33b364e1 --- /dev/null +++ b/app/boards/shields/bfo9000/bfo9000.dtsi @@ -0,0 +1,44 @@ + /* + * 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 = <18>; + rows = <6>; + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,15) RC(0,16) RC(0,17) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,14) RC(1,15) RC(1,16) RC(1,17) + RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) RC(2,14) RC(2,15) RC(2,16) RC(2,17) + 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(3,14) RC(3,15) RC(3,16) RC(3,17) + 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) RC(4,14) RC(4,15) RC(4,16) RC(4,17) + RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4) RC(5,5) RC(5,6) RC(5,7) RC(5,8) RC(5,9) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14) RC(5,15) RC(5,16) RC(5,17) + >; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + + diode-direction = "col2row"; + row-gpios + = <&pro_micro_d 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&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)> + ; + + }; +}; \ No newline at end of file diff --git a/app/boards/shields/bfo9000/bfo9000.keymap b/app/boards/shields/bfo9000/bfo9000.keymap new file mode 100644 index 00000000..fe904931 --- /dev/null +++ b/app/boards/shields/bfo9000/bfo9000.keymap @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include +#include +#include + +#define DEFAULT 0 +#define LOWER 1 + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + // | Esc | Vol Up | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Del | + // | Home | Vol Dn | ` | 1 | 2 | 3 | 4 | 5 | 6 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bk Spc | + // | End | Tab | Tab | Q | W | E | R | T | Y | T | Y | U | I | O | P | [ | ] | \ | + // | Pg Up | Caps | Ctrl | A | S | D | F | G | H | G | H | J | K | L | ; | ' | Enter | Enter | + // | Pg Dn | Up | Shift | Z | X | C | V | B | N | B | N | M | , | . | / | Shift | Up | | + // | Left | Dn | Right | Ctrl | Alt | Win | Spc | Spc | Enter | Bk Spc | Spc | Spc | Win | Alt | Ctrl | Left | Dn | Right | + bindings = < + &kp ESC &kp C_VOL_UP &kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL + &kp HOME &kp C_VOL_DN &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC + &kp END &kp TAB &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH + &kp PG_UP &kp CAPS &kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp APOS &kp ENTER &kp ENTER + &kp PG_DN &kp UP &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp B &kp N &kp M &kp COMMA &kp DOT &kp SLASH &kp RSHFT &kp UP &mo LOWER + &kp LEFT &kp DOWN &kp RIGHT &kp LCTRL &kp LALT &kp LMETA &kp SPACE &kp SPACE &kp ENTER &kp BSPC &kp SPACE &kp SPACE &kp RMETA &kp RALT &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT + >; + }; + + lower_layer { + // | | | | | | | | | | | | | | | | | | | + // | | | | | | | | | | | | | | | | | | | + // | | | | | | | | | | | | | | | | | | | + // | | | | | | | | | | | | | | | | | | | + // | | | | | | | | | | | | | | | | | | | + // | | | | | | | | | | | | | | | | | | | + bindings = < + &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 5 &bt BT_SEL 6 &bt BT_SEL 7 &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 5 &bt BT_SEL 6 &bt BT_SEL 7 + &out OUT_USB &out OUT_BLE &trans &trans &trans &trans &trans &trans &trans &out OUT_USB &out OUT_BLE &trans &trans &trans &trans &trans &trans &trans + &ext_power EP_ON &ext_power EP_OFF &trans &trans &trans &trans &trans &trans &trans &ext_power EP_ON &ext_power EP_OFF &trans &trans &trans &trans &trans &trans &trans + &reset &bootloader &trans &trans &trans &trans &trans &trans &trans &reset &bootloader &trans &trans &trans &trans &trans &trans &trans + &rgb_ug RGB_TOG &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &rgb_ug RGB_EFF &trans &trans &trans &rgb_ug RGB_TOG &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &rgb_ug RGB_EFF &trans &trans &trans + &trans &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &rgb_ug RGB_EFR &trans &trans &trans &trans &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &rgb_ug RGB_EFR &trans &trans &trans + >; + }; + }; +}; diff --git a/app/boards/shields/bfo9000/bfo9000_left.conf b/app/boards/shields/bfo9000/bfo9000_left.conf new file mode 100644 index 00000000..e69de29b diff --git a/app/boards/shields/bfo9000/bfo9000_left.overlay b/app/boards/shields/bfo9000/bfo9000_left.overlay new file mode 100644 index 00000000..777f0835 --- /dev/null +++ b/app/boards/shields/bfo9000/bfo9000_left.overlay @@ -0,0 +1,21 @@ + /* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "bfo9000.dtsi" + +&kscan0 { + col-gpios + = <&pro_micro_d 9 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 10 GPIO_ACTIVE_HIGH> + , <&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/bfo9000/bfo9000_right.conf b/app/boards/shields/bfo9000/bfo9000_right.conf new file mode 100644 index 00000000..e69de29b diff --git a/app/boards/shields/bfo9000/bfo9000_right.overlay b/app/boards/shields/bfo9000/bfo9000_right.overlay new file mode 100644 index 00000000..ab3fb55f --- /dev/null +++ b/app/boards/shields/bfo9000/bfo9000_right.overlay @@ -0,0 +1,25 @@ + /* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include "bfo9000.dtsi" + +&default_transform { + col-offset = <9>; +}; + +&kscan0 { + col-gpios + = <&pro_micro_d 9 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 10 GPIO_ACTIVE_HIGH> + , <&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/bfo9000/readme.md b/app/boards/shields/bfo9000/readme.md new file mode 100644 index 00000000..1e91fdcf --- /dev/null +++ b/app/boards/shields/bfo9000/readme.md @@ -0,0 +1,13 @@ +# [BFO-9000](https://keeb.io/products/bfo-9000-keyboard-customizable-full-size-split-ortholinear) + +Customizable full-size split ortholinear. + +## Features + +* Compatible with MX-compatible, Alps-compatible, and Kailh Low-Profile Choc switches. +* Breakoff pieces to allow for 4 to 6 rows and 7 to 9 columns. +* RGB LED connections + +## Hardware Notes + +[Included default keymap](http://www.keyboard-layout-editor.com/#/gists/51293c31afcd5f1765e8f413a46bfcf8) \ No newline at end of file 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/eek/Kconfig.defconfig b/app/boards/shields/eek/Kconfig.defconfig new file mode 100644 index 00000000..b84dd288 --- /dev/null +++ b/app/boards/shields/eek/Kconfig.defconfig @@ -0,0 +1,9 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if SHIELD_EEK + +config ZMK_KEYBOARD_NAME + default "eek! ~ Keyboard" + +endif \ No newline at end of file diff --git a/app/boards/shields/eek/Kconfig.shield b/app/boards/shields/eek/Kconfig.shield new file mode 100644 index 00000000..220b63ea --- /dev/null +++ b/app/boards/shields/eek/Kconfig.shield @@ -0,0 +1,8 @@ + # + # Copyright (c) 2020 The ZMK Contributors + # + # SPDX-License-Identifier: MIT + # + +config SHIELD_EEK + def_bool $(shields_list_contains,eek) \ No newline at end of file diff --git a/app/boards/shields/eek/eek.conf b/app/boards/shields/eek/eek.conf new file mode 100644 index 00000000..e69de29b diff --git a/app/boards/shields/eek/eek.keymap b/app/boards/shields/eek/eek.keymap new file mode 100644 index 00000000..f54dc013 --- /dev/null +++ b/app/boards/shields/eek/eek.keymap @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + + default { +// -------------------------------------------------------------------------------------------------------------------------------------------------------------------- +// Q | W | E | R | T | | Y | U | I | O | P | +// A | S | D | F | G | | H | J | K | L | ; | +// Lsft/Z| X | C | V | B | | N | M | , | . |Rsft//| +// | LCTL | Bspc/LMOD | SPC | | Del/Num | Ent | Sym | + bindings = < + &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P + &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI + &mt LSHFT Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &mt RSHFT FSLH + &kp LCTRL &mt LGUI BSPC &kp SPACE < 1 DEL &kp RET &mo 2 + >; + }; + numbers { +// -------------------------------------------------------------------------------------------------------------------------------------------------------------------- +// 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | +// TAB | BT_PRV | BT_NXT | VOL-| VOL+| | < | v | ∧ | > | ' | +// Lsft| BT_SEL0| BT_CLR | MUTE| | | HOME| END | PGUP| PGDN| Rsft| +// | LCTL | LMOD| LALT | | Num | | BL-reset | + bindings = < + &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 + &kp TAB &bt BT_PRV &bt BT_NXT &kp C_VOL_DN &kp C_VOL_UP &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp SQT + &kp LSHFT &bt BT_SEL 0 &bt BT_CLR &kp C_MUTE &none &kp HOME &kp END &kp PG_UP &kp PG_DN &kp RSHFT + &kp LCTRL &kp LGUI &kp LALT &trans &none &bootloader + >; + }; + symbols { +// -------------------------------------------------------------------------------------------------------------------------------------------------------------------- +// ESC | F1 | F2 | F3 | F4 | | OUT_USB | OUT_BLE | | = | - | +// CAPS| F5 | F6 | F7 | F8 | | [ | ] | | ` | \ | +// LSFT| F9 | F10 | F11 | F12 | | | | | | RSFT | +// | LCTL | LMOD| LALT | | RESET | | SYM | + bindings = < + &kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &out OUT_USB &out OUT_BLE &none &kp EQUAL &kp MINUS + &kp CAPS &kp F5 &kp F6 &kp F7 &kp F8 &kp LBKT &kp RBKT &none &kp GRAVE &kp BSLH + &kp LSHFT &kp F9 &kp F10 &kp F11 &kp F12 &none &none &none &kp RSHFT + &kp LCTRL &kp LGUI &kp LALT &reset &none &trans + >; + }; + }; +}; \ No newline at end of file diff --git a/app/boards/shields/eek/eek.overlay b/app/boards/shields/eek/eek.overlay new file mode 100644 index 00000000..11b98686 --- /dev/null +++ b/app/boards/shields/eek/eek.overlay @@ -0,0 +1,52 @@ +/* + * 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 = <10>; + rows = <4>; + map = < + RC(0,9) RC(0,8) RC(0,7) RC(0,6) RC(0,5) RC(0,4) RC(0,3) RC(0,2) RC(0,1) RC(0,0) + RC(1,9) RC(1,8) RC(1,7) RC(1,6) RC(1,5) RC(1,4) RC(1,3) RC(1,2) RC(1,1) RC(1,0) + RC(2,9) RC(2,8) RC(2,7) RC(2,6) RC(2,5) RC(2,4) RC(2,3) RC(2,2) RC(2,1) RC(2,0) + RC(3,7) RC(3,6) RC(3,5) RC(3,4) RC(3,3) RC(3,2) + >; + }; + + kscan0: kscan_0 { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + diode-direction = "col2row"; + + col-gpios + = <&pro_micro_d 4 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 5 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 10 GPIO_ACTIVE_HIGH> + , <&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> + ; + + row-gpios + = <&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)> + , <&pro_micro_d 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; +}; \ No newline at end of file diff --git a/app/boards/shields/eek/readme.md b/app/boards/shields/eek/readme.md new file mode 100644 index 00000000..2a1b46b4 --- /dev/null +++ b/app/boards/shields/eek/readme.md @@ -0,0 +1 @@ +A fixed split 36key-board with a typing angle of 90 degrees distributed by cbkbd diff --git a/app/boards/shields/helix/Kconfig.defconfig b/app/boards/shields/helix/Kconfig.defconfig new file mode 100644 index 00000000..f58684a8 --- /dev/null +++ b/app/boards/shields/helix/Kconfig.defconfig @@ -0,0 +1,29 @@ +# 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" + +config USB + default y + +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/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/jorne/jorne.dtsi b/app/boards/shields/jorne/jorne.dtsi index 67ea9d1c..c782d520 100644 --- a/app/boards/shields/jorne/jorne.dtsi +++ b/app/boards/shields/jorne/jorne.dtsi @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 The ZMK Contributors + * Copyright (c) 2020 The ZMK Contributors * * SPDX-License-Identifier: MIT */ diff --git a/app/boards/shields/jorne/jorne_left.overlay b/app/boards/shields/jorne/jorne_left.overlay index ca6ad431..065a23da 100644 --- a/app/boards/shields/jorne/jorne_left.overlay +++ b/app/boards/shields/jorne/jorne_left.overlay @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 The ZMK Contributors + * Copyright (c) 2020 The ZMK Contributors * * SPDX-License-Identifier: MIT */ diff --git a/app/boards/shields/jorne/jorne_right.overlay b/app/boards/shields/jorne/jorne_right.overlay index 6ae232eb..5a0be2cc 100644 --- a/app/boards/shields/jorne/jorne_right.overlay +++ b/app/boards/shields/jorne/jorne_right.overlay @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 The ZMK Contributors + * Copyright (c) 2020 The ZMK Contributors * * SPDX-License-Identifier: MIT */ diff --git a/app/boards/shields/lily58/boards/nice_nano.overlay b/app/boards/shields/lily58/boards/nice_nano.overlay new file mode 100644 index 00000000..0d28726d --- /dev/null +++ b/app/boards/shields/lily58/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 = <5>; /* number of LEDs */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; 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/quefrency/Kconfig.defconfig b/app/boards/shields/quefrency/Kconfig.defconfig index b4041cbf..5a7d964a 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 diff --git a/app/boards/shields/splitreus62/Kconfig.defconfig b/app/boards/shields/splitreus62/Kconfig.defconfig index 988041c0..26c2e937 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 diff --git a/app/drivers/zephyr/dts/bindings/sensor/zmk,battery-voltage-divider.yaml b/app/drivers/zephyr/dts/bindings/sensor/zmk,battery-voltage-divider.yaml index 3f391d78..c4c6f80c 100644 --- a/app/drivers/zephyr/dts/bindings/sensor/zmk,battery-voltage-divider.yaml +++ b/app/drivers/zephyr/dts/bindings/sensor/zmk,battery-voltage-divider.yaml @@ -11,4 +11,3 @@ properties: label: required: true type: string - \ No newline at end of file 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-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-sticky-key.yaml b/app/dts/bindings/behaviors/zmk,behavior-sticky-key.yaml index d73a107d..df9c423c 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-sticky-key.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-sticky-key.yaml @@ -12,4 +12,4 @@ properties: type: phandles required: true release-after-ms: - type: int \ No newline at end of file + type: int 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 5a38a09a..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 @@ -17,4 +15,3 @@ properties: label: type: string required: true - 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/zmk/behavior.h b/app/include/zmk/behavior.h index f00ea4f9..31fb43ed 100644 --- a/app/include/zmk/behavior.h +++ b/app/include/zmk/behavior.h @@ -6,6 +6,9 @@ #pragma once +#define ZMK_BEHAVIOR_OPAQUE 0 +#define ZMK_BEHAVIOR_TRANSPARENT 1 + struct zmk_behavior_binding { char *behavior_dev; uint32_t param1; diff --git a/app/include/zmk/event_manager.h b/app/include/zmk/event_manager.h index 31c53228..e5b6ed53 100644 --- a/app/include/zmk/event_manager.h +++ b/app/include/zmk/event_manager.h @@ -19,6 +19,7 @@ struct zmk_event_header { uint8_t last_listener_index; }; +#define ZMK_EV_EVENT_BUBBLE 0 #define ZMK_EV_EVENT_HANDLED 1 #define ZMK_EV_EVENT_CAPTURED 2 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/sensors.h b/app/include/zmk/sensors.h index 63dcade0..8c6c28b3 100644 --- a/app/include/zmk/sensors.h +++ b/app/include/zmk/sensors.h @@ -7,6 +7,6 @@ #pragma once #define ZMK_KEYMAP_SENSORS_NODE DT_INST(0, zmk_keymap_sensors) -#define ZMK_KEYMAP_HAS_SENSORS DT_NODE_EXISTS(ZMK_KEYMAP_SENSORS_NODE) +#define ZMK_KEYMAP_HAS_SENSORS DT_NODE_HAS_STATUS(ZMK_KEYMAP_SENSORS_NODE, okay) #define ZMK_KEYMAP_SENSORS_LEN DT_PROP_LEN(ZMK_KEYMAP_SENSORS_NODE, sensors) -#define ZMK_KEYMAP_SENSORS_BY_IDX(idx) DT_PHANDLE_BY_IDX(ZMK_KEYMAP_SENSORS_NODE, sensors, idx) \ No newline at end of file +#define ZMK_KEYMAP_SENSORS_BY_IDX(idx) DT_PHANDLE_BY_IDX(ZMK_KEYMAP_SENSORS_NODE, sensors, idx) 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_bt.c b/app/src/behaviors/behavior_bt.c index bfafc4b3..3149c8ce 100644 --- a/app/src/behaviors/behavior_bt.c +++ b/app/src/behaviors/behavior_bt.c @@ -39,7 +39,7 @@ static int behavior_bt_init(const struct device *dev) { return 0; }; static int on_keymap_binding_released(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - return 0; + return ZMK_BEHAVIOR_OPAQUE; } static const struct behavior_driver_api behavior_bt_driver_api = { diff --git a/app/src/behaviors/behavior_ext_power.c b/app/src/behaviors/behavior_ext_power.c index dbc6fd94..18520f7d 100644 --- a/app/src/behaviors/behavior_ext_power.c +++ b/app/src/behaviors/behavior_ext_power.c @@ -43,7 +43,7 @@ static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, static int on_keymap_binding_released(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - return 0; + return ZMK_BEHAVIOR_OPAQUE; } static int behavior_ext_power_init(const struct device *dev) { return 0; }; diff --git a/app/src/behaviors/behavior_hold_tap.c b/app/src/behaviors/behavior_hold_tap.c index d3039605..9b62eb15 100644 --- a/app/src/behaviors/behavior_hold_tap.c +++ b/app/src/behaviors/behavior_hold_tap.c @@ -310,7 +310,7 @@ static int on_hold_tap_binding_pressed(struct zmk_behavior_binding *binding, if (undecided_hold_tap != NULL) { LOG_DBG("ERROR another hold-tap behavior is undecided."); // if this happens, make sure the behavior events occur AFTER other position events. - return 0; + return ZMK_BEHAVIOR_OPAQUE; } struct active_hold_tap *hold_tap = @@ -318,7 +318,7 @@ static int on_hold_tap_binding_pressed(struct zmk_behavior_binding *binding, if (hold_tap == NULL) { LOG_ERR("unable to store hold-tap info, did you press more than %d hold-taps?", ZMK_BHV_HOLD_TAP_MAX_HELD); - return 0; + return ZMK_BEHAVIOR_OPAQUE; } LOG_DBG("%d new undecided hold_tap", event.position); @@ -331,7 +331,7 @@ static int on_hold_tap_binding_pressed(struct zmk_behavior_binding *binding, k_delayed_work_submit(&hold_tap->work, K_MSEC(tapping_term_ms_left)); } - return 0; + return ZMK_BEHAVIOR_OPAQUE; } static int on_hold_tap_binding_released(struct zmk_behavior_binding *binding, @@ -339,7 +339,7 @@ static int on_hold_tap_binding_released(struct zmk_behavior_binding *binding, struct active_hold_tap *hold_tap = find_hold_tap(event.position); if (hold_tap == NULL) { LOG_ERR("ACTIVE_HOLD_TAP_CLEANED_UP_TOO_EARLY"); - return 0; + return ZMK_BEHAVIOR_OPAQUE; } // If these events were queued, the timer event may be queued too late or not at all. @@ -379,7 +379,7 @@ static int on_hold_tap_binding_released(struct zmk_behavior_binding *binding, clear_hold_tap(hold_tap); } - return 0; + return ZMK_BEHAVIOR_OPAQUE; } static const struct behavior_driver_api behavior_hold_tap_driver_api = { @@ -392,16 +392,16 @@ static int position_state_changed_listener(const struct zmk_event_header *eh) { if (undecided_hold_tap == NULL) { LOG_DBG("%d bubble (no undecided hold_tap active)", ev->position); - return 0; + return ZMK_EV_EVENT_BUBBLE; } if (undecided_hold_tap->position == ev->position) { if (ev->state) { // keydown LOG_ERR("hold-tap listener should be called before before most other listeners!"); - return 0; + return ZMK_EV_EVENT_BUBBLE; } else { // keyup LOG_DBG("%d bubble undecided hold-tap keyrelease event", undecided_hold_tap->position); - return 0; + return ZMK_EV_EVENT_BUBBLE; } } @@ -418,7 +418,7 @@ static int position_state_changed_listener(const struct zmk_event_header *eh) { // we'll catch modifiers later in modifier_state_changed_listener LOG_DBG("%d bubbling %d %s event", undecided_hold_tap->position, ev->position, ev->state ? "down" : "up"); - return 0; + return ZMK_EV_EVENT_BUBBLE; } LOG_DBG("%d capturing %d %s event", undecided_hold_tap->position, ev->position, @@ -439,12 +439,12 @@ static int keycode_state_changed_listener(const struct zmk_event_header *eh) { if (undecided_hold_tap == NULL) { // LOG_DBG("0x%02X bubble (no undecided hold_tap active)", ev->keycode); - return 0; + return ZMK_EV_EVENT_BUBBLE; } if (!only_mods(ev)) { // LOG_DBG("0x%02X bubble (not a mod)", ev->keycode); - return 0; + return ZMK_EV_EVENT_BUBBLE; } // only key-up events will bubble through position_state_changed_listener @@ -461,7 +461,7 @@ int behavior_hold_tap_listener(const struct zmk_event_header *eh) { } else if (is_keycode_state_changed(eh)) { return keycode_state_changed_listener(eh); } - return 0; + return ZMK_EV_EVENT_BUBBLE; } ZMK_LISTENER(behavior_hold_tap, behavior_hold_tap_listener); diff --git a/app/src/behaviors/behavior_none.c b/app/src/behaviors/behavior_none.c index 12542f05..e0eaa159 100644 --- a/app/src/behaviors/behavior_none.c +++ b/app/src/behaviors/behavior_none.c @@ -22,12 +22,12 @@ static int behavior_none_init(const struct device *dev) { return 0; }; static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - return 0; + return ZMK_BEHAVIOR_OPAQUE; } static int on_keymap_binding_released(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - return 0; + return ZMK_BEHAVIOR_OPAQUE; } static const struct behavior_driver_api behavior_none_driver_api = { diff --git a/app/src/behaviors/behavior_reset.c b/app/src/behaviors/behavior_reset.c index cb77a838..e4b720f7 100644 --- a/app/src/behaviors/behavior_reset.c +++ b/app/src/behaviors/behavior_reset.c @@ -30,7 +30,7 @@ static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, // See // https://github.com/adafruit/Adafruit_nRF52_Bootloader/blob/d6b28e66053eea467166f44875e3c7ec741cb471/src/main.c#L107 sys_reboot(cfg->type); - return 0; + return ZMK_BEHAVIOR_OPAQUE; } static const struct behavior_driver_api behavior_reset_driver_api = { diff --git a/app/src/behaviors/behavior_rgb_underglow.c b/app/src/behaviors/behavior_rgb_underglow.c index a0db9a9b..399123a3 100644 --- a/app/src/behaviors/behavior_rgb_underglow.c +++ b/app/src/behaviors/behavior_rgb_underglow.c @@ -50,7 +50,7 @@ static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, static int on_keymap_binding_released(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - return 0; + return ZMK_BEHAVIOR_OPAQUE; } static const struct behavior_driver_api behavior_rgb_underglow_driver_api = { diff --git a/app/src/behaviors/behavior_sticky_key.c b/app/src/behaviors/behavior_sticky_key.c index 643ae48b..15c9e21c 100644 --- a/app/src/behaviors/behavior_sticky_key.c +++ b/app/src/behaviors/behavior_sticky_key.c @@ -138,12 +138,12 @@ static int on_sticky_key_binding_pressed(struct zmk_behavior_binding *binding, if (sticky_key == NULL) { LOG_ERR("unable to store sticky key, did you press more than %d sticky_key?", ZMK_BHV_STICKY_KEY_MAX_HELD); - return 0; + return ZMK_BEHAVIOR_OPAQUE; } press_sticky_key_behavior(sticky_key, event.timestamp); LOG_DBG("%d new sticky_key", event.position); - return 0; + return ZMK_BEHAVIOR_OPAQUE; } static int on_sticky_key_binding_released(struct zmk_behavior_binding *binding, @@ -151,7 +151,7 @@ static int on_sticky_key_binding_released(struct zmk_behavior_binding *binding, struct active_sticky_key *sticky_key = find_sticky_key(event.position); if (sticky_key == NULL) { LOG_ERR("ACTIVE STICKY KEY CLEARED TOO EARLY"); - return 0; + return ZMK_BEHAVIOR_OPAQUE; } if (sticky_key->modified_key_usage_page != 0 && sticky_key->modified_key_keycode != 0) { @@ -167,7 +167,7 @@ static int on_sticky_key_binding_released(struct zmk_behavior_binding *binding, if (ms_left > 0) { k_delayed_work_submit(&sticky_key->release_timer, K_MSEC(ms_left)); } - return 0; + return ZMK_BEHAVIOR_OPAQUE; } static const struct behavior_driver_api behavior_sticky_key_driver_api = { @@ -177,7 +177,7 @@ static const struct behavior_driver_api behavior_sticky_key_driver_api = { static int sticky_key_keycode_state_changed_listener(const struct zmk_event_header *eh) { if (!is_keycode_state_changed(eh)) { - return 0; + return ZMK_EV_EVENT_BUBBLE; } struct keycode_state_changed *ev = cast_keycode_state_changed(eh); for (int i = 0; i < ZMK_BHV_STICKY_KEY_MAX_HELD; i++) { @@ -222,7 +222,7 @@ static int sticky_key_keycode_state_changed_listener(const struct zmk_event_head } } } - return 0; + return ZMK_EV_EVENT_BUBBLE; } ZMK_LISTENER(behavior_sticky_key, sticky_key_keycode_state_changed_listener); diff --git a/app/src/behaviors/behavior_to_layer.c b/app/src/behaviors/behavior_to_layer.c index 3ec1bf81..bb64026d 100644 --- a/app/src/behaviors/behavior_to_layer.c +++ b/app/src/behaviors/behavior_to_layer.c @@ -20,13 +20,14 @@ static int behavior_to_init(const struct device *dev) { return 0; }; static int to_keymap_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { LOG_DBG("position %d layer %d", event.position, binding->param1); - return zmk_keymap_layer_to(binding->param1); + zmk_keymap_layer_to(binding->param1); + return ZMK_BEHAVIOR_OPAQUE; } static int to_keymap_binding_released(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { LOG_DBG("position %d layer %d", event.position, binding->param1); - return 0; + return ZMK_BEHAVIOR_OPAQUE; } static const struct behavior_driver_api behavior_to_driver_api = { diff --git a/app/src/behaviors/behavior_toggle_layer.c b/app/src/behaviors/behavior_toggle_layer.c index 32833775..21daa004 100644 --- a/app/src/behaviors/behavior_toggle_layer.c +++ b/app/src/behaviors/behavior_toggle_layer.c @@ -29,7 +29,7 @@ static int tog_keymap_binding_pressed(struct zmk_behavior_binding *binding, static int tog_keymap_binding_released(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { LOG_DBG("position %d layer %d", event.position, binding->param1); - return 0; + return ZMK_BEHAVIOR_OPAQUE; } static const struct behavior_driver_api behavior_tog_driver_api = { diff --git a/app/src/behaviors/behavior_transparent.c b/app/src/behaviors/behavior_transparent.c index 17a5e436..ca3d279f 100644 --- a/app/src/behaviors/behavior_transparent.c +++ b/app/src/behaviors/behavior_transparent.c @@ -22,12 +22,12 @@ static int behavior_transparent_init(const struct device *dev) { return 0; }; static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - return 1; + return ZMK_BEHAVIOR_TRANSPARENT; } static int on_keymap_binding_released(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - return 1; + return ZMK_BEHAVIOR_TRANSPARENT; } static const struct behavior_driver_api behavior_transparent_driver_api = { diff --git a/app/src/display/widgets/battery_status.c b/app/src/display/widgets/battery_status.c index 346c5193..f1f1c9f1 100644 --- a/app/src/display/widgets/battery_status.c +++ b/app/src/display/widgets/battery_status.c @@ -78,7 +78,7 @@ lv_obj_t *zmk_widget_battery_status_obj(struct zmk_widget_battery_status *widget int battery_status_listener(const struct zmk_event_header *eh) { struct zmk_widget_battery_status *widget; SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_battery_symbol(widget->obj); } - return 0; + return ZMK_EV_EVENT_BUBBLE; } ZMK_LISTENER(widget_battery_status, battery_status_listener) 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/display/widgets/output_status.c b/app/src/display/widgets/output_status.c index 9a725113..716228b7 100644 --- a/app/src/display/widgets/output_status.c +++ b/app/src/display/widgets/output_status.c @@ -82,7 +82,7 @@ lv_obj_t *zmk_widget_output_status_obj(struct zmk_widget_output_status *widget) int output_status_listener(const struct zmk_event_header *eh) { struct zmk_widget_output_status *widget; SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_status_symbol(widget->obj); } - return 0; + return ZMK_EV_EVENT_BUBBLE; } ZMK_LISTENER(widget_output_status, output_status_listener) diff --git a/app/src/ext_power_generic.c b/app/src/ext_power_generic.c index c2e89ab8..d8e7844e 100644 --- a/app/src/ext_power_generic.c +++ b/app/src/ext_power_generic.c @@ -178,7 +178,7 @@ static int ext_power_generic_init(const struct device *dev) { static int ext_power_generic_pm_control(const struct device *dev, uint32_t ctrl_command, void *context, device_pm_cb cb, void *arg) { int rc; - struct ext_power_generic_data *data = dev->driver_data; + struct ext_power_generic_data *data = dev->data; switch (ctrl_command) { case DEVICE_PM_SET_POWER_STATE: 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/split_listener.c b/app/src/split_listener.c index 153ed99d..f475002c 100644 --- a/app/src/split_listener.c +++ b/app/src/split_listener.c @@ -29,7 +29,7 @@ int split_listener(const struct zmk_event_header *eh) { return zmk_split_bt_position_released(ev->position); } } - return 0; + return ZMK_EV_EVENT_BUBBLE; } ZMK_LISTENER(split_listener, split_listener); diff --git a/app/west.yml b/app/west.yml index d49eee9a..ca5efad2 100644 --- a/app/west.yml +++ b/app/west.yml @@ -15,7 +15,6 @@ manifest: # TODO: Rename once upstream offers option like `exclude` or `denylist` name-blacklist: - ci-tools - - hal_atmel - hal_altera - hal_cypress - hal_infineon diff --git a/docs/docs/development/new-shield.md b/docs/docs/development/new-shield.md index 18f8b420..ceb81d10 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,16 @@ if SHIELD_MY_BOARD_RIGHT config ZMK_KEYBOARD_NAME default "My Awesome Keyboard Right" +config USB + default y + +endif + +if SHIELD_MY_BOARD_LEFT || SHIELD_MY_BOARD_RIGHT + +config ZMK_SPLIT + default y + endif ``` @@ -203,6 +219,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 +281,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/hardware.md b/docs/docs/hardware.md index 406b9ad8..0dc17782 100644 --- a/docs/docs/hardware.md +++ b/docs/docs/hardware.md @@ -19,11 +19,13 @@ That being said, there are currently only a few specific [boards](/docs/faq#what - [nrfMicro](https://github.com/joric/nrfmicro) (`nrfmicro_13`, `nrfmicro_11`, `nrfmicro_11_flipped`) - [BlueMicro840](https://store.jpconstantineau.com/#/group/bluemicro) (`bluemicro840_v1`) - [QMK Proton-C](https://qmk.fm/proton-c/) (`proton_c`) +- [BDN9 Rev2](https://keeb.io/products/bdn9-rev-2-3x3-9-key-macropad-rotary-encoder-and-rgb) (`bdn9_rev2`) ## Keyboard Shields - [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`) @@ -36,6 +38,8 @@ That being said, there are currently only a few specific [boards](/docs/faq#what - [QAZ](https://www.cbkbd.com/product/qaz-keyboard-kit) (`qaz`) - [CRBN](https://keygem.store/collections/group-buys/products/group-buy-featherlight-40-kit) (`crbn`) - [tidbit](https://nullbits.co/tidbit/) (`tidbit`) +- [Eek!](https://www.cbkbd.com/product/eek-keyboard) (`eek`) +- [BFO-9000](https://keeb.io/products/bfo-9000-keyboard-customizable-full-size-split-ortholinear) (`bfo9000_left` and `bfo9000_right`) ## Other Hardware 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/src/data/hid.js b/docs/src/data/hid.js index 35fc7fb7..ba3d2bf6 100644 --- a/docs/src/data/hid.js +++ b/docs/src/data/hid.js @@ -3218,7 +3218,7 @@ export default [ windows: null, linux: true, android: true, - macos: null, + macos: true, ios: null, }, footnotes: {}, @@ -3239,7 +3239,7 @@ export default [ windows: null, linux: true, android: true, - macos: null, + macos: false, ios: null, }, footnotes: {}, @@ -3260,7 +3260,7 @@ export default [ windows: null, linux: true, android: true, - macos: null, + macos: false, ios: null, }, footnotes: {}, @@ -5172,7 +5172,7 @@ export default [ windows: null, linux: true, android: null, - macos: null, + macos: true, ios: null, }, footnotes: {}, @@ -5193,7 +5193,7 @@ export default [ windows: null, linux: true, android: null, - macos: null, + macos: true, ios: null, }, footnotes: {}, @@ -5886,7 +5886,7 @@ export default [ windows: null, linux: true, android: true, - macos: null, + macos: true, ios: null, }, footnotes: {}, @@ -5907,7 +5907,7 @@ export default [ windows: null, linux: true, android: true, - macos: null, + macos: true, ios: null, }, footnotes: {}, @@ -6054,7 +6054,7 @@ export default [ windows: null, linux: true, android: true, - macos: null, + macos: true, ios: null, }, footnotes: {}, @@ -6138,7 +6138,7 @@ export default [ windows: null, linux: true, android: true, - macos: null, + macos: true, ios: null, }, footnotes: {}, @@ -6159,7 +6159,7 @@ export default [ windows: null, linux: true, android: true, - macos: null, + macos: true, ios: null, }, footnotes: {}, diff --git a/docs/static/setup.ps1 b/docs/static/setup.ps1 index a2193228..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" -$names = "kyria", "lily58", "corne", "splitreus62", "sofle", "iris", "reviung41", "romac", "romac_plus", "m60", "microdox", "tg4x", "qaz", "nibble", "jorne", "jian", "crbn", "tidbit" -$splits = "y", "y", "y", "y", "y", "y", "n", "n", "n", "n", "y", "n", "n", "n", "y", "y", "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 5768fa6b..652160b4 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") +options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle" "Iris" "Reviung41" "RoMac" "RoMac+" "makerdiary M60" "Microdox" "TG4X" "QAZ" "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. @@ -119,6 +118,9 @@ select opt in "${options[@]}" "Quit"; do 16 ) shield_title="Jian" shield="jian"; split="y"; break;; 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;; + 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;;