Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Hazel committed Jul 11, 2023
0 parents commit d913597
Show file tree
Hide file tree
Showing 9 changed files with 238 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
on: [push, pull_request, workflow_dispatch]

jobs:
build:
uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main
3 changes: 3 additions & 0 deletions build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include:
- board: nice_nano_v2
shield: chaz
8 changes: 8 additions & 0 deletions config/boards/shields/chaz/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT

if SHIELD_CHAZ

config ZMK_KEYBOARD_NAME
default "Chaz"
endif
5 changes: 5 additions & 0 deletions config/boards/shields/chaz/Kconfig.shield
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT

config SHIELD_CHAZ
def_bool $(shields_list_contains,chaz)
Empty file.
147 changes: 147 additions & 0 deletions config/boards/shields/chaz/chaz.keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
/*
* Copyright (c) 2022 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/outputs.h>

#define ALPHA 0
#define SYMBOL 1
#define NUMBER 2
#define NAVIGATION 3

&mt {
flavor = "tap-preferred";
tapping_term_ms = <180>;
};

&lt {
tapping_term_ms = <150>;
};

/ {
combos {
compatible = "zmk,combos";
combo_bootloader {
timeout-ms = <50>;
key-positions = <0 9>;
bindings = <&bootloader>;

};
};

behaviors {
qesc: tap_dance_qesc {
compatible = "zmk,behavior-tap-dance";
label = "tap_dance_qesc";
#binding-cells = <0>;
tapping-term-ms = <300>;
bindings = <&kp Q>, <&kp ESC>;
};

bkt: tap_dance_bracket {
compatible = "zmk,behavior-tap-dance";
label = "tap_dance_bracket";
#binding-cells = <0>;
tapping-term-ms = <200>;
bindings = <&kp LBKT>, <&kp RBKT>;
};

brc: tap_dance_brace {
compatible = "zmk,behavior-tap-dance";
label = "tap_dance_braces";
#binding-cells = <0>;
tapping-term-ms = <200>;
bindings = <&kp LBRC>, <&kp RBRC>;
};

par: tap_dance_paren {
compatible = "zmk,behavior-tap-dance";
label = "tap_dance_paren";
#binding-cells = <0>;
tapping-term-ms = <200>;
bindings = <&kp LPAR>, <&kp RPAR>;
};

thn: tap_dance_then {
compatible = "zmk,behavior-tap-dance";
label = "tap_dance_then";
#binding-cells = <0>;
tapping-term-ms = <200>;
bindings = <&kp LT>, <&kp GT>;
};

skq: sticky_quick {
compatible = "zmk,behavior-sticky-key";
label = "sticky_quick";
#binding-cells = <1>;
bindings = <&kp>;
release-after-ms = <200>;
quick-release;
};

hrm: homerow_mods {
compatible = "zmk,behavior-hold-tap";
label = "homerow_mods";
#binding-cells = <2>;
tapping-term-ms = <250>;
quick-tap-ms = <0>;
flavor = "tap-preferred";
bindings = <&kp>, <&kp>;

};

};

conditional_layers {
compatible = "zmk,conditional-layers";
tri_layer {
if-layers = <SYMBOL NUMBER>;
then-layer = <NAVIGATION>;
};
};

keymap {
compatible = "zmk,keymap";

ALPHA_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 SQT
&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT
&skq LSHIFT &skq LCTRL &kp BSPC &sl SYMBOL &kp SPACE &lt NAVIGATION &kp SLASH &kp RET
>;
};

SYMBOL_layer {
bindings = <
&kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp STAR &kp PIPE &none
&kp GRAVE &kp TILDE &kp UNDER &kp EQUAL &none &bkt &brc &par &thn &kp BSLH
&none &none &kp PLUS &kp MINUS &none &none &none &kp COLON &trans &kp SEMI
&trans &trans &trans &trans &trans &trans
>;
};

NUMBER_layer {
bindings = <
&none &none &none &none &none &none &none &none &none &none
&kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0
&none &none &none &none &none &none &none &none &trans &none
&trans &trans &trans &trans &trans &trans
>;
};

NAVIGATION_layer {
bindings = <
&none &kp F2 &out OUT_USB &out OUT_BLE &bt BT_CLR &none &kp HOME &kp UP &kp END &kp BSPC
&kp TAB &none &bt BT_SEL 0 &bt BT_SEL 1 &none &none &kp LEFT &kp DOWN &kp RIGHT &kp RET
&none &none &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &none &kp C_PREV &kp C_PP &kp C_NEXT &kp DEL
&trans &trans &trans &trans &trans &trans
>;
};
};
};
51 changes: 51 additions & 0 deletions config/boards/shields/chaz/chaz.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* Copyright (c) 2023 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 = <8>;
rows = <5>;

map = <
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4)
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(5,0) RC(5,1) RC(5,2) RC(5,3) RC(5,4)
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(6,0) RC(6,1) RC(6,2) RC(6,0)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(7,0) RC(7,1) RC(7,2) RC(7,4)
>;
};

kscan0: kscan_0 {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN";
diode-direction = "col2row";

col-gpios
= <&pro_micro 9 GPIO_ACTIVE_HIGH>
, <&pro_micro 8 GPIO_ACTIVE_HIGH>
, <&pro_micro 7 GPIO_ACTIVE_HIGH>
, <&pro_micro 6 GPIO_ACTIVE_HIGH>
, <&pro_micro 5 GPIO_ACTIVE_HIGH>
;

row-gpios
= <&pro_micro 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
};
};
8 changes: 8 additions & 0 deletions config/boards/shields/chaz/chaz.zmk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
file_format: "1"
id: chaz
name: "Chaz"
type: shield
url: https://github.com/hazels-garage/chaz
requires: [pro_micro]
features:
- keys
11 changes: 11 additions & 0 deletions config/west.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
manifest:
remotes:
- name: zmkfirmware
url-base: https://github.com/zmkfirmware
projects:
- name: zmk
remote: zmkfirmware
revision: main
import: app/west.yml
self:
path: config

0 comments on commit d913597

Please sign in to comment.