From 27c5e72cba408a22d1a420b3923e3264a14d41e5 Mon Sep 17 00:00:00 2001 From: Sebastian Moser Date: Mon, 22 Jul 2024 19:41:29 +0200 Subject: [PATCH] add zmk config --- zmk-config/build.yaml | 19 +++++++ zmk-config/config/charybdis.conf | 6 ++ zmk-config/config/charybdis.keymap | 79 ++++++++++++++++++++++++++ zmk-config/config/charybdis_right.conf | 7 +++ zmk-config/config/corne.conf | 7 +++ zmk-config/config/corne.keymap | 68 ++++++++++++++++++++++ zmk-config/config/info.json | 55 ++++++++++++++++++ zmk-config/config/west.yml | 11 ++++ 8 files changed, 252 insertions(+) create mode 100644 zmk-config/build.yaml create mode 100644 zmk-config/config/charybdis.conf create mode 100644 zmk-config/config/charybdis.keymap create mode 100644 zmk-config/config/charybdis_right.conf create mode 100644 zmk-config/config/corne.conf create mode 100644 zmk-config/config/corne.keymap create mode 100644 zmk-config/config/info.json create mode 100644 zmk-config/config/west.yml diff --git a/zmk-config/build.yaml b/zmk-config/build.yaml new file mode 100644 index 0000000..d983bc7 --- /dev/null +++ b/zmk-config/build.yaml @@ -0,0 +1,19 @@ +# This file generates the GitHub Actions matrix +# For simple board + shield combinations, add them +# to the top level board and shield arrays, for more +# control, add individual board + shield combinations to +# the `include` property, e.g: +# +# board: [ "nice_nano_v2" ] +# shield: [ "corne_left", "corne_right" ] +# include: +# - board: bdn9_rev2 +# - board: nice_nano_v2 +# shield: reviung41 +# +--- +include: + - board: nice_nano_v2 + shield: charybdis_left + - board: nice_nano_v2 + shield: charybdis_right diff --git a/zmk-config/config/charybdis.conf b/zmk-config/config/charybdis.conf new file mode 100644 index 0000000..d926111 --- /dev/null +++ b/zmk-config/config/charybdis.conf @@ -0,0 +1,6 @@ +CONFIG_BT_LL_SW_LLCP_LEGACY=y + +CONFIG_BT_PERIPHERAL_PREF_MAX_INT=9 +CONFIG_BT_PERIPHERAL_PREF_LATENCY=16 +CONFIG_BT_BUF_ACL_TX_COUNT=32 +CONFIG_BT_L2CAP_TX_BUF_COUNT=32 diff --git a/zmk-config/config/charybdis.keymap b/zmk-config/config/charybdis.keymap new file mode 100644 index 0000000..ace8944 --- /dev/null +++ b/zmk-config/config/charybdis.keymap @@ -0,0 +1,79 @@ +#include +#include +#include +#include +#include +#include + +< { + tapping-term-ms = <240>; + flavor = "balanced"; + quick-tap-ms = <150>; +}; + +/ { + keymap { + compatible = "zmk,keymap"; + + Base { + label = "Base"; + bindings = < + &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC + &kp ESC &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp APOS +&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHIFT + &kp LCTRL &kp SPACE &mo 1 &mo 2 &kp RET + >; + + trackball-bindings = <&tmv_coarse>; + }; + + Lower { + label = "Lower"; + bindings = < + &trans &trans &kp UP &trans &trans &trans &kp N7 &kp N8 &kp N9 &kp N0 &kp HOME &kp F1 + &trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &kp N4 &kp N5 &kp N6 &none &trans &kp F10 +&kp LEFT_ALT &trans &trans &trans &kp MINUS &kp PLUS &kp N1 &kp N2 &kp N3 &kp DOT &trans &kp F20 + &kp LGUI &kp SPACE &trans &kp RCTRL &kp RET + >; + }; + + Raise { + label = "Raise"; + bindings = < +&trans &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp DEL +&trans &bt BT_CLR &bt BT_PRV &bt BT_NXT &trans &to 3 &kp UNDER &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE +&trans &out OUT_TOG &bootloader &trans &trans &trans &kp MINUS &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE + &kp LGUI &kp SPACE &kp LEFT_ALT &trans &bootloader + >; + }; + + Game { + label = "Game"; + bindings = < +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&trans &trans &trans &trans &trans &sl 4 &trans &trans &trans &trans &trans &trans +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &to 0 + &trans &trans &kp LEFT_ALT &kp RGUI &trans + >; + }; + + Game_++ { + label = "Game ++"; + bindings = < + &kt F5 &kp NUMBER_1 &kp NUMBER_2 &kp NUMBER_3 &kp NUMBER_4 &kp NUMBER_5 &kp LC(RA(Y)) &kp LC(RA(U)) &kp LC(RA(I)) &kp LC(RA(H)) &kp LC(RA(J)) &kp LC(RA(DEL)) + &to 3 &kp L &kp O &kp Y &kp K &kp G &trans &trans &trans &trans &trans &kp LA(F4) +&kp F10 &none &to 0 &none &kp NUMBER_6 &kp NUMBER_7 &trans &trans &trans &trans &trans &to 0 + &kp J &kp I &kp M &trans &trans + >; + }; + + Mouse { + bindings = < + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&mkp MCLK &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &mkp LCLK + &mkp LCLK &trans &mkp RCLK &trans &trans + >; + }; + }; +}; diff --git a/zmk-config/config/charybdis_right.conf b/zmk-config/config/charybdis_right.conf new file mode 100644 index 0000000..b1f57a8 --- /dev/null +++ b/zmk-config/config/charybdis_right.conf @@ -0,0 +1,7 @@ +CONFIG_PMW3610_SMART_ALGORITHM=y +CONFIG_PMW3610_CPI=1000 +CONFIG_PMW3610_CPI_DIVIDOR=4 +CONFIG_PMW3610_ORIENTATION_90=y +CONFIG_ZMK_MOUSE_TICK_DURATION=6 +CONFIG_MOUSE_LAYER_ACTIVE_MS=750 +CONFIG_MOUSE_LAYER_INDEX=5 diff --git a/zmk-config/config/corne.conf b/zmk-config/config/corne.conf new file mode 100644 index 0000000..0a39f96 --- /dev/null +++ b/zmk-config/config/corne.conf @@ -0,0 +1,7 @@ +# Uncomment the following lines to enable the Corne RGB Underglow +# CONFIG_ZMK_RGB_UNDERGLOW=y +# CONFIG_WS2812_STRIP=y + +# Uncomment the following line to enable the Corne OLED Display +CONFIG_ZMK_DISPLAY=y +CONFIG_ZMK_EXT_POWER=y diff --git a/zmk-config/config/corne.keymap b/zmk-config/config/corne.keymap new file mode 100644 index 0000000..9442f25 --- /dev/null +++ b/zmk-config/config/corne.keymap @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + + Base { + // ----------------------------------------------------------------------------------------- + // | TAB | Q | W | E | R | T | | Y | U | I | O | P | BKSP | + // | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' | + // | SHFT | Z | X | C | V | B | | N | M | , | . | / | ESC | + // | GUI | LWR | SPC | | ENT | RSE | ALT | + + label = "Base"; + bindings = < + &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC + &kp ESC &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp APOS + &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHIFT + &kp LCTRL &mo 1 &kp SPACE &kp RET &mo 2 &kp RALT + >; + }; + + Lower { + // ----------------------------------------------------------------------------------------- + // | TAB | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BKSP | + // | BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | LFT | DWN | UP | RGT | | | + // | SHFT | | | | | | | | | | | | | + // | GUI | | SPC | | ENT | | ALT | + + label = "Lower"; + bindings = < + &kp TAB &kp K_PP &kp UP &kp N1 &kp N2 &kp N3 &kp N7 &kp N8 &kp N9 &kp N0 &kp HOME &trans + &kp LALT &kp LEFT &kp DOWN &kp RIGHT &kp N4 &kp N5 &kp N4 &kp N5 &kp N6 &kp RIGHT &trans &kp F10 + &kp LSHFT &trans &trans &trans &kp MINUS &kp PLUS &kp N1 &kp N2 &kp N3 &kp DOT &trans &kp RSHIFT + &kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT + >; + }; + + Raise { + // ----------------------------------------------------------------------------------------- + // | TAB | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BKSP | + // | CTRL | | | | | | | - | = | [ | ] | \ | ` | + // | SHFT | | | | | | | _ | + | { | } | "|" | ~ | + // | GUI | | SPC | | ENT | | ALT | + + label = "Raise"; + bindings = < + &trans &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp DEL + &trans &bt BT_CLR &bt BT_PRV &bt BT_NXT &bt BT_SEL 0 &to 3 &kp UNDER &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE + &trans &out OUT_TOG &trans &trans &trans &trans &kp MINUS &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE + &kp LGUI &kp LEFT_ALT &kp SPACE &kp RET &trans &kp RALT + >; + }; + }; +}; + +&nice_view_spi { + cs-gpios = <&pro_micro 0 GPIO_ACTIVE_HIGH>; +}; diff --git a/zmk-config/config/info.json b/zmk-config/config/info.json new file mode 100644 index 0000000..630f8ed --- /dev/null +++ b/zmk-config/config/info.json @@ -0,0 +1,55 @@ +{ + "id": "charybdis", + "name": "charybdis", + "layouts": { + "default": { + "layout": [ + { "label": "Tab", "row": 0, "col": 0, "x": 0, "y": 0.36 }, + { "label": "Q", "row": 0, "col": 1, "x": 1, "y": 0.36 }, + { "label": "W", "row": 0, "col": 2, "x": 2, "y": 0.11 }, + { "label": "E", "row": 0, "col": 3, "x": 3, "y": -0.015 }, + { "label": "R", "row": 0, "col": 4, "x": 4, "y": 0.11 }, + { "label": "T", "row": 0, "col": 5, "x": 5, "y": 0.235 }, + { "label": "Y", "row": 0, "col": 7, "x": 9, "y": 0.235 }, + { "label": "U", "row": 0, "col": 8, "x": 10, "y": 0.11 }, + { "label": "I", "row": 0, "col": 9, "x": 11, "y": -0.015 }, + { "label": "O", "row": 0, "col": 10, "x": 12, "y": 0.11 }, + { "label": "P", "row": 0, "col": 11, "x": 13, "y": 0.36 }, + { "label": "BSPC", "row": 0, "col": 12, "x": 14, "y": 0.36 }, + + { "label": "Ctrl", "row": 1, "col": 0, "x": 0, "y": 1.36 }, + { "label": "A", "row": 1, "col": 1, "x": 1, "y": 1.36 }, + { "label": "S", "row": 1, "col": 2, "x": 2, "y": 1.11 }, + { "label": "D", "row": 1, "col": 3, "x": 3, "y": 0.985 }, + { "label": "F", "row": 1, "col": 4, "x": 4, "y": 1.11 }, + { "label": "G", "row": 1, "col": 5, "x": 5, "y": 1.235 }, + { "label": "H", "row": 1, "col": 7, "x": 9, "y": 1.235 }, + { "label": "J", "row": 1, "col": 8, "x": 10, "y": 1.11 }, + { "label": "K", "row": 1, "col": 9, "x": 11, "y": 0.985 }, + { "label": "L", "row": 1, "col": 10, "x": 12, "y": 1.11 }, + { "label": ";", "row": 1, "col": 11, "x": 13, "y": 1.36 }, + { "label": "'", "row": 1, "col": 12, "x": 14, "y": 1.36 }, + + { "label": "LShift", "row": 2, "col": 0, "x": 0, "y": 2.36 }, + { "label": "Z", "row": 2, "col": 1, "x": 1, "y": 2.36 }, + { "label": "X", "row": 2, "col": 2, "x": 2, "y": 2.11 }, + { "label": "C", "row": 2, "col": 3, "x": 3, "y": 1.985 }, + { "label": "V", "row": 2, "col": 4, "x": 4, "y": 2.11 }, + { "label": "B", "row": 2, "col": 5, "x": 5, "y": 2.235 }, + { "label": "N", "row": 2, "col": 7, "x": 9, "y": 2.235 }, + { "label": "M", "row": 2, "col": 8, "x": 10, "y": 2.11 }, + { "label": ",", "row": 2, "col": 9, "x": 11, "y": 1.985 }, + { "label": ".", "row": 2, "col": 10, "x": 12, "y": 2.11 }, + { "label": "/", "row": 2, "col": 11, "x": 13, "y": 2.36 }, + { "label": "Esc", "row": 2, "col": 12, "x": 14, "y": 2.36 }, + + { "label": "GUI", "row": 3, "col": 3, "x": 3.48, "y": 3.13, "r": 0 }, + { "label": "LWR", "row": 3, "col": 4, "x": 3.48, "y": 3.13, "r": 15, "rx": 3.98, "ry": 7.63 }, + { "label": "SPC", "row": 3, "col": 5, "x": 3.48, "y": 3.1, "r": 30, "rx": 3.98, "ry": 7.63 }, + { "label": "ENT", "row": 3, "col": 7, "x": 10.52, "y": 3.1, "r": -30, "rx": 11.02, "ry": 7.63 }, + { "label": "RSE", "row": 3, "col": 8, "x": 10.52, "y": 3.13, "r": -15, "rx": 11.02, "ry": 7.63 } + ] + } + }, + "sensors": [] +} \ No newline at end of file diff --git a/zmk-config/config/west.yml b/zmk-config/config/west.yml new file mode 100644 index 0000000..ef93b42 --- /dev/null +++ b/zmk-config/config/west.yml @@ -0,0 +1,11 @@ +manifest: + remotes: + - name: zmkfirmware + url-base: https://github.com/victorlucachi + projects: + - name: zmk + remote: zmkfirmware + revision: pmw3610-aml + import: app/west.yml + self: + path: config