From 21d6939bd05b3c254ecb75a1a7a342bd64539d30 Mon Sep 17 00:00:00 2001 From: David Barr Date: Sun, 8 Nov 2020 15:48:56 +0000 Subject: [PATCH] Add files via upload --- app/boards/shields/gherkin/Kconfig.defconfig | 9 +++ app/boards/shields/gherkin/Kconfig.shield | 5 ++ app/boards/shields/gherkin/gherkin.keymap | 65 ++++++++++++++++++++ app/boards/shields/gherkin/gherkin.overlay | 54 ++++++++++++++++ 4 files changed, 133 insertions(+) create mode 100644 app/boards/shields/gherkin/Kconfig.defconfig create mode 100644 app/boards/shields/gherkin/Kconfig.shield create mode 100644 app/boards/shields/gherkin/gherkin.keymap create mode 100644 app/boards/shields/gherkin/gherkin.overlay diff --git a/app/boards/shields/gherkin/Kconfig.defconfig b/app/boards/shields/gherkin/Kconfig.defconfig new file mode 100644 index 00000000..c9e4bf51 --- /dev/null +++ b/app/boards/shields/gherkin/Kconfig.defconfig @@ -0,0 +1,9 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +if SHIELD_GHERKIN + +config ZMK_KEYBOARD_NAME + default "GHERKIN" + +endif diff --git a/app/boards/shields/gherkin/Kconfig.shield b/app/boards/shields/gherkin/Kconfig.shield new file mode 100644 index 00000000..387705f3 --- /dev/null +++ b/app/boards/shields/gherkin/Kconfig.shield @@ -0,0 +1,5 @@ +# Copyright (c) 2020 The ZMK Contributors +# SPDX-License-Identifier: MIT + +config SHIELD_GHERKIN + def_bool $(shields_list_contains,gherkin) diff --git a/app/boards/shields/gherkin/gherkin.keymap b/app/boards/shields/gherkin/gherkin.keymap new file mode 100644 index 00000000..92d408cc --- /dev/null +++ b/app/boards/shields/gherkin/gherkin.keymap @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include + +#define DEFAULT 0 + + + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + 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 ESC + &mt LSFT Z &mt LALT X < 3 C < 4 V < 2 BSPC < 1 SPACE &kp B &mt RALT N &mt RCTL M &mt LSFT RET + >; + + }; + + + first_layer { + bindings = < + &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 + &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 + &trans &trans &trans &trans &kp DEL &trans &trans &trans &trans &trans +>; + }; + + second_layer { + bindings = < + &kp BANG &kp ATSN &kp HASH &kp DLLR &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN + &kp F11 &kp F12 &trans &trans &trans &trans &trans &trans &trans &kp GRAVE + &trans &trans &trans &trans &kp DEL &trans &trans &trans &trans &trans +>; + }; + + + third_layer { + bindings = < + &trans &trans &trans &trans &trans &kp MINUS &kp EQL &kp LBRC &kp RBRC &kp BSLH + &kp TAB &trans &trans &trans &trans &kp COMMA &kp DOT &kp SLASH &kp SCLN &kp APOS + &trans &trans &trans &trans &trans &trans &kp LEFT_ARROW &kp DOWN_ARROW &kp UP_ARROW &kp RIGHT_ARROW + >; + }; + +fourth_layer { + bindings = < + &trans &trans &trans &trans &trans &kp UNDERSCORE &kp PLUS &kp LBRC &kp RBRC &kp PIPE + &kp TAB &bt BT_CLR &bt BT_NXT &bt BT_PRV &trans &kp LT &kp GT &kp QMARK &kp COLON &kp DQT + &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_DN &kp PG_UP &kp END + + + >; + }; + + }; +}; diff --git a/app/boards/shields/gherkin/gherkin.overlay b/app/boards/shields/gherkin/gherkin.overlay new file mode 100644 index 00000000..443cf333 --- /dev/null +++ b/app/boards/shields/gherkin/gherkin.overlay @@ -0,0 +1,54 @@ +/* + * 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 = <6>; + rows = <5>; + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) + RC(2,0) RC(2,1) RC(3,2) RC(2,3) RC(2,4) RC(2,5) + RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) + RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) + + >; + }; + + + kscan0: kscan_0 { + compatible = "zmk,kscan-gpio-matrix"; + label = "KSCAN"; + diode-direction = "col2row"; + + + col-gpios + = <&pro_micro_a 8 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 7 GPIO_ACTIVE_HIGH> + , <&pro_micro_a 7 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 5 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 4 GPIO_ACTIVE_HIGH> + , <&pro_micro_d 3 GPIO_ACTIVE_HIGH> + ; + + row-gpios + = <&pro_micro_a 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro_d 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; + +};