Skip to content

Commit

Permalink
Adjust scroll and mouse layers
Browse files Browse the repository at this point in the history
* adjust trackball settings

* adjust trackball settings

* adjust trackball settings

* adjust trackball settings

* adjust trackball settings

* adjust trackball settings

* adjust trackball settings

* adjust trackball settings

* reduce REST sample time

* always awake

* use software encodingt

* extend automous timeout

* switch away from force awake and back to REST1 activation

* switch away from force awake and back to REST1 activation

* Remove automouse

* fix back2base behavior assignment

* test removing the tapdance behavior

* test removing the back2base behavior

* test removing the back2base behavior

* test removing both new key mappings

* test removing both new key mappings

* keymap WIP

* keymap WIP

* keymap WIP

* keymap WIP

* Updated charybdis.keymap

* Updated charybdis.keymap

* Updated charybdis.keymap

* keymap WIP

* keymap WIP

* keymap WIP

* keymap WIP

* keymap WIP

* keymap WIP

* keymap WIP

* revert tap dance settings

* revert tap dance settings

* keymap WIP

* Updated charybdis.keymap

* Updated charybdis.keymap

* move behavior around

* base layer wip

* base layer wip

* base layer wip

* add in tdtb

* try &none instead of the tap dance

* test tdtb on different layer

* test tdtb on different layer

* test tdtb on base layer with no indent

* empty base layer with thum set to tdtb

* empty base layer with thum set to tdtb

* empty base layer with thum set to tdtb

* Updated charybdis.keymap

* add top row to base

* add middle row to base

* add bottom row to base

* add next thumb key

* add forth thumb key

* add forth thumb key

* add fifth thumb key

* remove commented base layer

* remove gitignore

* remove gitignore

* update game & photo layers, change backspace to back space, and update single key in Photos

* update game & photo layers, change backspace to back space, and update single key in Photos

* change scroll layers to 1,2,3,9

* fix mouse layer references and update script

* update the regex for columns to handle ZMK commands better

* Update manual mouse layers

* move mods to layers & update behaviors

* fix auto keymap drawing

* fix auto keymap drawing

* change combo name

* change combo name

* test multi-line string in yaml

* test multi-line string in yaml

* update wording for base or extra combo

* update wording for base or extra combo

* update keymap words

* update keymap words

* update keymap words

* update keymap words

* update keymap words

* update keymap names for photo layer

* update keymap names for photo layer

* Updated charybdis.keymap

* fix layers and enable auto layer

* disable automouse

* disable automouse

* add key description

* add key description

* enable automouse

---------

Co-authored-by: keymap-editor[bot] <91849743+keymap-editor[bot]@users.noreply.github.com>
Co-authored-by: 280Zo <280Zo@users.noreply.github.com>
Co-authored-by: keymap-editor[bot] <keymap-editor[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Aug 17, 2024
1 parent 02c5cb3 commit f8f79a8
Show file tree
Hide file tree
Showing 10 changed files with 811 additions and 900 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/draw_keymaps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ on:
type: string
fail_on_error:
description: "Fail the action if an error occurs during parse/draw"
default: false
default: true
required: false
type: boolean
outputs:
Expand Down Expand Up @@ -139,7 +139,28 @@ jobs:
- name: Draw keymaps
id: draw
env:
KEYMAP_raw_binding_map: '{"&bootloader": "BOOT LDR", "&mkp RCLK": "R CLK", "&mkp LCLK": "L CLK", "&mkp MCLK": "M CLK", "&mkp MB5": "FWD", "&mmv MOVE_RIGHT": "MOVE R", "&mmv MOVE_DOWN": "MOVE D", "&mmv MOVE_LEFT": "MOVE L", "&mkp MB4": "BACK", "&msc MOVE_RIGHT": "WHEEL R", "&msc MOVE_DOWN": "WHEEL U", "&mmv MOVE_UP": "MOVE UP", "&msc MOVE_UP": "WHEEL D", "&msc MOVE_LEFT": "WHEEL L", "&HSplit": "HSPLIT", "&VSplit": "VSPLIT", "&caps_word": "CAPS WORD" }'
KEYMAP_raw_binding_map: >
{"&bootloader": "BOOT LDR"
, "&mkp RCLK": "R CLK"
, "&mkp LCLK": "L CLK"
, "&mkp MCLK": "M CLK"
, "&mkp MB5": "FWD"
, "&mmv MOVE_RIGHT": "MOVE R"
, "&mmv MOVE_DOWN": "MOVE D"
, "&mmv MOVE_LEFT": "MOVE L"
, "&mkp MB4": "BACK"
, "&msc MOVE_RIGHT": "WHEEL R"
, "&msc MOVE_DOWN": "WHEEL U"
, "&mmv MOVE_UP": "MOVE UP"
, "&msc MOVE_UP": "WHEEL D"
, "&msc MOVE_LEFT": "WHEEL L"
, "&HSplit": "HSPLIT"
, "&VSplit": "VSPLIT"
, "&caps_word": "CAPS WORD"
, "&td_bore": "L_BASE L_EXTRA"
, "&tdtb": "TRACKBALL SCROLL"
, "&tdtb2": "SNIPE SCROLL"
}
run: |
get_args() {
local keyboard=$2
Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This repository outlines most of the steps needed to build/modify the ZMK firmwa

## Pre Built Firmware

If you'd like to skip all the configuration steps and use something prebuilt, the firmware files can be found in the [Actions Workflows](https://github.com/280Zo/charybdis-wireless-mini-zmk-firmware/actions?query=is%3Acompleted+branch%3Amain). Just log in, click the link, select the latest run that passed on the main branch, and download the 'firmware-charybdis-nanov2-qwerty' artifact (there's also a colemak dh firmware for those few that want to use that layout).
If you'd like to skip all the configuration steps and use something prebuilt, the firmware files can be found in the [Actions Workflows](https://github.com/280Zo/charybdis-wireless-mini-zmk-firmware/actions?query=is%3Acompleted+branch%3Amain). Just click the link, select the latest run that passed on the main branch, and download the `firmware-charybdis-nanov2-qwerty` artifact (there's also a colemak dh firmware for those few that want to use that layout). You'll have to be logged into Github for this.
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.
Expand Down Expand Up @@ -46,15 +46,16 @@ Using a GUI to generate the keymap file content is the easiest option. Head over
- Save
- Wait for the pipeline to run
- Download and flash the new firmware
- Unzip the firmware.zip
- Plug the right half info the computer through USB
- Double press the reset button
- The keyboard will mount as a removable storage device
- Copy the right side uf2 file into the NICENANO storage device.
- It will take a few seconds, then it will unmount and restart itself.
- Plug in the left half, and copy the left uf2 file.
- Both halves of the keyboard should now be flashed with the firmware.

### Flashing the Firmware
- Unzip the firmware.zip
- Plug the right half info the computer through USB
- Double press the reset button
- The keyboard will mount as a removable storage device
- Copy the right side uf2 file into the NICENANO storage device.
- It will take a few seconds, then it will unmount and restart itself.
- Plug in the left half, and copy the left uf2 file.
- Both halves of the keyboard should now be flashed with the firmware.

## Building Your Own Firmware

Expand Down
16 changes: 11 additions & 5 deletions config/boards/shields/charybdis-mini-wireless/charybdis_right.conf
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 @@ -9,15 +9,21 @@ CONFIG_PMW3610=y

# https://github.com/inorichi/zmk-pmw3610-driver/blob/main/Kconfig
CONFIG_PMW3610_SMART_ALGORITHM=y
CONFIG_PMW3610_CPI=1600
CONFIG_PMW3610_CPI=1200
CONFIG_PMW3610_CPI_DIVIDOR=3
CONFIG_PMW3610_SNIPE_CPI=200
CONFIG_PMW3610_SNIPE_CPI_DIVIDOR=1
CONFIG_PMW3610_SCROLL_TICK=20

CONFIG_PMW3610_POLLING_RATE_125_SW=y
CONFIG_PMW3610_REST1_SAMPLE_TIME_MS=20
CONFIG_PMW3610_RUN_DOWNSHIFT_TIME_MS=2000
# 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_ORIENTATION_90=y
CONFIG_PMW3610_INVERT_X=y
CONFIG_PMW3610_INVERT_SCROLL_Y=n
CONFIG_PMW3610_AUTOMOUSE_TIMEOUT_MS=400
CONFIG_PMW3610_AUTOMOUSE_TIMEOUT_MS=450
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,14 @@
irq-gpios = <&gpio0 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
/* optional features */
snipe-layers = <8>;
scroll-layers = <1 2 5 6>;
automouse-layer = <4>;
scroll-layers = <1 2 3 9>;
automouse-layer = <7>;
};
};

/ {
trackball_listener {
compatible = "zmk,input-listener";
device = <&trackball>;

};
};
1 change: 1 addition & 0 deletions config/charybdis.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ CONFIG_BT_BUF_ACL_TX_COUNT=32
CONFIG_BT_L2CAP_TX_BUF_COUNT=32

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
133 changes: 86 additions & 47 deletions config/charybdis.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,52 @@
#include <dt-bindings/zmk/mouse.h>
#include <dt-bindings/zmk/outputs.h>

#define U_TAPPING_TERM 200

/ {
chosen { zmk,matrix_transform = &default_transform; };
};

/ {
hm: homerow_mod {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "tap-preferred";
tapping-term-ms = <250>;
quick-tap-ms = <150>;
require-prior-idle-ms = <125>;
bindings = <&kp>, <&kp>;
behaviors {
hm: homerow_mod {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "tap-preferred";
tapping-term-ms = <250>;
quick-tap-ms = <150>;
require-prior-idle-ms = <125>;
bindings = <&kp>, <&kp>;
};

tdtb: td_mouse_scroll {
compatible = "zmk,behavior-tap-dance";
#binding-cells = <0>;
bindings = <&httl 9 7>, <&to 0>;
tapping-term-ms = <200>;
label = "Trackball & Scroll";
};

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

label = "Scroll Slow & Base";
};

httl: ht_two_layers {
compatible = "zmk,behavior-hold-tap";
bindings = <&mo>, <&to>;

#binding-cells = <2>;
flavor = "balanced";
tapping-term-ms = <200>;
};

td_bore: BASE_or_EXTRA {
compatible = "zmk,behavior-tap-dance";
#binding-cells = <0>;
bindings = <&mo 6>, <&to 0>;
};
};

combos {
Expand All @@ -28,15 +59,17 @@
Delete {
bindings = <&kp DELETE>;
key-positions = <8 9>;
layers = <0>;
};

CapsWord {
bindings = <&caps_word>;
key-positions = <17 18>;
layers = <0>;
};

Layer_7 {
bindings = <&mo 7>;
BASE_or_EXTRAS {
bindings = <&td_bore>;
key-positions = <38 39>;
};
};
Expand All @@ -57,76 +90,64 @@
};
};

behaviors {
};

keymap {
compatible = "zmk,keymap";

Base {
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 5
&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 6
&hm LC(F10) C_PLAY_PAUSE &lt 1 BACKSPACE &lt 2 ESCAPE &lt 4 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 &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
>;
};

Num {
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 &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
>;
};

Nav {
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 &none
&none &none &none &none &none &none &HSplit &kp HOME &kp PG_DN &kp PG_UP &kp END &trans
&none &none &trans &trans &trans
>;
};

Sym {
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 &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
>;
};

Mouse {
GAME {
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 &none
&tog 8 &mkp LCLK &mkp RCLK &none &none
&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
&trans &kp SPACE &kp LEFT_ALT &none &none
>;
};

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 &none
&none &kp SPACE &kp LEFT_ALT &none &none
>;
};

Photos {
PHOTOS {
bindings = <
&trans &kp LA(LC(LS(Z))) &kp LA(LC(LS(E))) &kp LA(LC(LS(A))) &kp LA(LC(LS(S))) &kp LA(LC(LS(B))) &none &none &none &none &none &none
&kp LC(LA(E)) &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp LCTRL &none &none &none &none &none &none
&kp LS(DELETE) &kp LA(LS(A)) &kp LA(KP_N1) &kp LA(KP_N2) &kp LA(KP_N3) &none &none &none &none &none &none &to 0
&none &none &trans &trans &trans
&kp LS(DELETE) &kp LA(LS(A)) &kp LA(KP_N1) &kp LA(KP_N2) &kp LA(KP_N3) &none &none &none &none &none &none &trans
&trans &none &trans &trans &trans
>;
};

Extras {
EXTRAS {
bindings = <
&kp C_SLEEP &none &none &none &none &kp C_BRIGHTNESS_MAXIMUM &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_CLR &kp C_AL_COFFEE
&kp C_POWER &none &none &none &none &kp C_BRIGHTNESS_INC &out OUT_TOG &kp C_PREVIOUS &kp C_PLAY_PAUSE &kp C_STOP &kp C_NEXT &none
Expand All @@ -135,12 +156,30 @@
>;
};

Slow_TrkBl {
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
>;
};

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
>;
};

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 &none
&tog 8 &mkp LCLK &mkp RCLK &none &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
>;
};
};
Expand Down
Loading

0 comments on commit f8f79a8

Please sign in to comment.