Add Gherkin shield

This commit is contained in:
Robert Erdin 2021-03-30 19:36:04 +01:00
parent d8119cd663
commit 94fcfa9d57
No known key found for this signature in database
GPG key ID: C9ECEBF1BE40D10D
10 changed files with 200 additions and 4 deletions

View file

@ -32,6 +32,7 @@ jobs:
- cradio_right
- crbn
- eek
- gherkin
- helix_left
- helix_right
- iris_left

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,5 @@
# Gherkin
A 3x10 keybaord bi di0ib.
Original git [here](https://git.40percent.club)
**NOTE**: If you use the nice!nano board, don't socket the `RAW` pin, see the [FAQ](https://nicekeyboards.com/docs/nice-nano/faq)

View file

View file

@ -0,0 +1,135 @@
/*
* 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>
&lt {
flavor = "balanced";
tapping-term-ms = <225>;
};
&mt {
flavor = "balanced";
tapping-term-ms = <225>;
};
/ {
behaviors {
hm: homerow_mods {
compatible = "zmk,behavior-hold-tap";
label = "homerow mods";
#binding-cells = <2>;
tapping-term-ms = <225>;
flavor = "tap-preferred";
bindings = <&kp>, <&kp>;
};
};
keymap {
compatible = "zmk,keymap";
default_layer {
// Qwerty Home Layer
// ----------------------------------------------------------------------,
// | Q | W | E | R | T | Y | U | I | O | P |
// | | | | | | | | | | |
// |------+------+------+------+-------------+------+------+------+------|
// | A | S | D | F | G | H | J | K | L | Backs|
// | Shift| SysL | | AltGr| | | AltGr| | | Shift|
// '------+------+------+------+------+------|------+------+------+------'
// | Z | X | C | V |Enter |Space | B | N | M | Enter|
// | Ctrl | Alt | Cmd | FunL |Lower |Raise | Nav | Alt | Ctrl | SysL |
// '---------------------------------------------------------------------'
//
bindings = <&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P
&mt LSHFT A &kp S &kp D &hm RALT F &kp G &kp H &hm RALT J &kp K &kp L &mt RSHFT BSPC
&mt LCTRL Z &mt LALT X &mt GUI C &lt 4 V &lt 1 RET &lt 2 SPACE &lt 3 B &mt RALT N &mt RCTL M &lt 4 RET
>;
};
lower_layer {
// Lower
// ,---------------------------------------------------------------------.
// | ! | @ | # | $ | % | ^ | & | * | ( | ) |
// | | | | | | | | | | |
// |------+------+------+------+-------------+------+------+------+------|
// | TAB | ` | - | = | [ | ] | _ | + | { | } |
// | Shift| | | AltGr| | | AltGr|SysLay| | Shift|
// ' -----+------+------+------+------+------|------+------+------+------'
// | | | | | | | < | > | ? | |
// | | | | | | | , | . | / | Del |
// | | | | | | | Alt | Ctrl | Shift| Shift|
// ----------------------------------------------------------------------'
bindings =
<&kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR
&mt LSHFT TAB &kp GRAVE &kp MINUS &kp EQL &kp LBKT &kp RBKT &kp UNDERSCORE &kp PLUS &kp LBRC &mt RSHFT RBKT
&trans &trans &trans &trans &kp DEL &trans &kp COMMA &kp DOT &kp SLASH &kp DEL
>;
};
raise_layer {
// Raise
// ,---------------------------------------------------------------------.
// | ! | @ | # | $ | % | ^ | & | * | ( | ) |
// | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |
// | | | | | | | | Alt | Ctrl | Shift|
// |------+------+------+------+-------------+------+------+------+------|
// | Esc | | | Vol+ | | ; | - | = | ; | ' |
// | Shift| | | | | | | | | |
// ' -----+------+------+------+------+------|------+------+------+------'
// | Prev | Next | Pause| Vol- | Enter| | , | . | ? | Enter|
// | | | | |SysLay| | | | | |
// ----------------------------------------------------------------------'
//
bindings = <&kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0
&mt LSHFT ESC &trans &trans &kp C_VOL_UP &trans &trans &kp MINUS &kp EQL &kp SEMI &kp SQT
&kp C_PREV &kp C_NEXT &kp C_PAUSE &kp C_VOL_DN &trans &trans &trans &trans &kp QMARK &trans
>;
};
nav_layer {
// ArrowPad
// ,---------------------------------------------------------------------.
// | | | | | | |PrevW | Up | NextW|Backsp|
// | | | | | | | | | | |
// |------+------+------+------+-------------+------+------+------+------|
// | | | | | | | Left | Down | Right| Enter|
// | | | | | | | | | | |
// '------+------+------+------+------+------|------+------+------+------'
// | | | | | | | Home | PgUp | PgDn | End |
// | | | | | | | | | | |
// `---------------------------------------------------------------------'
bindings =
<&trans &trans &trans &trans &trans &trans &trans &kp UP &trans &kp BSPC
&trans &trans &trans &trans &trans &trans &kp LEFT &kp DOWN &kp RIGHT &kp RET
&trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &kp PG_DN &kp END
>;
};
system_layer {
// System Layer
// ,---------------------------------------------------------------------.
// | BT0 | BT1 | BT2 | BT3 | | | | | |RESET |
// | | | | | | | | | | |
// |------+------+------+------+-------------+------+------+------+------|
// |CLEAR | | | | | | | | | |
// | | | | | | | | | | |
// '------+------+------+------+------+------|------+------+------+------'
// | | | | | | | | | | |
// | | | | | | | | | | |
// '---------------------------------------------------------------------'
bindings =
<&bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &bootloader
&bt BT_CLR &trans &trans &trans &trans &trans &trans &trans &trans &kp RET
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
};
};
};

View file

@ -0,0 +1,39 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <dt-bindings/zmk/matrix_transform.h>
/ {
chosen {
zmk,kscan = &kscan0;
};
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)>
;
};
};

View file

@ -40,6 +40,7 @@ That being said, there are currently only a few specific [boards](/docs/faq#what
- [tidbit](https://nullbits.co/tidbit/) (`tidbit`)
- [Eek!](https://www.cbkbd.com/product/eek-keyboard) (`eek`)
- [BFO-9000](https://keeb.io/products/bfo-9000-keyboard-customizable-full-size-split-ortholinear) (`bfo9000_left` and `bfo9000_right`)
- [Gherkin](http://www.40percent.club/2016/11/gherkin.html) (`gherkin`)
## Other Hardware

View file

@ -90,9 +90,9 @@ Write-Host "Keyboard Shield Selection:"
$prompt = "Pick a keyboard"
# TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos.
$options = "Kyria", "Lily58", "Corne", "Splitreus62", "Sofle", "Iris", "Reviung41", "RoMac", "RoMac+", "makerdiary M60", "Microdox", "TG4X", "QAZ", "NIBBLE", "Jorne", "Jian", "CRBN", "Tidbit", "Eek!", "BFO-9000", "Helix"
$names = "kyria", "lily58", "corne", "splitreus62", "sofle", "iris", "reviung41", "romac", "romac_plus", "m60", "microdox", "tg4x", "qaz", "nibble", "jorne", "jian", "crbn", "tidbit", "eek", "bfo9000", "helix"
$splits = "y", "y", "y", "y", "y", "y", "n", "n", "n", "n", "y", "n", "n", "n", "y", "y", "n", "n", "n", "n", "y"
$options = "Kyria", "Lily58", "Corne", "Splitreus62", "Sofle", "Iris", "Reviung41", "RoMac", "RoMac+", "makerdiary M60", "Microdox", "TG4X", "QAZ", "NIBBLE", "Jorne", "Jian", "CRBN", "Tidbit", "Eek!", "BFO-9000", "Helix", "Gherkin"
$names = "kyria", "lily58", "corne", "splitreus62", "sofle", "iris", "reviung41", "romac", "romac_plus", "m60", "microdox", "tg4x", "qaz", "nibble", "jorne", "jian", "crbn", "tidbit", "eek", "bfo9000", "helix", "gherkin"
$splits = "y", "y", "y", "y", "y", "y", "n", "n", "n", "n", "y", "n", "n", "n", "y", "y", "n", "n", "n", "n", "y", "n"
$choice = Get-Choice-From-Options -Options $options -Prompt $prompt
$shield_title = $($options[$choice])

View file

@ -91,7 +91,7 @@ echo ""
echo "Keyboard Shield Selection:"
prompt="Pick an keyboard:"
options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle" "Iris" "Reviung41" "RoMac" "RoMac+" "makerdiary M60" "Microdox" "TG4X" "QAZ" "NIBBLE" "Jorne" "Jian" "CRBN" "Tidbit" "Eek!" "BFO-9000" "Helix")
options=("Kyria" "Lily58" "Corne" "Splitreus62" "Sofle" "Iris" "Reviung41" "RoMac" "RoMac+" "makerdiary M60" "Microdox" "TG4X" "QAZ" "NIBBLE" "Jorne" "Jian" "CRBN" "Tidbit" "Eek!" "BFO-9000" "Helix" "Gherkin")
PS3="$prompt "
# TODO: Add support for "Other" and linking to docs on adding custom shields in user config repos.
@ -121,6 +121,7 @@ select opt in "${options[@]}" "Quit"; do
19 ) shield_title="Eek!" shield="eek"; split="n" break;;
20 ) shield_title="BFO-9000" shield="bfo9000"; split="y"; break;;
21 ) shield_title="Helix" shield="helix"; split="y"; break;;
22 ) shield_title="Gherkin" shield="gerkin"; split="n"; break;;
# Add link to docs on adding your own custom shield in your ZMK config!
# $(( ${#options[@]}+1 )) ) echo "Other!"; break;;