From 407cf8d827ac412e6825bc65ec5cc8379011c57c Mon Sep 17 00:00:00 2001 From: Alyx Brett Date: Sun, 24 Apr 2022 21:46:27 +0100 Subject: [PATCH 1/6] Add a shield for reviung34, with a very quirky layout based on engram --- .../shields/reviung34/.#reviung34.overlay | 1 + .../shields/reviung34/Kconfig.defconfig | 9 ++ app/boards/shields/reviung34/Kconfig.shield | 6 ++ .../reviung34/boards/nice_nano_v2.overlay | 31 +++++++ app/boards/shields/reviung34/reviung34.conf | 3 + app/boards/shields/reviung34/reviung34.keymap | 92 +++++++++++++++++++ .../shields/reviung34/reviung34.overlay | 53 +++++++++++ .../shields/reviung34/reviung34.zmk.yml | 9 ++ 8 files changed, 204 insertions(+) create mode 100644 app/boards/shields/reviung34/.#reviung34.overlay create mode 100644 app/boards/shields/reviung34/Kconfig.defconfig create mode 100644 app/boards/shields/reviung34/Kconfig.shield create mode 100644 app/boards/shields/reviung34/boards/nice_nano_v2.overlay create mode 100644 app/boards/shields/reviung34/reviung34.conf create mode 100644 app/boards/shields/reviung34/reviung34.keymap create mode 100644 app/boards/shields/reviung34/reviung34.overlay create mode 100644 app/boards/shields/reviung34/reviung34.zmk.yml diff --git a/app/boards/shields/reviung34/.#reviung34.overlay b/app/boards/shields/reviung34/.#reviung34.overlay new file mode 100644 index 00000000..698d1eb7 --- /dev/null +++ b/app/boards/shields/reviung34/.#reviung34.overlay @@ -0,0 +1 @@ +Alyx@DESKTOP-IH8ESR0.5000:1650094159 \ No newline at end of file diff --git a/app/boards/shields/reviung34/Kconfig.defconfig b/app/boards/shields/reviung34/Kconfig.defconfig new file mode 100644 index 00000000..534ad852 --- /dev/null +++ b/app/boards/shields/reviung34/Kconfig.defconfig @@ -0,0 +1,9 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if SHIELD_REVIUNG34 + +config ZMK_KEYBOARD_NAME + default "Reviung34" + +endif \ No newline at end of file diff --git a/app/boards/shields/reviung34/Kconfig.shield b/app/boards/shields/reviung34/Kconfig.shield new file mode 100644 index 00000000..6f4da7db --- /dev/null +++ b/app/boards/shields/reviung34/Kconfig.shield @@ -0,0 +1,6 @@ + +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config SHIELD_REVIUNG34 + def_bool $(shields_list_contains,reviung34) \ No newline at end of file diff --git a/app/boards/shields/reviung34/boards/nice_nano_v2.overlay b/app/boards/shields/reviung34/boards/nice_nano_v2.overlay new file mode 100644 index 00000000..ea1e5519 --- /dev/null +++ b/app/boards/shields/reviung34/boards/nice_nano_v2.overlay @@ -0,0 +1,31 @@ +#include + +&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 = <9>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + color-mapping = ; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; \ No newline at end of file diff --git a/app/boards/shields/reviung34/reviung34.conf b/app/boards/shields/reviung34/reviung34.conf new file mode 100644 index 00000000..9f250f5b --- /dev/null +++ b/app/boards/shields/reviung34/reviung34.conf @@ -0,0 +1,3 @@ +# Uncomment the following lines to enable RGB underglow +CONFIG_ZMK_RGB_UNDERGLOW=y +CONFIG_WS2812_STRIP=y \ No newline at end of file diff --git a/app/boards/shields/reviung34/reviung34.keymap b/app/boards/shields/reviung34/reviung34.keymap new file mode 100644 index 00000000..18758fae --- /dev/null +++ b/app/boards/shields/reviung34/reviung34.keymap @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include +#include + + + +#define DEFAULT 0 +#define SYMNUM 1 +#define NAVFN 2 +#define CONFIG 3 + +&mt { + tapping-term-ms = <165>; +}; + +/ { + macros { + ZMK_MACRO(save, + wait-ms = <30>; + tap-ms = <40>; + bindings = <¯o_tap &kp ESC &kp COLON &kp W &kp RET>; + ) + }; + + keymap { + compatible = "zmk,keymap"; + + default_layer { +// ------------------------------------------------------------------------------------------- +// | B | Y | O | U | | L | D | W | V | +// | LGUI(C) | LALT(I) | LSHFT(E) | LCTRL(A) | | RCTRL(H) | RSHFT(T) | RALT(S) | RGUI(N) | +// | G | X | J | K | | R | M | F | P | +// | RET | NAV(SPC) | | SYM(BSPC) | CONF(ESC) | + bindings = < + &kp B &kp Y &kp O &kp U &none &none &kp L &kp D &kp W &kp V + &mt LGUI C &mt LALT I &mt LSHFT E &mt LCTRL A &none &none &mt RCTRL H &mt RSHFT T &mt RALT S &mt RGUI N + &kp G &kp X &kp J &kp K &none &none &kp R &kp M &kp F &kp P + &kp RET < NAVFN SPACE < SYMNUM BSPC < CONFIG ESC + >; + }; + + symnum_layer { +// ------------------------------------------------------------------------------------------- +// | | ` | \ | / | | 1 | 2 | 3 | 4 | +// | LGUI(') | LALT(-) | LSHFT(,) | LCTRL(.) | | RCTRL(5) | RSHFT(6) | RALT(7) | RGUI(8) | +// | = | ; | [ | ] | | 9 | 0 | Z | Q | +// | SAVE | TAB | | | | + bindings = < + &none &kp GRAVE &kp BSLH &kp FSLH &none &none &kp N1 &kp N2 &kp N3 &kp N4 + &mt LGUI SQT &mt LALT MINUS &mt LSHFT COMMA &mt LCTRL DOT &none &none &mt RCTRL N5 &mt RSHFT N6 &mt RALT N7 &mt RGUI N8 + &kp EQUAL &kp SEMI &kp LBKT &kp RBKT &none &none &kp N9 &kp N0 &kp Z &kp Q + &save &kp TAB &trans &none + >; + }; + + navfn_layer { +// ------------------------------------------------------------------------------------------- +// | | | | | | F1 | F2 | F3 | F4 | +// | LGUI(LFT) | LALT(DWN) | LSHFT(UP) | LCTRL(RGT) | | RCTRL(F5) | RSHFT(F6) | RALT(F7) | RGUI(F8) | +// | HOME | PGDN | PGUP | END | | F9 | F10 | F11 | F12 | +// | | | | DEL | | + bindings = < + &none &none &none &none &none &none &kp F1 &kp F2 &kp F3 &kp F4 + &mt LGUI LEFT &mt LALT DOWN &mt LSHFT UP &mt LCTRL RIGHT &none &none &mt RCTRL F5 &mt RSHFT F6 &mt RALT F7 &mt RGUI F8 + &kp HOME &kp PG_DN &kp PG_UP &kp END &none &none &kp F9 &kp F10 &kp F11 &kp F12 + &none &trans &kp DEL &caps_word + >; + }; + + config_layer { +// ----------------------------------------------------------------------------------------- +// | RGB BRI+ | RGB SAT+ | RGB HUE+ | RGB ANI+ | | BT1 | BT2 | BT3 | BT4 | +// | RGB BRI- | RGB SAT- | RGB HUE- | RGB ANI+ | | BT5 | | | | +// | | | | RGB TOG | | BT CLR | | | RESET | +// | | | | | | + bindings = < + &rgb_ug RGB_BRI &rgb_ug RGB_SAI &rgb_ug RGB_HUI &rgb_ug RGB_EFF &none &none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 + &rgb_ug RGB_BRD &rgb_ug RGB_SAD &rgb_ug RGB_HUD &rgb_ug RGB_EFR &none &none &bt BT_SEL 4 &none &none &none + &none &none &none &rgb_ug RGB_TOG &none &none &bt BT_CLR &none &out OUT_TOG &reset + &trans &trans &trans &trans + >; + }; + }; +}; \ No newline at end of file diff --git a/app/boards/shields/reviung34/reviung34.overlay b/app/boards/shields/reviung34/reviung34.overlay new file mode 100644 index 00000000..2c8b72bd --- /dev/null +++ b/app/boards/shields/reviung34/reviung34.overlay @@ -0,0 +1,53 @@ +/* + * 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,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(3,9) +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(3,6) +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(3,7) + RC(3,2) RC(3,3) RC(3,4) RC(3,8) + >; + }; + + kscan0: kscan_0 { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + diode-direction = "col2row"; + + col-gpios + = <&pro_micro 4 GPIO_ACTIVE_HIGH> + , <&pro_micro 5 GPIO_ACTIVE_HIGH> + , <&pro_micro 6 GPIO_ACTIVE_HIGH> + , <&pro_micro 7 GPIO_ACTIVE_HIGH> + , <&pro_micro 8 GPIO_ACTIVE_HIGH> + , <&pro_micro 9 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + ; + + row-gpios + = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; +}; \ No newline at end of file diff --git a/app/boards/shields/reviung34/reviung34.zmk.yml b/app/boards/shields/reviung34/reviung34.zmk.yml new file mode 100644 index 00000000..76ed745d --- /dev/null +++ b/app/boards/shields/reviung34/reviung34.zmk.yml @@ -0,0 +1,9 @@ +file_format: "1" +id: reviung34 +name: REVIUNG34 +type: shield +url: https://github.com/gtips/reviung/tree/master/reviung34 +requires: [pro_micro] +features: + - keys + - underglow From 1c5c0fc422ef7dbb0b0df309b7fd190095d2711d Mon Sep 17 00:00:00 2001 From: alyx-brett <66095873+alyx-brett@users.noreply.github.com> Date: Sun, 24 Apr 2022 21:47:48 +0100 Subject: [PATCH 2/6] Delete .#reviung34.overlay --- app/boards/shields/reviung34/.#reviung34.overlay | 1 - 1 file changed, 1 deletion(-) delete mode 100644 app/boards/shields/reviung34/.#reviung34.overlay diff --git a/app/boards/shields/reviung34/.#reviung34.overlay b/app/boards/shields/reviung34/.#reviung34.overlay deleted file mode 100644 index 698d1eb7..00000000 --- a/app/boards/shields/reviung34/.#reviung34.overlay +++ /dev/null @@ -1 +0,0 @@ -Alyx@DESKTOP-IH8ESR0.5000:1650094159 \ No newline at end of file From d5c85b05339f66ed576212caa7f9292b43388428 Mon Sep 17 00:00:00 2001 From: alyx-brett <66095873+alyx-brett@users.noreply.github.com> Date: Sun, 24 Apr 2022 21:48:22 +0100 Subject: [PATCH 3/6] Update reviung34.conf --- app/boards/shields/reviung34/reviung34.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/boards/shields/reviung34/reviung34.conf b/app/boards/shields/reviung34/reviung34.conf index 9f250f5b..289f070b 100644 --- a/app/boards/shields/reviung34/reviung34.conf +++ b/app/boards/shields/reviung34/reviung34.conf @@ -1,3 +1,3 @@ # Uncomment the following lines to enable RGB underglow -CONFIG_ZMK_RGB_UNDERGLOW=y -CONFIG_WS2812_STRIP=y \ No newline at end of file +# CONFIG_ZMK_RGB_UNDERGLOW=y +# CONFIG_WS2812_STRIP=y From fb8a264fef8bbc022b3aa6ec7a8cbc16ba1f1771 Mon Sep 17 00:00:00 2001 From: Alyx Brett Date: Sun, 24 Apr 2022 22:17:57 +0100 Subject: [PATCH 4/6] clang-format --- .../shields/reviung34/Kconfig.defconfig | 9 +- app/boards/shields/reviung34/Kconfig.shield | 7 +- .../reviung34/boards/nice_nano_v2.overlay | 41 +++--- app/boards/shields/reviung34/reviung34.keymap | 129 +++++++++--------- .../shields/reviung34/reviung34.overlay | 49 +++---- .../shields/reviung34/reviung34.zmk.yml | 13 +- 6 files changed, 112 insertions(+), 136 deletions(-) diff --git a/app/boards/shields/reviung34/Kconfig.defconfig b/app/boards/shields/reviung34/Kconfig.defconfig index 534ad852..73fada91 100644 --- a/app/boards/shields/reviung34/Kconfig.defconfig +++ b/app/boards/shields/reviung34/Kconfig.defconfig @@ -1,9 +1,8 @@ -# Copyright (c) 2020 The ZMK Contributors -# SPDX-License-Identifier: MIT +#Copyright(c) 2020 The ZMK Contributors +#SPDX - License - Identifier : MIT if SHIELD_REVIUNG34 -config ZMK_KEYBOARD_NAME - default "Reviung34" +config ZMK_KEYBOARD_NAME default "Reviung34" -endif \ No newline at end of file + endif \ No newline at end of file diff --git a/app/boards/shields/reviung34/Kconfig.shield b/app/boards/shields/reviung34/Kconfig.shield index 6f4da7db..c9e1b507 100644 --- a/app/boards/shields/reviung34/Kconfig.shield +++ b/app/boards/shields/reviung34/Kconfig.shield @@ -1,6 +1,5 @@ -# Copyright (c) 2020 The ZMK Contributors -# SPDX-License-Identifier: MIT +#Copyright(c) 2020 The ZMK Contributors +#SPDX - License - Identifier : MIT -config SHIELD_REVIUNG34 - def_bool $(shields_list_contains,reviung34) \ No newline at end of file +config SHIELD_REVIUNG34 def_bool $(shields_list_contains, reviung34) \ No newline at end of file diff --git a/app/boards/shields/reviung34/boards/nice_nano_v2.overlay b/app/boards/shields/reviung34/boards/nice_nano_v2.overlay index ea1e5519..6f8c481a 100644 --- a/app/boards/shields/reviung34/boards/nice_nano_v2.overlay +++ b/app/boards/shields/reviung34/boards/nice_nano_v2.overlay @@ -1,31 +1,30 @@ #include &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>; + 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"; +led_strip: + ws2812 @0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi - max - frequency = <4000000>; - /* WS2812 */ - chain-length = <9>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - color-mapping = ; - }; + /* WS2812 */ + chain - length = <9>; /* arbitrary; change at will */ + spi - one - frame = <0x70>; + spi - zero - frame = <0x40>; + color - mapping = ; + }; }; / { - chosen { - zmk,underglow = &led_strip; - }; + chosen { zmk, underglow = &led_strip; }; }; \ No newline at end of file diff --git a/app/boards/shields/reviung34/reviung34.keymap b/app/boards/shields/reviung34/reviung34.keymap index 18758fae..688ee525 100644 --- a/app/boards/shields/reviung34/reviung34.keymap +++ b/app/boards/shields/reviung34/reviung34.keymap @@ -10,83 +10,76 @@ #include #include - - #define DEFAULT 0 #define SYMNUM 1 #define NAVFN 2 #define CONFIG 3 -&mt { - tapping-term-ms = <165>; -}; +&mt { tapping - term - ms = <165>; }; -/ { +/ { macros { - ZMK_MACRO(save, - wait-ms = <30>; - tap-ms = <40>; - bindings = <¯o_tap &kp ESC &kp COLON &kp W &kp RET>; - ) + ZMK_MACRO(save, wait - ms = <30>; tap - ms = <40>; + bindings = <¯o_tap & kp ESC & kp COLON & kp W & kp RET>;) }; - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { -// ------------------------------------------------------------------------------------------- -// | B | Y | O | U | | L | D | W | V | -// | LGUI(C) | LALT(I) | LSHFT(E) | LCTRL(A) | | RCTRL(H) | RSHFT(T) | RALT(S) | RGUI(N) | -// | G | X | J | K | | R | M | F | P | -// | RET | NAV(SPC) | | SYM(BSPC) | CONF(ESC) | - bindings = < - &kp B &kp Y &kp O &kp U &none &none &kp L &kp D &kp W &kp V - &mt LGUI C &mt LALT I &mt LSHFT E &mt LCTRL A &none &none &mt RCTRL H &mt RSHFT T &mt RALT S &mt RGUI N - &kp G &kp X &kp J &kp K &none &none &kp R &kp M &kp F &kp P - &kp RET < NAVFN SPACE < SYMNUM BSPC < CONFIG ESC - >; - }; - - symnum_layer { -// ------------------------------------------------------------------------------------------- -// | | ` | \ | / | | 1 | 2 | 3 | 4 | -// | LGUI(') | LALT(-) | LSHFT(,) | LCTRL(.) | | RCTRL(5) | RSHFT(6) | RALT(7) | RGUI(8) | -// | = | ; | [ | ] | | 9 | 0 | Z | Q | -// | SAVE | TAB | | | | - bindings = < - &none &kp GRAVE &kp BSLH &kp FSLH &none &none &kp N1 &kp N2 &kp N3 &kp N4 - &mt LGUI SQT &mt LALT MINUS &mt LSHFT COMMA &mt LCTRL DOT &none &none &mt RCTRL N5 &mt RSHFT N6 &mt RALT N7 &mt RGUI N8 - &kp EQUAL &kp SEMI &kp LBKT &kp RBKT &none &none &kp N9 &kp N0 &kp Z &kp Q - &save &kp TAB &trans &none - >; - }; - - navfn_layer { -// ------------------------------------------------------------------------------------------- -// | | | | | | F1 | F2 | F3 | F4 | -// | LGUI(LFT) | LALT(DWN) | LSHFT(UP) | LCTRL(RGT) | | RCTRL(F5) | RSHFT(F6) | RALT(F7) | RGUI(F8) | -// | HOME | PGDN | PGUP | END | | F9 | F10 | F11 | F12 | -// | | | | DEL | | - bindings = < - &none &none &none &none &none &none &kp F1 &kp F2 &kp F3 &kp F4 - &mt LGUI LEFT &mt LALT DOWN &mt LSHFT UP &mt LCTRL RIGHT &none &none &mt RCTRL F5 &mt RSHFT F6 &mt RALT F7 &mt RGUI F8 - &kp HOME &kp PG_DN &kp PG_UP &kp END &none &none &kp F9 &kp F10 &kp F11 &kp F12 - &none &trans &kp DEL &caps_word - >; - }; - - config_layer { -// ----------------------------------------------------------------------------------------- -// | RGB BRI+ | RGB SAT+ | RGB HUE+ | RGB ANI+ | | BT1 | BT2 | BT3 | BT4 | -// | RGB BRI- | RGB SAT- | RGB HUE- | RGB ANI+ | | BT5 | | | | -// | | | | RGB TOG | | BT CLR | | | RESET | -// | | | | | | - bindings = < - &rgb_ug RGB_BRI &rgb_ug RGB_SAI &rgb_ug RGB_HUI &rgb_ug RGB_EFF &none &none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 - &rgb_ug RGB_BRD &rgb_ug RGB_SAD &rgb_ug RGB_HUD &rgb_ug RGB_EFR &none &none &bt BT_SEL 4 &none &none &none - &none &none &none &rgb_ug RGB_TOG &none &none &bt BT_CLR &none &out OUT_TOG &reset - &trans &trans &trans &trans - >; - }; + default_layer { + // ------------------------------------------------------------------------------------------- + // | B | Y | O | U | | L | D | W | V + // | | LGUI(C) | LALT(I) | LSHFT(E) | LCTRL(A) | | RCTRL(H) | RSHFT(T) | RALT(S) | + // RGUI(N) | | G | X | J | K | | R | M | F + // | P | + // | RET | NAV(SPC) | | SYM(BSPC) | CONF(ESC) | + bindings = + <&kp B & kp Y & kp O & kp U & none & none & kp L & kp D & kp W & kp V & mt LGUI C & + mt LALT I & mt LSHFT E & mt LCTRL A & none & none & mt RCTRL H & mt RSHFT T & + mt RALT S & mt RGUI N & kp G & kp X & kp J & kp K & none & none & kp R & kp M & + kp F & kp P & kp RET & lt NAVFN SPACE & lt SYMNUM BSPC & lt CONFIG ESC>; }; + + symnum_layer { + // ------------------------------------------------------------------------------------------- + // | | ` | \ | / | | 1 | 2 | 3 | 4 + // | | LGUI(') | LALT(-) | LSHFT(,) | LCTRL(.) | | RCTRL(5) | RSHFT(6) | RALT(7) | + // RGUI(8) | | = | ; | [ | ] | | 9 | 0 | Z + // | Q | + // | SAVE | TAB | | | | + bindings = <&none & kp GRAVE & kp BSLH & kp FSLH & none & none & kp N1 & kp N2 & kp N3 & + kp N4 & mt LGUI SQT & mt LALT MINUS & mt LSHFT COMMA & mt LCTRL DOT & none & + none & mt RCTRL N5 & mt RSHFT N6 & mt RALT N7 & mt RGUI N8 & kp EQUAL & + kp SEMI & kp LBKT & kp RBKT & none & none & kp N9 & kp N0 & kp Z & kp Q & + save & kp TAB & trans & none>; + }; + + navfn_layer { + // ------------------------------------------------------------------------------------------- + // | | | | | | F1 | F2 | F3 | F4 + // | | LGUI(LFT) | LALT(DWN) | LSHFT(UP) | LCTRL(RGT) | | RCTRL(F5) | RSHFT(F6) | + // RALT(F7) | RGUI(F8) | | HOME | PGDN | PGUP | END | | F9 + // | F10 | F11 | F12 | + // | | | | DEL | | + bindings = <&none & none & none & none & none & none & kp F1 & kp F2 & kp F3 & kp F4 & + mt LGUI LEFT & mt LALT DOWN & mt LSHFT UP & mt LCTRL RIGHT & none & none & + mt RCTRL F5 & mt RSHFT F6 & mt RALT F7 & mt RGUI F8 & kp HOME & kp PG_DN & + kp PG_UP & kp END & none & none & kp F9 & kp F10 & kp F11 & kp F12 & none & + trans & kp DEL & caps_word>; + }; + + config_layer { + // ----------------------------------------------------------------------------------------- + // | RGB BRI+ | RGB SAT+ | RGB HUE+ | RGB ANI+ | | BT1 | BT2 | BT3 | BT4 | + // | RGB BRI- | RGB SAT- | RGB HUE- | RGB ANI+ | | BT5 | | | | + // | | | | RGB TOG | | BT CLR | | | RESET | + // | | | | | | + bindings = + <&rgb_ug RGB_BRI & rgb_ug RGB_SAI & rgb_ug RGB_HUI & rgb_ug RGB_EFF & none & none & + bt BT_SEL 0 & bt BT_SEL 1 & bt BT_SEL 2 & bt BT_SEL 3 & rgb_ug RGB_BRD & + rgb_ug RGB_SAD & rgb_ug RGB_HUD & rgb_ug RGB_EFR & none & none & bt BT_SEL 4 & + none & none & none & none & none & none & rgb_ug RGB_TOG & none & none & + bt BT_CLR & none & out OUT_TOG & reset & trans & trans & trans & trans>; + }; + }; }; \ No newline at end of file diff --git a/app/boards/shields/reviung34/reviung34.overlay b/app/boards/shields/reviung34/reviung34.overlay index 2c8b72bd..134d22e4 100644 --- a/app/boards/shields/reviung34/reviung34.overlay +++ b/app/boards/shields/reviung34/reviung34.overlay @@ -8,46 +8,37 @@ / { chosen { - zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; + zmk, kscan = &kscan0; + zmk, matrix_transform = &default_transform; }; - default_transform: keymap_transform_0 { +default_transform: + keymap_transform_0 { compatible = "zmk,matrix-transform"; columns = <10>; rows = <4>; - 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(3,9) -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(3,6) -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(3,7) - RC(3,2) RC(3,3) RC(3,4) RC(3,8) - >; + map = ; }; - kscan0: kscan_0 { +kscan0: + kscan_0 { compatible = "zmk,kscan-gpio-matrix"; label = "KSCAN"; - diode-direction = "col2row"; + diode - direction = "col2row"; - col-gpios - = <&pro_micro 4 GPIO_ACTIVE_HIGH> - , <&pro_micro 5 GPIO_ACTIVE_HIGH> - , <&pro_micro 6 GPIO_ACTIVE_HIGH> - , <&pro_micro 7 GPIO_ACTIVE_HIGH> - , <&pro_micro 8 GPIO_ACTIVE_HIGH> - , <&pro_micro 9 GPIO_ACTIVE_HIGH> - , <&pro_micro 14 GPIO_ACTIVE_HIGH> - , <&pro_micro 16 GPIO_ACTIVE_HIGH> - , <&pro_micro 10 GPIO_ACTIVE_HIGH> - , <&pro_micro 15 GPIO_ACTIVE_HIGH> - ; + col - gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>, <&pro_micro 5 GPIO_ACTIVE_HIGH>, + <&pro_micro 6 GPIO_ACTIVE_HIGH>, <&pro_micro 7 GPIO_ACTIVE_HIGH>, + <&pro_micro 8 GPIO_ACTIVE_HIGH>, <&pro_micro 9 GPIO_ACTIVE_HIGH>, + <&pro_micro 14 GPIO_ACTIVE_HIGH>, <&pro_micro 16 GPIO_ACTIVE_HIGH>, + <&pro_micro 10 GPIO_ACTIVE_HIGH>, <&pro_micro 15 GPIO_ACTIVE_HIGH>; - row-gpios - = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; + row - gpios = <&pro_micro 21(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>, + <&pro_micro 20(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>, + <&pro_micro 19(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>, + <&pro_micro 18(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; }; }; \ No newline at end of file diff --git a/app/boards/shields/reviung34/reviung34.zmk.yml b/app/boards/shields/reviung34/reviung34.zmk.yml index 76ed745d..a3273a75 100644 --- a/app/boards/shields/reviung34/reviung34.zmk.yml +++ b/app/boards/shields/reviung34/reviung34.zmk.yml @@ -1,9 +1,4 @@ -file_format: "1" -id: reviung34 -name: REVIUNG34 -type: shield -url: https://github.com/gtips/reviung/tree/master/reviung34 -requires: [pro_micro] -features: - - keys - - underglow +file_format : "1" id : reviung34 name : REVIUNG34 type : shield url : https + : // github.com/gtips/reviung/tree/master/reviung34 + requires + : [pro_micro] features : -keys - underglow From 555e51f454f15a7690b6470fc3149d1caf125137 Mon Sep 17 00:00:00 2001 From: Alyx Brett Date: Sun, 24 Apr 2022 22:21:05 +0100 Subject: [PATCH 5/6] revert clang-format --- .../shields/reviung34/Kconfig.defconfig | 9 +- app/boards/shields/reviung34/Kconfig.shield | 7 +- .../reviung34/boards/nice_nano_v2.overlay | 41 +++--- app/boards/shields/reviung34/reviung34.keymap | 127 +++++++++--------- .../shields/reviung34/reviung34.overlay | 49 ++++--- .../shields/reviung34/reviung34.zmk.yml | 13 +- 6 files changed, 135 insertions(+), 111 deletions(-) diff --git a/app/boards/shields/reviung34/Kconfig.defconfig b/app/boards/shields/reviung34/Kconfig.defconfig index 73fada91..534ad852 100644 --- a/app/boards/shields/reviung34/Kconfig.defconfig +++ b/app/boards/shields/reviung34/Kconfig.defconfig @@ -1,8 +1,9 @@ -#Copyright(c) 2020 The ZMK Contributors -#SPDX - License - Identifier : MIT +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT if SHIELD_REVIUNG34 -config ZMK_KEYBOARD_NAME default "Reviung34" +config ZMK_KEYBOARD_NAME + default "Reviung34" - endif \ No newline at end of file +endif \ No newline at end of file diff --git a/app/boards/shields/reviung34/Kconfig.shield b/app/boards/shields/reviung34/Kconfig.shield index c9e1b507..6f4da7db 100644 --- a/app/boards/shields/reviung34/Kconfig.shield +++ b/app/boards/shields/reviung34/Kconfig.shield @@ -1,5 +1,6 @@ -#Copyright(c) 2020 The ZMK Contributors -#SPDX - License - Identifier : MIT +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT -config SHIELD_REVIUNG34 def_bool $(shields_list_contains, reviung34) \ No newline at end of file +config SHIELD_REVIUNG34 + def_bool $(shields_list_contains,reviung34) \ No newline at end of file diff --git a/app/boards/shields/reviung34/boards/nice_nano_v2.overlay b/app/boards/shields/reviung34/boards/nice_nano_v2.overlay index 6f8c481a..ea1e5519 100644 --- a/app/boards/shields/reviung34/boards/nice_nano_v2.overlay +++ b/app/boards/shields/reviung34/boards/nice_nano_v2.overlay @@ -1,30 +1,31 @@ #include &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>; + 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"; + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi - max - frequency = <4000000>; + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; - /* WS2812 */ - chain - length = <9>; /* arbitrary; change at will */ - spi - one - frame = <0x70>; - spi - zero - frame = <0x40>; - color - mapping = ; - }; + /* WS2812 */ + chain-length = <9>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + color-mapping = ; + }; }; / { - chosen { zmk, underglow = &led_strip; }; + chosen { + zmk,underglow = &led_strip; + }; }; \ No newline at end of file diff --git a/app/boards/shields/reviung34/reviung34.keymap b/app/boards/shields/reviung34/reviung34.keymap index 688ee525..18758fae 100644 --- a/app/boards/shields/reviung34/reviung34.keymap +++ b/app/boards/shields/reviung34/reviung34.keymap @@ -10,76 +10,83 @@ #include #include + + #define DEFAULT 0 #define SYMNUM 1 #define NAVFN 2 #define CONFIG 3 -&mt { tapping - term - ms = <165>; }; +&mt { + tapping-term-ms = <165>; +}; -/ { +/ { macros { - ZMK_MACRO(save, wait - ms = <30>; tap - ms = <40>; - bindings = <¯o_tap & kp ESC & kp COLON & kp W & kp RET>;) + ZMK_MACRO(save, + wait-ms = <30>; + tap-ms = <40>; + bindings = <¯o_tap &kp ESC &kp COLON &kp W &kp RET>; + ) }; - keymap { - compatible = "zmk,keymap"; + keymap { + compatible = "zmk,keymap"; - default_layer { - // ------------------------------------------------------------------------------------------- - // | B | Y | O | U | | L | D | W | V - // | | LGUI(C) | LALT(I) | LSHFT(E) | LCTRL(A) | | RCTRL(H) | RSHFT(T) | RALT(S) | - // RGUI(N) | | G | X | J | K | | R | M | F - // | P | - // | RET | NAV(SPC) | | SYM(BSPC) | CONF(ESC) | - bindings = - <&kp B & kp Y & kp O & kp U & none & none & kp L & kp D & kp W & kp V & mt LGUI C & - mt LALT I & mt LSHFT E & mt LCTRL A & none & none & mt RCTRL H & mt RSHFT T & - mt RALT S & mt RGUI N & kp G & kp X & kp J & kp K & none & none & kp R & kp M & - kp F & kp P & kp RET & lt NAVFN SPACE & lt SYMNUM BSPC & lt CONFIG ESC>; - }; + default_layer { +// ------------------------------------------------------------------------------------------- +// | B | Y | O | U | | L | D | W | V | +// | LGUI(C) | LALT(I) | LSHFT(E) | LCTRL(A) | | RCTRL(H) | RSHFT(T) | RALT(S) | RGUI(N) | +// | G | X | J | K | | R | M | F | P | +// | RET | NAV(SPC) | | SYM(BSPC) | CONF(ESC) | + bindings = < + &kp B &kp Y &kp O &kp U &none &none &kp L &kp D &kp W &kp V + &mt LGUI C &mt LALT I &mt LSHFT E &mt LCTRL A &none &none &mt RCTRL H &mt RSHFT T &mt RALT S &mt RGUI N + &kp G &kp X &kp J &kp K &none &none &kp R &kp M &kp F &kp P + &kp RET < NAVFN SPACE < SYMNUM BSPC < CONFIG ESC + >; + }; - symnum_layer { - // ------------------------------------------------------------------------------------------- - // | | ` | \ | / | | 1 | 2 | 3 | 4 - // | | LGUI(') | LALT(-) | LSHFT(,) | LCTRL(.) | | RCTRL(5) | RSHFT(6) | RALT(7) | - // RGUI(8) | | = | ; | [ | ] | | 9 | 0 | Z - // | Q | - // | SAVE | TAB | | | | - bindings = <&none & kp GRAVE & kp BSLH & kp FSLH & none & none & kp N1 & kp N2 & kp N3 & - kp N4 & mt LGUI SQT & mt LALT MINUS & mt LSHFT COMMA & mt LCTRL DOT & none & - none & mt RCTRL N5 & mt RSHFT N6 & mt RALT N7 & mt RGUI N8 & kp EQUAL & - kp SEMI & kp LBKT & kp RBKT & none & none & kp N9 & kp N0 & kp Z & kp Q & - save & kp TAB & trans & none>; + symnum_layer { +// ------------------------------------------------------------------------------------------- +// | | ` | \ | / | | 1 | 2 | 3 | 4 | +// | LGUI(') | LALT(-) | LSHFT(,) | LCTRL(.) | | RCTRL(5) | RSHFT(6) | RALT(7) | RGUI(8) | +// | = | ; | [ | ] | | 9 | 0 | Z | Q | +// | SAVE | TAB | | | | + bindings = < + &none &kp GRAVE &kp BSLH &kp FSLH &none &none &kp N1 &kp N2 &kp N3 &kp N4 + &mt LGUI SQT &mt LALT MINUS &mt LSHFT COMMA &mt LCTRL DOT &none &none &mt RCTRL N5 &mt RSHFT N6 &mt RALT N7 &mt RGUI N8 + &kp EQUAL &kp SEMI &kp LBKT &kp RBKT &none &none &kp N9 &kp N0 &kp Z &kp Q + &save &kp TAB &trans &none + >; + }; + + navfn_layer { +// ------------------------------------------------------------------------------------------- +// | | | | | | F1 | F2 | F3 | F4 | +// | LGUI(LFT) | LALT(DWN) | LSHFT(UP) | LCTRL(RGT) | | RCTRL(F5) | RSHFT(F6) | RALT(F7) | RGUI(F8) | +// | HOME | PGDN | PGUP | END | | F9 | F10 | F11 | F12 | +// | | | | DEL | | + bindings = < + &none &none &none &none &none &none &kp F1 &kp F2 &kp F3 &kp F4 + &mt LGUI LEFT &mt LALT DOWN &mt LSHFT UP &mt LCTRL RIGHT &none &none &mt RCTRL F5 &mt RSHFT F6 &mt RALT F7 &mt RGUI F8 + &kp HOME &kp PG_DN &kp PG_UP &kp END &none &none &kp F9 &kp F10 &kp F11 &kp F12 + &none &trans &kp DEL &caps_word + >; + }; + + config_layer { +// ----------------------------------------------------------------------------------------- +// | RGB BRI+ | RGB SAT+ | RGB HUE+ | RGB ANI+ | | BT1 | BT2 | BT3 | BT4 | +// | RGB BRI- | RGB SAT- | RGB HUE- | RGB ANI+ | | BT5 | | | | +// | | | | RGB TOG | | BT CLR | | | RESET | +// | | | | | | + bindings = < + &rgb_ug RGB_BRI &rgb_ug RGB_SAI &rgb_ug RGB_HUI &rgb_ug RGB_EFF &none &none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 + &rgb_ug RGB_BRD &rgb_ug RGB_SAD &rgb_ug RGB_HUD &rgb_ug RGB_EFR &none &none &bt BT_SEL 4 &none &none &none + &none &none &none &rgb_ug RGB_TOG &none &none &bt BT_CLR &none &out OUT_TOG &reset + &trans &trans &trans &trans + >; + }; }; - - navfn_layer { - // ------------------------------------------------------------------------------------------- - // | | | | | | F1 | F2 | F3 | F4 - // | | LGUI(LFT) | LALT(DWN) | LSHFT(UP) | LCTRL(RGT) | | RCTRL(F5) | RSHFT(F6) | - // RALT(F7) | RGUI(F8) | | HOME | PGDN | PGUP | END | | F9 - // | F10 | F11 | F12 | - // | | | | DEL | | - bindings = <&none & none & none & none & none & none & kp F1 & kp F2 & kp F3 & kp F4 & - mt LGUI LEFT & mt LALT DOWN & mt LSHFT UP & mt LCTRL RIGHT & none & none & - mt RCTRL F5 & mt RSHFT F6 & mt RALT F7 & mt RGUI F8 & kp HOME & kp PG_DN & - kp PG_UP & kp END & none & none & kp F9 & kp F10 & kp F11 & kp F12 & none & - trans & kp DEL & caps_word>; - }; - - config_layer { - // ----------------------------------------------------------------------------------------- - // | RGB BRI+ | RGB SAT+ | RGB HUE+ | RGB ANI+ | | BT1 | BT2 | BT3 | BT4 | - // | RGB BRI- | RGB SAT- | RGB HUE- | RGB ANI+ | | BT5 | | | | - // | | | | RGB TOG | | BT CLR | | | RESET | - // | | | | | | - bindings = - <&rgb_ug RGB_BRI & rgb_ug RGB_SAI & rgb_ug RGB_HUI & rgb_ug RGB_EFF & none & none & - bt BT_SEL 0 & bt BT_SEL 1 & bt BT_SEL 2 & bt BT_SEL 3 & rgb_ug RGB_BRD & - rgb_ug RGB_SAD & rgb_ug RGB_HUD & rgb_ug RGB_EFR & none & none & bt BT_SEL 4 & - none & none & none & none & none & none & rgb_ug RGB_TOG & none & none & - bt BT_CLR & none & out OUT_TOG & reset & trans & trans & trans & trans>; - }; - }; }; \ No newline at end of file diff --git a/app/boards/shields/reviung34/reviung34.overlay b/app/boards/shields/reviung34/reviung34.overlay index 134d22e4..2c8b72bd 100644 --- a/app/boards/shields/reviung34/reviung34.overlay +++ b/app/boards/shields/reviung34/reviung34.overlay @@ -8,37 +8,46 @@ / { chosen { - zmk, kscan = &kscan0; - zmk, matrix_transform = &default_transform; + zmk,kscan = &kscan0; + zmk,matrix_transform = &default_transform; }; -default_transform: - keymap_transform_0 { + default_transform: keymap_transform_0 { compatible = "zmk,matrix-transform"; columns = <10>; rows = <4>; - map = ; + 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(3,9) +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(3,6) +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(3,7) + RC(3,2) RC(3,3) RC(3,4) RC(3,8) + >; }; -kscan0: - kscan_0 { + kscan0: kscan_0 { compatible = "zmk,kscan-gpio-matrix"; label = "KSCAN"; - diode - direction = "col2row"; + diode-direction = "col2row"; - col - gpios = <&pro_micro 4 GPIO_ACTIVE_HIGH>, <&pro_micro 5 GPIO_ACTIVE_HIGH>, - <&pro_micro 6 GPIO_ACTIVE_HIGH>, <&pro_micro 7 GPIO_ACTIVE_HIGH>, - <&pro_micro 8 GPIO_ACTIVE_HIGH>, <&pro_micro 9 GPIO_ACTIVE_HIGH>, - <&pro_micro 14 GPIO_ACTIVE_HIGH>, <&pro_micro 16 GPIO_ACTIVE_HIGH>, - <&pro_micro 10 GPIO_ACTIVE_HIGH>, <&pro_micro 15 GPIO_ACTIVE_HIGH>; + col-gpios + = <&pro_micro 4 GPIO_ACTIVE_HIGH> + , <&pro_micro 5 GPIO_ACTIVE_HIGH> + , <&pro_micro 6 GPIO_ACTIVE_HIGH> + , <&pro_micro 7 GPIO_ACTIVE_HIGH> + , <&pro_micro 8 GPIO_ACTIVE_HIGH> + , <&pro_micro 9 GPIO_ACTIVE_HIGH> + , <&pro_micro 14 GPIO_ACTIVE_HIGH> + , <&pro_micro 16 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 15 GPIO_ACTIVE_HIGH> + ; - row - gpios = <&pro_micro 21(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>, - <&pro_micro 20(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>, - <&pro_micro 19(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>, - <&pro_micro 18(GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; + row-gpios + = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; }; }; \ No newline at end of file diff --git a/app/boards/shields/reviung34/reviung34.zmk.yml b/app/boards/shields/reviung34/reviung34.zmk.yml index a3273a75..76ed745d 100644 --- a/app/boards/shields/reviung34/reviung34.zmk.yml +++ b/app/boards/shields/reviung34/reviung34.zmk.yml @@ -1,4 +1,9 @@ -file_format : "1" id : reviung34 name : REVIUNG34 type : shield url : https - : // github.com/gtips/reviung/tree/master/reviung34 - requires - : [pro_micro] features : -keys - underglow +file_format: "1" +id: reviung34 +name: REVIUNG34 +type: shield +url: https://github.com/gtips/reviung/tree/master/reviung34 +requires: [pro_micro] +features: + - keys + - underglow From 2843d09278bee365e0695f53026f38c1b27252b9 Mon Sep 17 00:00:00 2001 From: Alyx Brett Date: Sat, 14 May 2022 18:15:53 +0100 Subject: [PATCH 6/6] mangle kyria firmware... --- app/boards/shields/kyria/Kconfig.defconfig | 2 +- app/boards/shields/kyria/kyria_rev2.conf | 4 +- app/boards/shields/kyria/kyria_rev2.dtsi | 6 +- app/boards/shields/kyria/kyria_rev2.keymap | 107 ++++++++++++++++++--- 4 files changed, 97 insertions(+), 22 deletions(-) diff --git a/app/boards/shields/kyria/Kconfig.defconfig b/app/boards/shields/kyria/Kconfig.defconfig index 74a22520..5a86e492 100644 --- a/app/boards/shields/kyria/Kconfig.defconfig +++ b/app/boards/shields/kyria/Kconfig.defconfig @@ -1,5 +1,5 @@ -if SHIELD_KYRIA_LEFT || SHIELD_KYRIA_REV2_LEFT +if SHIELD_KYRIA_RIGHT || SHIELD_KYRIA_REV2_RIGHT config ZMK_KEYBOARD_NAME default "Kyria" diff --git a/app/boards/shields/kyria/kyria_rev2.conf b/app/boards/shields/kyria/kyria_rev2.conf index 7a0b5b6c..f521b6e1 100644 --- a/app/boards/shields/kyria/kyria_rev2.conf +++ b/app/boards/shields/kyria/kyria_rev2.conf @@ -1,6 +1,6 @@ # Uncomment these two line to add support for encoders to your firmware -# CONFIG_EC11=y -# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y +CONFIG_EC11=y +CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y # Uncomment the following line to enable the Kyria OLED Display # CONFIG_ZMK_DISPLAY=y diff --git a/app/boards/shields/kyria/kyria_rev2.dtsi b/app/boards/shields/kyria/kyria_rev2.dtsi index 7c7d9efe..cbe9f0f8 100644 --- a/app/boards/shields/kyria/kyria_rev2.dtsi +++ b/app/boards/shields/kyria/kyria_rev2.dtsi @@ -33,13 +33,13 @@ 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) // | MX25 | MX24 | MX23 | MX22 | MX21 | | MX21 | MX22 | MX23 | MX24 | MX25 | five_column_transform: keymap_transform_1 { compatible = "zmk,matrix-transform"; - columns = <14>; + columns = <10>; rows = <4>; map = < RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) 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,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,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) - 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(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) + RC(3,2) RC(3,3) RC(3,4) RC(3,9) RC(3,10) RC(3,11) >; }; }; diff --git a/app/boards/shields/kyria/kyria_rev2.keymap b/app/boards/shields/kyria/kyria_rev2.keymap index a8804dd9..44e16b76 100644 --- a/app/boards/shields/kyria/kyria_rev2.keymap +++ b/app/boards/shields/kyria/kyria_rev2.keymap @@ -7,24 +7,99 @@ #include #include -/ { - keymap { - compatible = "zmk,keymap"; +#define DEFAULT 0 +#define SYMNUM 1 +#define NAVFN 2 +#define CONFIG 3 - default_layer { -// --------------------------------------------------------------------------------------------------------------------------------- -// | ESC | Q | W | E | R | T | | Y | U | I | O | P | \ | -// | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | -// | SHIFT | Z | X | C | V | B | L SHIFT | L SHIFT | | L SHIFT | L SHIFT | N | M | , | . | / | CTRL | -// | GUI | DEL | RET | SPACE | ESC | | RET | SPACE | TAB | BSPC | R-ALT | - bindings = < - &kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH - &kp TAB &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 LSHFT &kp LSHFT &kp LSHFT &kp LSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RCTRL - &kp LGUI &kp DEL &kp RET &kp SPACE &kp ESC &kp RET &kp SPACE &kp TAB &kp BSPC &kp RALT - >; +&mt { + tapping-term-ms = <165>; +}; + +/ { + + five_column_transform: keymap_transform_1 { + compatible = "zmk,matrix-transform"; + columns = <10>; + rows = <4>; + map = < +RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) 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,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,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) + RC(3,2) RC(3,3) RC(3,4) RC(3,9) RC(3,10) RC(3,11) + >; + }; + chosen { + zmk,matrix_transform = &five_column_transform; + }; + + macros { + ZMK_MACRO(save, + wait-ms = <30>; + tap-ms = <40>; + bindings = <¯o_tap &kp ESC &kp COLON &kp W &kp RET>; + ) + }; + + keymap { + compatible = "zmk,keymap"; + + default_layer { +// ------------------------------------------------------------------------------------------- +// | B | Y | O | U | | L | D | W | V | +// | LGUI(C) | LALT(I) | LSHFT(E) | LCTRL(A) | | RCTRL(H) | RSHFT(T) | RALT(S) | RGUI(N) | +// | G | X | J | K | | R | M | F | P | +// | RET | NAV(SPC) | | SYM(BSPC) | CONF(ESC) | + bindings = < + &kp B &kp Y &kp O &kp U &none &none &kp L &kp D &kp W &kp V + &mt LGUI C &mt LALT I &mt LSHFT E &mt LCTRL A &none &none &mt RCTRL H &mt RSHFT T &mt RALT S &mt RGUI N + &kp G &kp X &kp J &kp K &none &none &kp R &kp M &kp F &kp P + &kp RET < NAVFN SPACE < SYMNUM BSPC < CONFIG ESC + >; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp C_VOL_UP C_VOL_DN>; + }; + + symnum_layer { +// ------------------------------------------------------------------------------------------- +// | | ` | \ | / | | 1 | 2 | 3 | 4 | +// | LGUI(') | LALT(-) | LSHFT(,) | LCTRL(.) | | RCTRL(5) | RSHFT(6) | RALT(7) | RGUI(8) | +// | = | ; | [ | ] | | 9 | 0 | Z | Q | +// | SAVE | TAB | | | | + bindings = < + &none &kp GRAVE &kp BSLH &kp FSLH &none &none &kp N1 &kp N2 &kp N3 &kp N4 + &mt LGUI SQT &mt LALT MINUS &mt LSHFT COMMA &mt LCTRL DOT &none &none &mt RCTRL N5 &mt RSHFT N6 &mt RALT N7 &mt RGUI N8 + &kp EQUAL &kp SEMI &kp LBKT &kp RBKT &none &none &kp N9 &kp N0 &kp Z &kp Q + &save &kp TAB &trans &none + >; + }; + + navfn_layer { +// ------------------------------------------------------------------------------------------- +// | | | | | | F1 | F2 | F3 | F4 | +// | LGUI(LFT) | LALT(DWN) | LSHFT(UP) | LCTRL(RGT) | | RCTRL(F5) | RSHFT(F6) | RALT(F7) | RGUI(F8) | +// | HOME | PGDN | PGUP | END | | F9 | F10 | F11 | F12 | +// | | | | DEL | | + bindings = < + &none &none &none &none &none &none &kp F1 &kp F2 &kp F3 &kp F4 + &mt LGUI LEFT &mt LALT DOWN &mt LSHFT UP &mt LCTRL RIGHT &none &none &mt RCTRL F5 &mt RSHFT F6 &mt RALT F7 &mt RGUI F8 + &kp HOME &kp PG_DN &kp PG_UP &kp END &none &none &kp F9 &kp F10 &kp F11 &kp F12 + &none &trans &kp DEL &caps_word + >; + }; + + config_layer { +// ----------------------------------------------------------------------------------------- +// | RGB BRI+ | RGB SAT+ | RGB HUE+ | RGB ANI+ | | BT1 | BT2 | BT3 | BT4 | +// | RGB BRI- | RGB SAT- | RGB HUE- | RGB ANI+ | | BT5 | | | | +// | | | | RGB TOG | | BT CLR | | | RESET | +// | | | | | | + bindings = < + &rgb_ug RGB_BRI &rgb_ug RGB_SAI &rgb_ug RGB_HUI &rgb_ug RGB_EFF &none &none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 + &rgb_ug RGB_BRD &rgb_ug RGB_SAD &rgb_ug RGB_HUD &rgb_ug RGB_EFR &none &none &bt BT_SEL 4 &none &none &none + &none &none &none &rgb_ug RGB_TOG &none &none &bt BT_CLR &none &out OUT_TOG &reset + &trans &trans &trans &trans + >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; }; }; };