diff --git a/app/boards/shields/murphpad/Kconfig.defconfig b/app/boards/shields/murphpad/Kconfig.defconfig index 3e8719f0..6ec7e096 100644 --- a/app/boards/shields/murphpad/Kconfig.defconfig +++ b/app/boards/shields/murphpad/Kconfig.defconfig @@ -1,4 +1,4 @@ -# Copyright (c) 2020 The ZMK Contributors +# Copyright (c) 2021 The ZMK Contributors # SPDX-License-Identifier: MIT if SHIELD_MURPHPAD diff --git a/app/boards/shields/murphpad/Kconfig.shield b/app/boards/shields/murphpad/Kconfig.shield index 18fa5887..389caa26 100644 --- a/app/boards/shields/murphpad/Kconfig.shield +++ b/app/boards/shields/murphpad/Kconfig.shield @@ -1,4 +1,4 @@ -# Copyright (c) 2020 The ZMK Contributors +# Copyright (c) 2021 The ZMK Contributors # SPDX-License-Identifier: MIT config SHIELD_MURPHPAD diff --git a/app/boards/shields/murphpad/boards/nice_nano.conf b/app/boards/shields/murphpad/boards/nice_nano.conf index 14bed3d0..dda71c13 100644 --- a/app/boards/shields/murphpad/boards/nice_nano.conf +++ b/app/boards/shields/murphpad/boards/nice_nano.conf @@ -1,4 +1,3 @@ -# Enable underglow +# Uncomment both to enable underglow CONFIG_ZMK_RGB_UNDERGLOW=y -# Use the STRIP config specific to the LEDs you're using -CONFIG_WS2812_STRIP=y \ No newline at end of file +CONFIG_WS2812_STRIP=y diff --git a/app/boards/shields/murphpad/boards/nice_nano.overlay b/app/boards/shields/murphpad/boards/nice_nano.overlay index 9514c7d0..b247334e 100644 --- a/app/boards/shields/murphpad/boards/nice_nano.overlay +++ b/app/boards/shields/murphpad/boards/nice_nano.overlay @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 The ZMK Contributors + * Copyright (c) 2021 The ZMK Contributors * * SPDX-License-Identifier: MIT */ diff --git a/app/boards/shields/murphpad/murphpad.conf b/app/boards/shields/murphpad/murphpad.conf index 92db5990..807da7e3 100644 --- a/app/boards/shields/murphpad/murphpad.conf +++ b/app/boards/shields/murphpad/murphpad.conf @@ -1,9 +1,9 @@ # Uncomment to turn on logging, and set ZMK logging to debug output # CONFIG_ZMK_USB_LOGGING=y -# Uncomment to enable encoder +# Uncomment both to enable encoder CONFIG_EC11=y CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y # Uncomment to enable OLED -CONFIG_ZMK_DISPLAY=y \ No newline at end of file +# CONFIG_ZMK_DISPLAY=y \ No newline at end of file diff --git a/app/boards/shields/murphpad/murphpad.keymap b/app/boards/shields/murphpad/murphpad.keymap index 25e3ab10..4b6814b6 100644 --- a/app/boards/shields/murphpad/murphpad.keymap +++ b/app/boards/shields/murphpad/murphpad.keymap @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 The ZMK Contributors + * Copyright (c) 2021 The ZMK Contributors * * SPDX-License-Identifier: MIT */ @@ -7,7 +7,8 @@ #include #include #include -#include +#include + #define TIMEOUT 300 @@ -15,6 +16,10 @@ status = "okay"; }; +&encoder_2 { + status = "okay"; +}; + / { combos { compatible = "zmk,combos"; @@ -42,7 +47,7 @@ sensors { compatible = "zmk,keymap-sensors"; - sensors = <&encoder_1>; + sensors = <&encoder_1 &encoder_2>; }; @@ -52,28 +57,28 @@ default_layer { label = "default layer"; bindings = < - &none &kp TAB &kp F5 &kp LC(LA(C)) &kp LG(D) - &none &kp ESC &kp KP_DIVIDE &kp KP_MULTIPLY &kp KP_MINUS - &none &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_PLUS - &kp C_MUTE &kp KP_N4 &kp KP_N5 &kp KP_N6 &none - &mo 1 &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER - &kp BSPC &kp KP_N0 &none &kp KP_DOT &none + &bt BT_CLR &kp TAB &kp F5 &kp LC(LA(C)) &kp LG(D) + &rgb_ug RGB_TOG &kp ESC &kp KP_DIVIDE &kp KP_MULTIPLY &kp KP_MINUS + &rgb_ug RGB_EFF &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_PLUS + &kp C_MUTE &kp KP_N4 &kp KP_N5 &kp KP_N6 &trans + &mo 1 &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER + &kp BSPC &kp KP_N0 &trans &kp KP_DOT &trans >; - sensor-bindings = <&inc_dec_kp C_VOLUME_DOWN C_VOLUME_UP>; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; }; fn_layer { label = "fn layer"; bindings = < - &none &trans &trans &trans &trans - &none &kp KP_NUM &trans &trans &trans - &none &trans &trans &trans &ext_power EP_ON - &bt BT_CLR &trans &trans &trans &none - &trans &trans &trans &trans &ext_power EP_OFF - &kp DEL &trans &none &trans &none + &trans &trans &trans &trans &trans + &trans &kp KP_NUM &trans &trans &trans + &trans &trans &trans &trans &trans + &bt BT_CLR &trans &trans &trans &trans + &trans &trans &trans &trans &trans + &kp DEL &trans &trans &trans &trans >; - sensor-bindings = <&inc_dec_kp C_BRI_DN C_BRI_UP>; + sensor-bindings = <&inc_dec_kp PG_UP PG_DN &inc_dec_kp C_VOL_UP C_VOL_DN>; }; }; diff --git a/app/boards/shields/murphpad/murphpad.overlay b/app/boards/shields/murphpad/murphpad.overlay index a0d6aaa3..af830756 100644 --- a/app/boards/shields/murphpad/murphpad.overlay +++ b/app/boards/shields/murphpad/murphpad.overlay @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 The ZMK Contributors + * Copyright (c) 2021 The ZMK Contributors * * SPDX-License-Identifier: MIT */ @@ -36,8 +36,17 @@ encoder_1: encoder_1 { compatible = "alps,ec11"; label = "Encoder 1"; - a-gpios = <&pro_micro_d 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; - b-gpios = <&pro_micro_d 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + a-gpios = <&pro_micro_d 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + b-gpios = <&pro_micro_d 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + resolution = <4>; + status = "disabled"; + }; + + encoder_2: encoder_2 { + compatible = "alps,ec11"; + label = "Encoder 2"; + a-gpios = <&pro_micro_d 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + b-gpios = <&pro_micro_d 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; resolution = <4>; status = "disabled"; };