Add files via upload

This commit is contained in:
David Barr 2020-11-08 15:48:56 +00:00 committed by GitHub
parent c8f95dbaa8
commit 21d6939bd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 133 additions and 0 deletions

View file

@ -0,0 +1,9 @@
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
if SHIELD_GHERKIN
config ZMK_KEYBOARD_NAME
default "GHERKIN"
endif

View file

@ -0,0 +1,5 @@
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
config SHIELD_GHERKIN
def_bool $(shields_list_contains,gherkin)

View file

@ -0,0 +1,65 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#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 &lt 3 C &lt 4 V &lt 2 BSPC &lt 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
>;
};
};
};

View file

@ -0,0 +1,54 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <dt-bindings/zmk/matrix-transform.h>
/ {
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)>
;
};
};