-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Gherkin Sheild #355
Add Gherkin Sheild #355
Changes from 2 commits
21d6939
de7046a
46db176
12b587f
24f907d
156553f
a3636ff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2020 The ZMK Contributors | ||
# SPDX-License-Identifier: MIT | ||
|
||
if SHIELD_GHERKIN | ||
|
||
config ZMK_KEYBOARD_NAME | ||
default "GHERKIN" | ||
|
||
endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright (c) 2020 The ZMK Contributors | ||
# SPDX-License-Identifier: MIT | ||
|
||
config SHIELD_GHERKIN | ||
def_bool $(shields_list_contains,gherkin) |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -0,0 +1,58 @@ | ||||
/* | ||||
* 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 | ||||
|
||||
Comment on lines
+11
to
+12
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Unused define. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. DELETED |
||||
/ { | ||||
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 | ||||
|
||||
>; | ||||
}; | ||||
}; | ||||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(2,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) | ||
Comment on lines
+20
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we do keep this transform, it should be in the shape of the Gherkin (3x10?) not 5x6. |
||
|
||
>; | ||
}; | ||
Comment on lines
+15
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't believe this is necessary as this keyboard is a perfect grid. Similar to it missing in the planck seen here: https://github.com/zmkfirmware/zmk/blob/main/app/boards/arm/planck/planck_rev6.dts#L20 It doesn't hurt to include this I suppose, but it's also superfluous. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't actually own a gherkin to test on, so i'm too afraid to delete this because gherkin does have a git of a funny matrix, but if you're confident i can remove it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've added references to the other files. |
||
|
||
|
||
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)> | ||
; | ||
}; | ||
|
||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick, is "GHERKIN" all caps the actual name? I've always seen it as "Gherkin".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a fair cop, renamed to Gherkin