Skip to content

Commit

Permalink
update README and merge main locally
Browse files Browse the repository at this point in the history
  • Loading branch information
280Zo committed Sep 9, 2024
2 parents d1fad79 + 4cc4b76 commit 8694d84
Show file tree
Hide file tree
Showing 8 changed files with 191 additions and 161 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/draw_keymaps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ jobs:
, "&td_bore": "L_BASE L_EXTRA"
, "&tdtb": "SCROLL TRACKBALL"
, "&tdtb2": "SCROLL SNIPE"
, "&tdmt": "L1/BS LCLICK"
, "&tdbt": "L2/ESC RCLICK"
}
run: |
get_args() {
Expand Down
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,27 @@ If you'd like to skip all the configuration steps and use something prebuilt, th
There are a few things to note about how I've chosen to configure things.

- The keyboard name is Charybdis. This is what will show up when you connect to it with bluetooth.
- ZMK has terms for each side of a split keyboard. Central is the half that sends keyboard outputs over USB or advertises to other devices over bluetooth. Peripheral is the half that will only send keystrokes to the central once they are paired and connected through bluetooth. I have chosen the right side as central because it fits my desk layout better.
- ZMK has terms for each side of a split keyboard. Central is the half that sends keyboard outputs over USB or advertises to other devices over bluetooth. Peripheral is the half that will only send keystrokes to the central once they are paired and connected through bluetooth. These builds use the right side as central.
- To add support for the PMW3610 sensor, [inorichi's driver](https://github.com/inorichi/zmk-pmw3610-driver?tab=readme-ov-file) is included in the firmware.
- Looking at different options to include support for mouse keys (move and scroll), there are several repos out there. [krikun98](https://github.com/krikun98/zmk/tree/mouse-pr) has one that looked promising, but ultimately I settled on [petejohanson's work](https://github.com/petejohanson/zmk/blob/feat/pointers-move-scroll/docs/docs/behaviors/mouse-emulation.md). This will be included in the prebuilt firmware until ZMK merges it.
- I have disabled the automouse layer activation, but it can be reactiveated in `config/boards/shields/charybdis-mini-wireless/charybdis_right.overlay`.
- [Petejohanson's work](https://github.com/petejohanson/zmk/blob/feat/pointers-move-scroll/docs/docs/behaviors/mouse-emulation.md) is also included in the build to allow mouse keys to work. This will be included until ZMK merges it.

### Keymaps & Layers

There is a lot that's going on with each layer, but the only things you need to know to get started are that the red keys are what to press to activate the layer, layer names are underlined, the BT keys on the EXTRAS layer allow you to select which bluetooth pairing you want, BT-CLR clears the pairing on the selected profile, and the MOUSE, SLOW, and SCROLL layers are activated by the thumb key and allow you use the mouse keys or the trackball to scroll and use the pointer.
Each layer has been heavily influanced by [Miryoku](https://github.com/manna-harbour/miryoku/) and [home row mods](https://precondition.github.io/home-row-mods) that use [bilateral combinations](https://sunaku.github.io/home-row-mods.html) to make typing as efficient and comfortable as possible. Extra attention has also been given to making sure cursor, scrolling, and mouse button opperations are as seemless and available as possible. This removes the need to ever remove your hands from the keyboard home row.

Review the layer maps below to see how each one functions. Then connect the keyboard via USB or bluetooth and start using them.

Here are a few hints for a quick start:

- When moving the trackball, the mouse layer will be automatically activated. When the trackball movement stops, the previous layer is activated again.

- The bluetooth keys on the EXTRAS layer allow you to select which bluetooth pairing you want, BT-CLR clears the pairing on the selected profile.

- The most left thumb button has multiple functions
- When held, the function of the trackball is changed from moving the cursor to scrolling.
- When double tapped, it will reduce the cursor speed for more precision, and activate the mouse layer.
- When single tapped it will activate the base layer.

Here is how each layer is mapped out for the latest firmware.

![keymap images](keymap-drawer/charybdis.svg)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://zmk.dev/docs/config/power#kconfig-2
# https://zmk.dev/docs/config/power#kconfig-2
CONFIG_ZMK_EXT_POWER=y

# https://github.com/inorichi/zmk-pmw3610-driver?tab=readme-ov-file
Expand All @@ -8,9 +8,9 @@ CONFIG_ZMK_MOUSE=y
CONFIG_PMW3610=y

# https://github.com/inorichi/zmk-pmw3610-driver/blob/main/Kconfig
CONFIG_PMW3610_SMART_ALGORITHM=y
CONFIG_PMW3610_CPI=1200
CONFIG_PMW3610_CPI_DIVIDOR=3
CONFIG_PMW3610_SMART_ALGORITHM=n
CONFIG_PMW3610_CPI=400
CONFIG_PMW3610_CPI_DIVIDOR=1
CONFIG_PMW3610_SNIPE_CPI=200
CONFIG_PMW3610_SNIPE_CPI_DIVIDOR=1
CONFIG_PMW3610_SCROLL_TICK=20
Expand All @@ -19,9 +19,9 @@ CONFIG_PMW3610_POLLING_RATE_125_SW=y
# CONFIG_PMW3610_POLLING_RATE_125=y
# CONFIG_PMW3610_POLLING_RATE_250=y

CONFIG_PMW3610_FORCE_AWAKE=y
# CONFIG_PMW3610_RUN_DOWNSHIFT_TIME_MS=2500
# CONFIG_PMW3610_REST1_SAMPLE_TIME_MS=10
# CONFIG_PMW3610_FORCE_AWAKE=y
CONFIG_PMW3610_RUN_DOWNSHIFT_TIME_MS=2000
CONFIG_PMW3610_REST1_SAMPLE_TIME_MS=40

CONFIG_PMW3610_ORIENTATION_90=y
CONFIG_PMW3610_INVERT_X=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
spi-max-frequency = <2000000>;
irq-gpios = <&gpio0 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
/* optional features */
snipe-layers = <8>;
scroll-layers = <1 2 3 9>;
// automouse-layer = <7>;
snipe-layers = <8>;
scroll-layers = <1 9>;
automouse-layer = <7>;
};
};

Expand Down
8 changes: 7 additions & 1 deletion config/charybdis.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
CONFIG_ZMK_SLEEP=y
CONFIG_ZMK_IDLE_TIMEOUT=30000
CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=600000
CONFIG_ZMK_MOUSE=y
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y

Expand All @@ -11,4 +13,8 @@ CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y
CONFIG_ZMK_BATTERY_REPORTING=y
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_PROXY=y
CONFIG_ZMK_BEHAVIORS_QUEUE_SIZE=512
CONFIG_ZMK_BEHAVIORS_QUEUE_SIZE=512

CONFIG_ZMK_RGB_UNDERGLOW=n
CONFIG_WS2812_STRIP=n
CONFIG_ZMK_EXT_POWER=y
66 changes: 33 additions & 33 deletions config/charybdis.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,13 @@
compatible = "zmk,behavior-tap-dance";
#binding-cells = <0>;
bindings = <&httl 9 7>, <&to 0>;
tapping-term-ms = <200>;
label = "Trackball & Scroll";
tapping-term-ms = <200>;
};

tdtb2: td_slow_scroll {
compatible = "zmk,behavior-tap-dance";
#binding-cells = <0>;
bindings = <&httl 9 8>, <&to 0>;

label = "Scroll Slow & Base";
bindings = <&httl 9 0>, <&to 8>;
};

httl: ht_two_layers {
Expand Down Expand Up @@ -79,14 +76,12 @@
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings = <&kp LEFT_SHIFT &kp SEMI &kp LS(V) &kp LS(S) &kp LS(P) &kp RET>;
label = "VSPLIT";
};

HSplit: HSplit {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings = <&kp LEFT_SHIFT &kp SEMI &kp LS(S) &kp LS(P) &kp RET>;
label = "HSPLIT";
};
};

Expand All @@ -95,45 +90,50 @@

BASE {
bindings = <
&kp C_AC_SEARCH &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &to 4
&hm LG(E) TAB &hm LEFT_GUI A &hm LEFT_ALT S &hm LCTRL D &hm LEFT_SHIFT F &kp G &kp H &hm LEFT_SHIFT J &hm RCTRL K &hm RIGHT_ALT L &hm LEFT_META SEMICOLON &kp DEL
&kp LA(LC(T)) &kp Z &mt LC(LA(LEFT_SHIFT)) X &mt LA(LC(LG(LEFT_SHIFT))) C &kp V &kp B &kp N &kp M &mt LA(LC(LG(LEFT_SHIFT))) COMMA &mt LC(LA(LEFT_SHIFT)) PERIOD &kp FSLH &to 5
&tdtb &lt 1 BACKSPACE &lt 2 ESCAPE &lt 7 RETURN &lt 3 SPACE
// ╭────────────────┬──────────────┬─────────────────────────┬─────────────────────────────┬──────────────────┬──────────────╮ ╭──────────────┬─────────────────┬──────────────────────────────────┬──────────────────────────────┬────────────────────────┬─────────╮
&kp C_AC_SEARCH &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &to 4
// ├────────────────┼──────────────┼─────────────────────────┼─────────────────────────────┼──────────────────┼──────────────┤ ├──────────────┼─────────────────┼──────────────────────────────────┼──────────────────────────────┼────────────────────────┼─────────┤
&hm LG(E) TAB &hm LEFT_GUI A &hm LEFT_ALT S &hm LCTRL D &hm LEFT_SHIFT F &kp G &kp H &hm LEFT_SHIFT J &hm RCTRL K &hm RIGHT_ALT L &hm LEFT_META SEMICOLON &kp DEL
// ├────────────────┼──────────────┼─────────────────────────┼─────────────────────────────┼──────────────────┼──────────────┤ ├──────────────┼─────────────────┼──────────────────────────────────┼──────────────────────────────┼────────────────────────┼─────────┤
&kp LA(LC(T)) &kp Z &hm LC(LA(LEFT_SHIFT)) X &hm LA(LC(LG(LEFT_SHIFT))) C &kp V &kp B &kp N &kp M &hm LA(LC(LG(LEFT_SHIFT))) COMMA &hm LC(LA(LEFT_SHIFT)) PERIOD &kp FSLH &to 5
// ╰────────────────┴──────────────┴─────────────────────────┼─────────────────────────────┼──────────────────┼──────────────┤ ├──────────────┼─────────────────┼──────────────────────────────────┴──────────────────────────────┴────────────────────────┴─────────╯
&tdtb2 &lt 1 BACKSPACE &lt 2 ESCAPE &lt 7 RETURN &lt 3 SPACE
// ╰─────────────────────────────┴──────────────────┴──────────────╯ ╰──────────────┴────────────╯
>;
};

NUM {
bindings = <
&none &none &none &none &none &none &kp SLASH &hm F7 N7 &hm F8 N8 &hm F9 N9 &hm F10 MINUS &none
&none &none &none &none &kp BACKSPACE &none &kp ASTRK &hm F4 N4 &hm F5 N5 &hm F6 N6 &hm F11 PLUS &none
&none &none &none &none &none &none &kp DOT &hm F1 N1 &hm F2 N2 &hm F3 N3 &hm F12 EQUAL &trans
&none &none &none &kp N0 &none
&none &none &none &none &none &none &kp SLASH &hm F7 N7 &hm F8 N8 &hm F9 N9 &hm F10 MINUS &none
&kp TAB &none &none &none &kp BACKSPACE &none &kp ASTRK &hm F4 N4 &hm F5 N5 &hm F6 N6 &hm F11 PLUS &none
&none &none &none &none &none &none &kp DOT &hm F1 N1 &hm F2 N2 &hm F3 N3 &hm F12 EQUAL &none
&none &none &none &kp N0 &none
>;
};

NAV {
bindings = <
&none &none &none &none &none &none &none &kp LS(LC(H)) &kp LS(LC(J)) &kp LS(LC(K)) &kp LS(LC(L)) &none
&trans &trans &trans &trans &trans &trans &VSplit &kp LEFT_ARROW &kp DOWN &kp UP &kp RIGHT_ARROW &none
&none &none &none &none &none &none &HSplit &kp HOME &kp PG_DN &kp PG_UP &kp END &trans
&none &none &none &none &none &none &HSplit &kp HOME &kp PG_DN &kp PG_UP &kp END &none
&none &none &trans &trans &trans
>;
};

SYM {
bindings = <
&none &kp SQT &kp CARET &kp PLUS &kp ASTRK &kp BSLH &kp GRAVE &kp TILDE &kp LEFT_BRACE &kp RIGHT_BRACE &kp AMPS &none
&kp PRCNT &hm LEFT_META EXCLAMATION &hm LEFT_ALT LT &hm LCTRL GT &hm LEFT_SHIFT SPACE &kp SLASH &kp COLON &mt LEFT_SHIFT SPACE &hm LCTRL LPAR &hm LEFT_ALT RPAR &kp HASH &none
&none &kp DQT &kp DLLR &kp EQUAL &kp MINUS &kp PIPE &kp SEMICOLON &kp UNDERSCORE &kp LBKT &kp RBKT &kp AT_SIGN &trans
&trans &trans &trans &none &trans
&none &kp PLUS &kp LEFT_BRACE &kp RIGHT_BRACE &kp MINUS &kp COLON &kp BSLH &kp GRAVE &kp DLLR &kp CARET &kp SQT &none
&none &hm LEFT_META EXCL &hm LEFT_ALT LPAR &hm LCTRL RPAR &hm LEFT_SHIFT SPACE &kp TILDE &kp SLASH &hm LEFT_SHIFT SPACE &hm LCTRL LT &hm LEFT_ALT GT &kp HASH &none
&none &kp EQUAL &kp LBKT &kp RBKT &kp UNDERSCORE &kp SEMICOLON &kp PIPE &kp ASTRK &kp AMPS &kp PRCNT &kp AT_SIGN &none
&trans &trans &trans &none &trans
>;
};

GAME {
bindings = <
&kp N1 &kp TAB &kp Q &kp W &kp E &kp R &none &none &none &none &none &to 0
&kp N2 &kp LCTRL &kp A &kp S &kp D &kp F &none &none &none &none &none &none
&kp N3 &kp LSHFT &kp Z &kp X &kp C &kp V &none &none &none &none &none &trans
&kp N3 &kp LSHFT &kp Z &kp X &kp C &kp V &none &none &none &none &none &none
&trans &kp SPACE &kp LEFT_ALT &none &none
>;
};
Expand All @@ -158,28 +158,28 @@

MOUSE {
bindings = <
&none &msc MOVE_LEFT &msc MOVE_UP &mmv MOVE_UP &msc MOVE_DOWN &msc MOVE_RIGHT &none &none &none &none &none &none
&none &mkp MB4 &mmv MOVE_LEFT &mmv MOVE_DOWN &mmv MOVE_RIGHT &mkp MB5 &none &kp RIGHT_SHIFT &kp RCTRL &kp LEFT_ALT &kp LEFT_META &none
&none &kp C_AC_UNDO &kp C_AC_CUT &kp C_AC_COPY &kp C_AC_PASTE &mkp MCLK &none &none &none &none &none &trans
&tdtb2 &mkp LCLK &mkp RCLK &none &none
&none &msc MOVE_LEFT &msc MOVE_UP &mmv MOVE_UP &msc MOVE_DOWN &msc MOVE_RIGHT &none &none &none &none &none &none
&kp TAB &mkp MB4 &mmv MOVE_LEFT &mmv MOVE_DOWN &mmv MOVE_RIGHT &mkp MB5 &none &kp RIGHT_SHIFT &kp RCTRL &kp LEFT_ALT &kp LEFT_META &none
&none &kp C_AC_UNDO &kp C_AC_CUT &kp C_AC_COPY &kp C_AC_PASTE &mkp MCLK &none &none &none &none &none &none
&tdtb2 &mkp LCLK &mkp RCLK &kp RETURN &lt 3 SPACE
>;
};

SLOW {
bindings = <
&none &msc MOVE_LEFT &msc MOVE_UP &mmv MOVE_UP &msc MOVE_DOWN &msc MOVE_RIGHT &none &none &none &none &none &none
&none &mkp MB4 &mmv MOVE_LEFT &mmv MOVE_DOWN &mmv MOVE_RIGHT &mkp MB5 &none &kp RIGHT_SHIFT &kp RCTRL &kp LEFT_ALT &kp LEFT_META &none
&none &kp C_AC_UNDO &kp C_AC_CUT &kp C_AC_COPY &kp C_AC_PASTE &mkp MCLK &none &none &none &none &none &trans
&tdtb &mkp LCLK &mkp RCLK &none &none
&none &msc MOVE_LEFT &msc MOVE_UP &mmv MOVE_UP &msc MOVE_DOWN &msc MOVE_RIGHT &none &none &none &none &none &none
&kp TAB &mkp MB4 &mmv MOVE_LEFT &mmv MOVE_DOWN &mmv MOVE_RIGHT &mkp MB5 &none &kp RIGHT_SHIFT &kp RCTRL &kp LEFT_ALT &kp LEFT_META &none
&none &kp C_AC_UNDO &kp C_AC_CUT &kp C_AC_COPY &kp C_AC_PASTE &mkp MCLK &none &none &none &none &none &none
&tdtb2 &mkp LCLK &mkp RCLK &kp RETURN &lt 3 SPACE
>;
};

SCROLL {
bindings = <
&none &msc MOVE_LEFT &msc MOVE_UP &mmv MOVE_UP &msc MOVE_DOWN &msc MOVE_RIGHT &none &none &none &none &none &none
&none &mkp MB4 &mmv MOVE_LEFT &mmv MOVE_DOWN &mmv MOVE_RIGHT &mkp MB5 &none &kp RIGHT_SHIFT &kp RCTRL &kp LEFT_ALT &kp LEFT_META &none
&none &kp C_AC_UNDO &kp C_AC_CUT &kp C_AC_COPY &kp C_AC_PASTE &mkp MCLK &none &none &none &none &none &trans
&tog 9 &mkp LCLK &mkp RCLK &none &none
&none &msc MOVE_LEFT &msc MOVE_UP &mmv MOVE_UP &msc MOVE_DOWN &msc MOVE_RIGHT &none &none &none &none &none &none
&kp TAB &mkp MB4 &mmv MOVE_LEFT &mmv MOVE_DOWN &mmv MOVE_RIGHT &mkp MB5 &none &kp RIGHT_SHIFT &kp RCTRL &kp LEFT_ALT &kp LEFT_META &none
&none &kp C_AC_UNDO &kp C_AC_CUT &kp C_AC_COPY &kp C_AC_PASTE &mkp MCLK &none &none &none &none &none &none
&tdtb2 &mkp LCLK &mkp RCLK &kp RETURN &lt 3 SPACE
>;
};
};
Expand Down
Loading

0 comments on commit 8694d84

Please sign in to comment.