Initial shield config and keymap for Chrysemys
This commit is contained in:
parent
308d6bce6e
commit
febfa887dd
9
app/boards/shields/chrysemys/Kconfig.defconfig
Normal file
9
app/boards/shields/chrysemys/Kconfig.defconfig
Normal file
@ -0,0 +1,9 @@
|
||||
# Copyright (c) 2022 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
if SHIELD_CHRYSEMYS
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "Chrysemys"
|
||||
|
||||
endif
|
5
app/boards/shields/chrysemys/Kconfig.shield
Normal file
5
app/boards/shields/chrysemys/Kconfig.shield
Normal file
@ -0,0 +1,5 @@
|
||||
# Copyright (c) 2022 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config SHIELD_CHRYSEMYS
|
||||
def_bool $(shields_list_contains,chrysemys)
|
0
app/boards/shields/chrysemys/chrysemys.conf
Normal file
0
app/boards/shields/chrysemys/chrysemys.conf
Normal file
266
app/boards/shields/chrysemys/chrysemys.keymap
Normal file
266
app/boards/shields/chrysemys/chrysemys.keymap
Normal file
@ -0,0 +1,266 @@
|
||||
/*
|
||||
* Copyright (c) 2022 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
|
||||
#define DEF_L 0
|
||||
#define NUM_L 1
|
||||
#define SYM_L 2
|
||||
#define TMUX_L 3
|
||||
|
||||
// Using layer taps on thumbs, having quick tap as well helps w/ repeating space/backspace
|
||||
< { quick_tap_ms = <200>; };
|
||||
|
||||
/ {
|
||||
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>;
|
||||
};
|
||||
};
|
||||
|
||||
combos {
|
||||
compatible = "zmk,combos";
|
||||
combo_backtick {
|
||||
timeout-ms = <50>;
|
||||
key-positions = <0 1>;
|
||||
bindings = <&kp GRAVE>;
|
||||
};
|
||||
combo_esc {
|
||||
timeout-ms = <50>;
|
||||
key-positions = <1 11>;
|
||||
bindings = <&kp ESC>;
|
||||
};
|
||||
combo_backspace {
|
||||
timeout-ms = <50>;
|
||||
key-positions = <11 12>;
|
||||
bindings = <&kp BSPC>;
|
||||
};
|
||||
combo_tab {
|
||||
timeout-ms = <50>;
|
||||
key-positions = <12 13>;
|
||||
bindings = <&kp TAB>;
|
||||
};
|
||||
combo_enter {
|
||||
timeout-ms = <50>;
|
||||
key-positions = <22 23>;
|
||||
bindings = <&kp ENTER>;
|
||||
};
|
||||
combo_minus {
|
||||
timeout-ms = <50>;
|
||||
key-positions = <17 18>;
|
||||
bindings = <&kp MINUS>;
|
||||
};
|
||||
combo_backslash {
|
||||
timeout-ms = <50>;
|
||||
key-positions = <18 19>;
|
||||
bindings = <&kp BACKSLASH>;
|
||||
};
|
||||
combo_quote {
|
||||
timeout-ms = <50>;
|
||||
key-positions = <25 26>;
|
||||
bindings = <&kp APOSTROPHE>;
|
||||
};
|
||||
combo_underscore {
|
||||
timeout-ms = <50>;
|
||||
key-positions = <26 27>;
|
||||
bindings = <&kp UNDER>;
|
||||
};
|
||||
};
|
||||
|
||||
macros {
|
||||
tmux_new: tmux_new {
|
||||
label = "ZM_tmux_new";
|
||||
compatible = "zmk,behavior-macro";
|
||||
#binding-cells = <0>;
|
||||
bindings
|
||||
= <¯o_tap &kp LC(B)>
|
||||
, <¯o_tap &kp C>
|
||||
;
|
||||
};
|
||||
tmux_zoom: tmux_zoom {
|
||||
label = "ZM_tmux_zoom";
|
||||
compatible = "zmk,behavior-macro";
|
||||
#binding-cells = <0>;
|
||||
bindings
|
||||
= <¯o_tap &kp LC(B)>
|
||||
, <¯o_tap &kp Z>
|
||||
;
|
||||
};
|
||||
tmux_scroll: tmux_scroll {
|
||||
label = "ZM_tmux_scroll";
|
||||
compatible = "zmk,behavior-macro";
|
||||
#binding-cells = <0>;
|
||||
bindings
|
||||
= <¯o_tap &kp LC(B)>
|
||||
, <¯o_tap &kp LEFT_BRACKET>
|
||||
;
|
||||
};
|
||||
tmux_pn_lt: tmux_pn_lt {
|
||||
label = "ZM_tmux_pn_lt";
|
||||
compatible = "zmk,behavior-macro";
|
||||
#binding-cells = <0>;
|
||||
bindings
|
||||
= <¯o_tap &kp LC(B)>
|
||||
, <¯o_tap &kp LEFT>
|
||||
;
|
||||
};
|
||||
tmux_pn_dn: tmux_pn_dn {
|
||||
label = "ZM_tmux_pn_dn";
|
||||
compatible = "zmk,behavior-macro";
|
||||
#binding-cells = <0>;
|
||||
bindings
|
||||
= <¯o_tap &kp LC(B)>
|
||||
, <¯o_tap &kp DOWN>
|
||||
;
|
||||
};
|
||||
tmux_pn_up: tmux_pn_up {
|
||||
label = "ZM_tmux_pn_up";
|
||||
compatible = "zmk,behavior-macro";
|
||||
#binding-cells = <0>;
|
||||
bindings
|
||||
= <¯o_tap &kp LC(B)>
|
||||
, <¯o_tap &kp UP>
|
||||
;
|
||||
};
|
||||
tmux_pn_rt: tmux_pn_rt {
|
||||
label = "ZM_tmux_pn_rt";
|
||||
compatible = "zmk,behavior-macro";
|
||||
#binding-cells = <0>;
|
||||
bindings
|
||||
= <¯o_tap &kp LC(B)>
|
||||
, <¯o_tap &kp RIGHT>
|
||||
;
|
||||
};
|
||||
tmux_wn_next: tmux_wn_next {
|
||||
label = "ZM_tmux_wn_next";
|
||||
compatible = "zmk,behavior-macro";
|
||||
#binding-cells = <0>;
|
||||
bindings
|
||||
= <¯o_tap &kp LC(B)>
|
||||
, <¯o_tap &kp N>
|
||||
;
|
||||
};
|
||||
tmux_wn_prev: tmux_wn_prev {
|
||||
label = "ZM_tmux_wn_prev";
|
||||
compatible = "zmk,behavior-macro";
|
||||
#binding-cells = <0>;
|
||||
bindings
|
||||
= <¯o_tap &kp LC(B)>
|
||||
, <¯o_tap &kp P>
|
||||
;
|
||||
};
|
||||
tmux_sp_v: tmux_sp_v {
|
||||
label = "ZM_tmux_sp_v";
|
||||
compatible = "zmk,behavior-macro";
|
||||
#binding-cells = <0>;
|
||||
bindings
|
||||
= <¯o_tap &kp LC(B)>
|
||||
, <¯o_tap &kp PERCENT>
|
||||
;
|
||||
};
|
||||
tmux_sp_h: tmux_sp_h {
|
||||
label = "ZM_tmux_sp_h";
|
||||
compatible = "zmk,behavior-macro";
|
||||
#binding-cells = <0>;
|
||||
bindings
|
||||
= <¯o_tap &kp LC(B)>
|
||||
, <¯o_tap &kp DOUBLE_QUOTES>
|
||||
;
|
||||
};
|
||||
vi_clip_cp: vi_clip_cp {
|
||||
label = "ZM_vi_clip_cp";
|
||||
compatible = "zmk,behavior-macro";
|
||||
#binding-cells = <0>;
|
||||
bindings
|
||||
= <¯o_tap &kp DOUBLE_QUOTES>
|
||||
, <¯o_tap &kp PLUS>
|
||||
, <¯o_tap &kp Y>
|
||||
;
|
||||
};
|
||||
vi_clip_pst: vi_clip_pst {
|
||||
label = "ZM_vi_clip_pst";
|
||||
compatible = "zmk,behavior-macro";
|
||||
#binding-cells = <0>;
|
||||
bindings
|
||||
= <¯o_tap &kp DOUBLE_QUOTES>
|
||||
, <¯o_tap &kp PLUS>
|
||||
, <¯o_tap &kp P>
|
||||
;
|
||||
};
|
||||
vi_macro: vi_macro {
|
||||
label = "ZM_vi_macro";
|
||||
compatible = "zmk,behavior-macro";
|
||||
#binding-cells = <0>;
|
||||
bindings
|
||||
= <¯o_tap &kp AT>
|
||||
, <¯o_tap &kp Q>
|
||||
;
|
||||
};
|
||||
vi_save: vi_save {
|
||||
label = "ZM_vi_save";
|
||||
compatible = "zmk,behavior-macro";
|
||||
#binding-cells = <0>;
|
||||
bindings
|
||||
= <¯o_tap &kp ESC>
|
||||
, <¯o_tap &kp COLON &kp W &kp ENTER>
|
||||
, <¯o_tap &kp LC(T)>
|
||||
;
|
||||
};
|
||||
};
|
||||
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
|
||||
// 0
|
||||
// 10
|
||||
// 20
|
||||
|
||||
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 SEMI
|
||||
&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp SLASH
|
||||
&none &mo NUM_L &kp LSHIFT &kp SPACE &mo SYM_L &mo TMUX_L
|
||||
>;
|
||||
};
|
||||
|
||||
num_layer {
|
||||
label = "Num";
|
||||
bindings = <
|
||||
&kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0
|
||||
&trans &trans &kp LG(E) &kp LG(R) &trans &trans &kp N4 &kp N5 &kp N6 &kp COLON
|
||||
&kp F1 &kp F2 &kp F12 &kp F4 &kp F5 &trans &kp N1 &kp N2 &kp N3 &kp DOT
|
||||
&none &none &none &none &none &none
|
||||
>;
|
||||
};
|
||||
|
||||
sym_layer {
|
||||
label = "Sym";
|
||||
bindings = <
|
||||
&kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp ASTRK &kp PLUS &kp EQUAL
|
||||
&kp COLON &kp LT &kp LS(N5) &kp LS(N6) &kp GT &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans
|
||||
&kp COLON &kp LBRC &kp LBKT &kp RBKT &kp RBRC &kp HOME &kp PG_DN &kp PG_UP &kp END &trans
|
||||
&none &none &none &none &none &none
|
||||
>;
|
||||
};
|
||||
|
||||
tmux_layer {
|
||||
label = "Tmux";
|
||||
bindings = <
|
||||
&vi_macro &vi_save &none &none &tmux_sp_v &vi_clip_cp &none &none &none &vi_clip_pst
|
||||
&none &tmux_scroll &none &none &none &tmux_pn_lt &tmux_pn_dn &tmux_pn_up &tmux_pn_rt &tmux_sp_h
|
||||
&tmux_zoom &none &tmux_new &none &none &tmux_wn_prev &none &none &tmux_wn_next &none
|
||||
&none &kp DEL &none &none &none &none
|
||||
>;
|
||||
};
|
||||
};
|
||||
};
|
54
app/boards/shields/chrysemys/chrysemys.overlay
Normal file
54
app/boards/shields/chrysemys/chrysemys.overlay
Normal file
@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright (c) 2022 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 = <10>;
|
||||
rows = <4>;
|
||||
map = <
|
||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9)
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9)
|
||||
RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7)
|
||||
>;
|
||||
};
|
||||
|
||||
|
||||
kscan0: kscan_0 {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
diode-direction = "row2col";
|
||||
|
||||
col-gpios
|
||||
= <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
|
||||
, <&pro_micro 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 16 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&pro_micro 18 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
;
|
||||
|
||||
row-gpios
|
||||
= <&pro_micro 1 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 2 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 3 GPIO_ACTIVE_HIGH>
|
||||
, <&pro_micro 4 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
};
|
||||
};
|
8
app/boards/shields/chrysemys/chrysemys.zmk.yml
Normal file
8
app/boards/shields/chrysemys/chrysemys.zmk.yml
Normal file
@ -0,0 +1,8 @@
|
||||
file_format: "1"
|
||||
id: chrysemys
|
||||
name: Chrysemys
|
||||
type: shield
|
||||
url: https://git.sr.ht/~tgrosinger/keyboards/tree/main/item/chrysemys
|
||||
requires: [pro_micro]
|
||||
features:
|
||||
- keys
|
Loading…
Reference in New Issue
Block a user