From efad742b54cad911c9f90f6c23a1afd518910cc0 Mon Sep 17 00:00:00 2001 From: Sadteeto <87579232+Sadteeto@users.noreply.github.com> Date: Sat, 27 Jan 2024 23:10:59 +1000 Subject: [PATCH] modified keymap --- .../generic-numpad/generic-numpad.dtsi | 21 +++++++ .../generic-numpad/generic-numpad.keymap | 33 +++++++---- .../boards/generic-numpad/Kconfig.defconfig | 6 -- config/boards/generic-numpad/Kconfig.shield | 2 - .../boards/nice_nano_v2.overlay | 46 --------------- .../boards/generic-numpad/generic-numpad.conf | 5 -- .../generic-numpad/generic-numpad.keymap | 56 ------------------- .../generic-numpad/generic-numpad.overlay | 25 --------- .../generic-numpad/generic-numpad.zmk.yml | 8 --- config/generic-numpad.keymap | 56 ------------------- 10 files changed, 43 insertions(+), 215 deletions(-) create mode 100644 boards/shields/generic-numpad/generic-numpad.dtsi delete mode 100644 config/boards/generic-numpad/Kconfig.defconfig delete mode 100644 config/boards/generic-numpad/Kconfig.shield delete mode 100644 config/boards/generic-numpad/boards/nice_nano_v2.overlay delete mode 100644 config/boards/generic-numpad/generic-numpad.conf delete mode 100644 config/boards/generic-numpad/generic-numpad.keymap delete mode 100644 config/boards/generic-numpad/generic-numpad.overlay delete mode 100644 config/boards/generic-numpad/generic-numpad.zmk.yml delete mode 100644 config/generic-numpad.keymap diff --git a/boards/shields/generic-numpad/generic-numpad.dtsi b/boards/shields/generic-numpad/generic-numpad.dtsi new file mode 100644 index 0000000..d4addd6 --- /dev/null +++ b/boards/shields/generic-numpad/generic-numpad.dtsi @@ -0,0 +1,21 @@ +#include + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,matrix-transform = &default_transform; + }; + + default_transform: keymap_transform_0 { + compatible = "zmk,matrix-transform"; + columns = <4>; + rows = <5>; + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) + RC(2,0) RC(2,1) RC(2,2) + RC(3,0) RC(3,1) RC(3,2) RC(3,3) + RC(4,1) RC(4,3) + >; + }; +} diff --git a/boards/shields/generic-numpad/generic-numpad.keymap b/boards/shields/generic-numpad/generic-numpad.keymap index c9232be..741a72c 100644 --- a/boards/shields/generic-numpad/generic-numpad.keymap +++ b/boards/shields/generic-numpad/generic-numpad.keymap @@ -9,17 +9,28 @@ // ------------------default----------------- // | LAYERSFT | / | * | - | // | 7 | 8 | 9 | + | -// | 4 | 5 | 6 | NOP | +// | 4 | 5 | 6 | | // | 1 | 2 | 3 | ENTER | -// | NOP | 0 | NOP | . | +// | | 0 | | . | // ----------------------------functions------------------------------- // | LAYERSFT | NOP | NOP | Bluetooth PREV | -// | NOP | NOP | NOP | Bluetooth Next | -// | NOP | OUT_TOG | NOP | NOP | +// | NOP | LAYERSFT | NOP | Bluetooth Next | +// | NOP | OUT_TOG | NOP | | // |Bluetooth 0 | Bluetooth 1 |Bluetooth 2| reset | -// | NOP | BluetoothCLR | NOP | bootloader | +// | | BluetoothCLR | | NOP | + + +// --------------------action layer------------------ +// | NOP | NOP | NOP | NOP | +// | NOP | NOP | NOP | | +// |Arrow Left | NOP |Arrow Right| NOP | +// | NOP | NOP | NOP | NOP | +// | | NOP | | Bootloader | + + + / { keymap { @@ -29,27 +40,27 @@ bindings = < &mo 1 &kp KP_DIVIDE &kp KP_MULTIPLY &kp KP_MINUS &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_PLUS - &kp KP_N4 &kp KP_N5 &kp KP_N6 &trans + &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER - &trans &kp KP_N0 &trans &kp KP_DOT + &kp KP_N0 &kp KP_DOT >; }; function_layer { bindings = < &trans &trans &trans &trans &kp DEL &mo 2 &kp BSPC &trans - &trans &out OUT_TOG &trans &trans + &trans &out OUT_TOG &trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &sys_reset - &trans &bt BT_CLR &trans &trans + &bt BT_CLR &trans >; }; action_layer { bindings = < &trans &trans &trans &trans &trans &trans &trans &trans - &kp LEFT &trans &kp RIGHT &trans + &kp LEFT &trans &kp RIGHT &trans &trans &trans &trans - &trans &trans &trans &bootloader + &trans &bootloader >; }; }; diff --git a/config/boards/generic-numpad/Kconfig.defconfig b/config/boards/generic-numpad/Kconfig.defconfig deleted file mode 100644 index 0394119..0000000 --- a/config/boards/generic-numpad/Kconfig.defconfig +++ /dev/null @@ -1,6 +0,0 @@ -if numpad-generic - -config ZMK_KEYBOARD_NAME - default "Generic Numpad" - -endif \ No newline at end of file diff --git a/config/boards/generic-numpad/Kconfig.shield b/config/boards/generic-numpad/Kconfig.shield deleted file mode 100644 index 2bb4c6b..0000000 --- a/config/boards/generic-numpad/Kconfig.shield +++ /dev/null @@ -1,2 +0,0 @@ -config SHIELD_GENERIC_NUMPAD - def_bool $(shields_list_contains,generic-numpad) \ No newline at end of file diff --git a/config/boards/generic-numpad/boards/nice_nano_v2.overlay b/config/boards/generic-numpad/boards/nice_nano_v2.overlay deleted file mode 100644 index 424a617..0000000 --- a/config/boards/generic-numpad/boards/nice_nano_v2.overlay +++ /dev/null @@ -1,46 +0,0 @@ -#include - -&pinctrl { - spi3_default: spi3_default { - group1 { - psels = ; - }; - }; - - spi3_sleep: spi3_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <10>; /* arbitrary; change at will */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; - -/ { - chosen { - zmk,underglow = &led_strip; - }; -}; diff --git a/config/boards/generic-numpad/generic-numpad.conf b/config/boards/generic-numpad/generic-numpad.conf deleted file mode 100644 index 09e1405..0000000 --- a/config/boards/generic-numpad/generic-numpad.conf +++ /dev/null @@ -1,5 +0,0 @@ -CONFIG_ZMK_SLEEP=y -CONFIG_ZMK_KEYBOARD_NAME="Generic Numpad!" -CONFIG_BT_DEVICE_NAME="Generic Numpad!" -CONFIG_BT_DIS_MODEL="Generic Numpad!" -CONFIG_BT_MAX_CONN=3 \ No newline at end of file diff --git a/config/boards/generic-numpad/generic-numpad.keymap b/config/boards/generic-numpad/generic-numpad.keymap deleted file mode 100644 index c9232be..0000000 --- a/config/boards/generic-numpad/generic-numpad.keymap +++ /dev/null @@ -1,56 +0,0 @@ -#include -#include -#include -#include - - - - -// ------------------default----------------- -// | LAYERSFT | / | * | - | -// | 7 | 8 | 9 | + | -// | 4 | 5 | 6 | NOP | -// | 1 | 2 | 3 | ENTER | -// | NOP | 0 | NOP | . | - - -// ----------------------------functions------------------------------- -// | LAYERSFT | NOP | NOP | Bluetooth PREV | -// | NOP | NOP | NOP | Bluetooth Next | -// | NOP | OUT_TOG | NOP | NOP | -// |Bluetooth 0 | Bluetooth 1 |Bluetooth 2| reset | -// | NOP | BluetoothCLR | NOP | bootloader | - -/ { - keymap { - compatible = "zmk,keymap"; - - default_layer { - bindings = < - &mo 1 &kp KP_DIVIDE &kp KP_MULTIPLY &kp KP_MINUS - &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_PLUS - &kp KP_N4 &kp KP_N5 &kp KP_N6 &trans - &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER - &trans &kp KP_N0 &trans &kp KP_DOT - >; - }; - function_layer { - bindings = < - &trans &trans &trans &trans - &kp DEL &mo 2 &kp BSPC &trans - &trans &out OUT_TOG &trans &trans - &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &sys_reset - &trans &bt BT_CLR &trans &trans - >; - }; - action_layer { - bindings = < - &trans &trans &trans &trans - &trans &trans &trans &trans - &kp LEFT &trans &kp RIGHT &trans - &trans &trans &trans &trans - &trans &trans &trans &bootloader - >; - }; - }; -}; \ No newline at end of file diff --git a/config/boards/generic-numpad/generic-numpad.overlay b/config/boards/generic-numpad/generic-numpad.overlay deleted file mode 100644 index 3ff4961..0000000 --- a/config/boards/generic-numpad/generic-numpad.overlay +++ /dev/null @@ -1,25 +0,0 @@ -/ { - chosen { - zmk,kscan = &kscan0; - }; - - kscan0: kscan_0 { - compatible = "zmk,kscan-gpio-matrix"; - diode-direction = "col2row"; - - col-gpios - = <&pro_micro 2 GPIO_ACTIVE_HIGH> - , <&pro_micro 3 GPIO_ACTIVE_HIGH> - , <&pro_micro 4 GPIO_ACTIVE_HIGH> - , <&pro_micro 5 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)> - , <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - }; -}; \ No newline at end of file diff --git a/config/boards/generic-numpad/generic-numpad.zmk.yml b/config/boards/generic-numpad/generic-numpad.zmk.yml deleted file mode 100644 index 466d50c..0000000 --- a/config/boards/generic-numpad/generic-numpad.zmk.yml +++ /dev/null @@ -1,8 +0,0 @@ -file_format: "1" -id: numpad_generic -name: Generic Numpad -type: shield -url: https://github.com/sadteeto/numpad-generic -requires: [pro_micro] -features: - - keys \ No newline at end of file diff --git a/config/generic-numpad.keymap b/config/generic-numpad.keymap deleted file mode 100644 index c9232be..0000000 --- a/config/generic-numpad.keymap +++ /dev/null @@ -1,56 +0,0 @@ -#include -#include -#include -#include - - - - -// ------------------default----------------- -// | LAYERSFT | / | * | - | -// | 7 | 8 | 9 | + | -// | 4 | 5 | 6 | NOP | -// | 1 | 2 | 3 | ENTER | -// | NOP | 0 | NOP | . | - - -// ----------------------------functions------------------------------- -// | LAYERSFT | NOP | NOP | Bluetooth PREV | -// | NOP | NOP | NOP | Bluetooth Next | -// | NOP | OUT_TOG | NOP | NOP | -// |Bluetooth 0 | Bluetooth 1 |Bluetooth 2| reset | -// | NOP | BluetoothCLR | NOP | bootloader | - -/ { - keymap { - compatible = "zmk,keymap"; - - default_layer { - bindings = < - &mo 1 &kp KP_DIVIDE &kp KP_MULTIPLY &kp KP_MINUS - &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_PLUS - &kp KP_N4 &kp KP_N5 &kp KP_N6 &trans - &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER - &trans &kp KP_N0 &trans &kp KP_DOT - >; - }; - function_layer { - bindings = < - &trans &trans &trans &trans - &kp DEL &mo 2 &kp BSPC &trans - &trans &out OUT_TOG &trans &trans - &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &sys_reset - &trans &bt BT_CLR &trans &trans - >; - }; - action_layer { - bindings = < - &trans &trans &trans &trans - &trans &trans &trans &trans - &kp LEFT &trans &kp RIGHT &trans - &trans &trans &trans &trans - &trans &trans &trans &bootloader - >; - }; - }; -}; \ No newline at end of file