diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d74fb89..04d74ab 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,3 +1,4 @@ +name: Build firmware on: [push, pull_request, workflow_dispatch] jobs: diff --git a/.github/workflows/draw-keymaps.yml b/.github/workflows/draw-keymaps.yml index 039585e..c30734c 100644 --- a/.github/workflows/draw-keymaps.yml +++ b/.github/workflows/draw-keymaps.yml @@ -10,16 +10,18 @@ on: # - 'config/*.json' - 'config/keymap_drawer.config.yaml' - '.github/workflows/draw-keymaps.yml' - - 'config/boards/*/*/*.keymap' + - 'boards/*/*/*.keymap' + - 'boards/*/*/*.dtsi' jobs: draw: uses: caksoylar/keymap-drawer/.github/workflows/draw-zmk.yml@main with: - keymap_patterns: "config/boards/*/*/*.keymap" # path to the keymaps to parse + keymap_patterns: "boards/*/*/*.keymap" # path to the keymaps to parse config_path: "config/keymap_drawer.config.yaml" # config file, ignored if not exists - output_folder: "keymap" # path to save produced SVGs # branch to use + output_folder: "keymap" # path to save produced SVGs + json_path: "boards/*/*" # path to physical layout json amend_commit: true # amend generated files to commit that produces them parse_args: "" # map of extra args to pass to `keymap parse`, e.g. "corne:'-l Def Lwr Rse' cradio:''" - draw_args: "" # map of extra args to pass to `keymap draw`, e.g. "corne:'-k corne_rotated' cradio:'-k paroxysm'" + draw_args: "sweep:'-z ferris'" # map of extra args to pass to `keymap draw`, e.g. "corne:'-k corne_rotated' cradio:'-k paroxysm'" fail_on_error: true diff --git a/.gitignore b/.gitignore index 13b262f..1de80ab 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /.vs/zmk-config/FileContentIndex/56ee7683-e67e-425a-8c1a-5989d68e9d8f.vsidx /.vs/zmk-config/v17/.wsuo /.vs +.DS_Store diff --git a/README.md b/README.md index e500f38..01d3a70 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Ferris Sweep ZMK Configuration +[![Build firmware](https://github.com/conlank/zmk-config/actions/workflows/build.yml/badge.svg?branch=4.1esb)](https://github.com/conlank/zmk-config/actions/workflows/build.yml) + This repository contains a customized [ZMK](https://github.com/zmkfirmware/zmk) configuration for the split [Ferris Sweep](https://github.com/davidphilipbarr/Sweep) keyboard. It supports a pair of nice!nano v2 peripherals that communicate with a dedicated [Seeed Studio XIAO nRF52840](https://amzn.to/3LOPtYW) board acting as the split dongle. The key split transport is provided by the [ZMK ESB Split Transport module](https://github.com/badjeff/zmk-feature-split-esb) for low-latency communication between the halves and the dongle. ## Highlights @@ -8,7 +10,7 @@ This repository contains a customized [ZMK](https://github.com/zmkfirmware/zmk) - ESB-based wireless split transport for reduced latency and reliable peripheral links. - Dedicated XIAO BLE dongle build target for USB host connectivity. - Battery reporting retained on peripherals with ESB transport. -- Improved battery benefits of being in Dongle mode. +- Improved battery benefits of being in Dongle mode. - GitHub Actions matrix configured to compile dongle and peripheral firmware artifacts. ## Repository Layout @@ -33,7 +35,7 @@ This repository contains a customized [ZMK](https://github.com/zmkfirmware/zmk) ## Keymap -![keyboard layout](./keymap/cradio.svg) +![keyboard layout](./keymap/sweep.svg) ## Credits diff --git a/boards/shields/sweep/ferris.dtsi b/boards/shields/sweep/ferris.dtsi index df602c1..b3d64bc 100644 --- a/boards/shields/sweep/ferris.dtsi +++ b/boards/shields/sweep/ferris.dtsi @@ -44,4 +44,4 @@ , <&key_physical_attrs 100 100 770 355 (-1500) 770 455> ; }; -}; \ No newline at end of file +}; diff --git a/boards/shields/sweep/sweep.dtsi b/boards/shields/sweep/sweep.dtsi index 10f2bb5..c77da33 100644 --- a/boards/shields/sweep/sweep.dtsi +++ b/boards/shields/sweep/sweep.dtsi @@ -7,6 +7,7 @@ #include #include "ferris.dtsi" + / { chosen { @@ -28,7 +29,7 @@ kscan0: kscan { compatible = "zmk,kscan-gpio-direct"; wakeup-source; - + input-gpios = <&pro_micro 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> , <&pro_micro 18 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> @@ -50,4 +51,4 @@ ; }; -}; \ No newline at end of file +}; diff --git a/boards/shields/sweep/sweep.json b/boards/shields/sweep/sweep.json new file mode 100644 index 0000000..6fc9ab4 --- /dev/null +++ b/boards/shields/sweep/sweep.json @@ -0,0 +1,42 @@ +{ + "layouts": { + "sweep": { + "layout": [ + { "x": 0.0, "y": 0.95 }, + { "x": 1.0, "y": 0.32 }, + { "x": 2.0, "y": 0.0 }, + { "x": 3.0, "y": 0.29 }, + { "x": 4.0, "y": 0.42 }, + { "x": 7.0, "y": 0.42 }, + { "x": 8.0, "y": 0.29 }, + { "x": 9.0, "y": 0.0 }, + { "x": 10.0, "y": 0.32 }, + { "x": 11.0, "y": 0.95 }, + { "x": 0.0, "y": 1.95 }, + { "x": 1.0, "y": 1.32 }, + { "x": 2.0, "y": 1.0 }, + { "x": 3.0, "y": 1.29 }, + { "x": 4.0, "y": 1.42 }, + { "x": 7.0, "y": 1.42 }, + { "x": 8.0, "y": 1.29 }, + { "x": 9.0, "y": 1.0 }, + { "x": 10.0, "y": 1.32 }, + { "x": 11.0, "y": 1.95 }, + { "x": 0.0, "y": 2.95 }, + { "x": 1.0, "y": 2.32 }, + { "x": 2.0, "y": 2.0 }, + { "x": 3.0, "y": 2.29 }, + { "x": 4.0, "y": 2.42 }, + { "x": 7.0, "y": 2.42 }, + { "x": 8.0, "y": 2.29 }, + { "x": 9.0, "y": 2.0 }, + { "x": 10.0, "y": 2.32 }, + { "x": 11.0, "y": 2.95 }, + { "x": 3.3, "y": 3.55, "r": 15.0, "rx": 4.3, "ry": 4.55 }, + { "x": 4.3, "y": 3.55, "r": 30.0, "rx": 4.3, "ry": 4.55 }, + { "x": 6.7, "y": 3.55, "r": -30.0, "rx": 7.7, "ry": 4.55 }, + { "x": 7.7, "y": 3.55, "r": -15.0, "rx": 7.7, "ry": 4.55 } + ] + } + } +} diff --git a/boards/shields/sweep/sweep.keymap b/boards/shields/sweep/sweep.keymap index e64c023..d91be30 100644 --- a/boards/shields/sweep/sweep.keymap +++ b/boards/shields/sweep/sweep.keymap @@ -94,7 +94,7 @@ combo_capsword { timeout-ms = <40>; key-positions = <20 29>; - bindings =<&caps_word>; + bindings =<&caps_word>; }; }; keymap { @@ -132,7 +132,7 @@ //╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯ &mo 5 &kp SPACE &trans &kp ENTER // ╰──────────┴──────────╯ ╰──────────┴──────────╯ - >; + >; }; left_layer { @@ -182,7 +182,7 @@ &bootloader &trans &trans &trans &bt BT_SEL 1 &trans &trans &trans &trans &bootloader //├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤ //│ │ │ │ CLEAR BT │PROFILE 2 │ │ │ │ │ │ │ - &trans &trans &trans &bt BT_CLR &bt BT_SEL 2 &trans &trans &trans &trans &trans + &studio_unlock &trans &trans &bt BT_CLR &bt BT_SEL 2 &trans &trans &trans &trans &trans //╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯ &trans &trans &trans &trans // ╰──────────┴──────────╯ ╰──────────┴──────────╯ @@ -205,5 +205,13 @@ // ╰──────────┴──────────╯ ╰──────────┴──────────╯ >; }; + + extra1 { + status = "reserved"; + }; + + extra2 { + status = "reserved"; + }; }; }; diff --git a/boards/shields/sweep/sweep_central_dongle.conf b/boards/shields/sweep/sweep_central_dongle.conf index cda3ee8..b209e2c 100644 --- a/boards/shields/sweep/sweep_central_dongle.conf +++ b/boards/shields/sweep/sweep_central_dongle.conf @@ -38,7 +38,7 @@ CONFIG_ZMK_SPLIT_ESB_PROTO_TX_RETRANSMIT_COUNT=3 # set 2, if CONFIG_ZMK_BLE is enabled on central, which needs BLE and ESB simultaneously CONFIG_MPSL_TIMESLOT_SESSION_COUNT=1 -# Number of message queue size to buffer ESB payload for TX in between multi-protocol service +# Number of message queue size to buffer ESB payload for TX in between multi-protocol service # timeslots (CONFIG_MPSL_TIMESLOT_SESSION_COUNT) CONFIG_ZMK_SPLIT_ESB_PROTO_MSGQ_ITEMS=16 @@ -67,4 +67,4 @@ CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y CONFIG_BT_MAX_PAIRED=2 CONFIG_DONGLE_SCREEN_BATTERY_ACTIVE=n CONFIG_DONGLE_SCREEN_OUTPUT_ACTIVE=n -CONFIG_DONGLE_SCREEN_AMBIENT_LIGHT=y \ No newline at end of file +CONFIG_DONGLE_SCREEN_AMBIENT_LIGHT=y diff --git a/keymap/sweep.svg b/keymap/sweep.svg new file mode 100644 index 0000000..d447b8e --- /dev/null +++ b/keymap/sweep.svg @@ -0,0 +1,2500 @@ + +/* start glyphs */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +/* end glyphs */ + + +Base: + + + + +Q + + + + + +W + + + + +E + + + + +R + + + + +T + + + + +Y + + + + +U + + + + +I + + + + +O + + + + +P + + + + + +A + + + + +S + + + + +D + + + + +F + + + + +G + + + + +H + + + + +J + + + + +K + + + + +L + + + + +' + + + + + +Z + + + + +X + + + + +C + + + + +V + + + + +B + + + + +N + + + + +M + + + + +, + + + + +. + + + + +/ + + + + + + + +Left + + + + + + + + + + + + + + +ENTER + +Right + + + + +Gaming: + + + + +F + + + + +Q + + + + +W + + + + +E + + + + +R + + + + + +Gaming + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +A + + + + +S + + + + +D + + + + +G + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Z + + + + +X + + + + +C + + + + +B + + + + +M + + + + +ESC + + + + + + + + + + + + + + + + + + + + + +AltGame + + + + + + + + + + + + + + + +ENTER + + + + +Left: + + + + +! + + + + +@ + + + + +# + + + + +$ + + + + +% + + + + +^ + + + + +& + + + + +* + + + + +( + + + + +) + + + + +1 + + + + +2 + + + + +3 + + + + +4 + + + + +5 + + + + +6 + + + + +7 + + + + +8 + + + + +9 + + + + +0 + + + + +F1 + + + + +F2 + + + + +F3 + + + + +F4 + + + + +F5 + + + + +F6 + + + + +F7 + + + + +F8 + + + + +F9 + + + + +? + + + + + + + + +ESC + + + + + + + + + + + + + + +Right: + + + + +~ + + + + +< + + + + + + + + + +> + + + + ++ + + + + +^ + + + + +( + + + + +) + + + + +: + + + + + +PGUP + +HOME + + + + +` + + + + + + + + + + + + + + + + + + + +- + + + + +* + + + + +[ + + + + +] + + + + +; + + + + + +PGDN + +END + + + + +| + + + + += + + + + +{ + + + + +} + + + + +_ + + + + += + + + + +{ + + + + +} + + + + +\ + + + + +PSCRN + + + + + + + + + + + + + + + + + + + + + + + +Config: + + + + + + + + + + + + + + + + + + + +&studio_u… + + + + + +0 + + + + + +Gaming + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +&studio_u… + + + + + + + + + + + + + + + + + + + + + +2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Alt Game: + + + + +4 + + + + +1 + + + + + + + + + +2 + + + + +3 + + + + +^ + + + + +& + + + + +* + + + + +( + + + + +) + + + + +5 + + + + + + + + + + + + + + + + + + + +T + + + + +6 + + + + +7 + + + + +8 + + + + +9 + + + + +0 + + + + +F1 + + + + +F2 + + + + +F3 + + + + +F4 + + + + +F5 + + + + +F6 + + + + +F7 + + + + +F8 + + + + +F9 + + + + +F10 + + + + + + + + + + + + + + + + + + + + + + +Combos: + + + + + +ESC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +DEL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +BSPC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Created with keymap-drawer diff --git a/keymap/sweep.yaml b/keymap/sweep.yaml new file mode 100644 index 0000000..73da5ea --- /dev/null +++ b/keymap/sweep.yaml @@ -0,0 +1,232 @@ +layout: {zmk_keyboard: sweep} +layers: + Base: + - {t: Q, h: '$$mdi:apple-keyboard-control$$'} + - W + - E + - R + - T + - Y + - U + - I + - O + - {t: P, h: '$$mdi:apple-keyboard-control$$'} + - A + - S + - D + - F + - G + - H + - J + - K + - L + - {t: '''', h: '$$mdi:apple-keyboard-option$$'} + - Z + - X + - C + - V + - B + - N + - M + - ',' + - . + - {t: /, h: '$$mdi:apple-keyboard-shift$$'} + - {t: '$$mdi:keyboard-tab$$', h: Left} + - $$mdi:apple-keyboard-shift$$ + - $$mdi:keyboard-space$$ + - {t: ENTER, h: Right} + Gaming: + - F + - Q + - W + - E + - R + - {t: Gaming, h: '$$mdi:toggle-switch$$'} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - $$mdi:apple-keyboard-shift$$ + - A + - S + - D + - G + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - $$mdi:apple-keyboard-control$$ + - Z + - X + - C + - B + - M + - ESC + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - $$mdi:apple-keyboard-option$$ + - Alt Game + - $$mdi:keyboard-space$$ + - {t: ▽, type: trans} + - ENTER + Left: + - '!' + - '@' + - '#' + - $ + - '%' + - ^ + - '&' + - '*' + - ( + - ) + - '1' + - '2' + - '3' + - '4' + - '5' + - '6' + - '7' + - '8' + - '9' + - '0' + - F1 + - F2 + - F3 + - F4 + - F5 + - F6 + - F7 + - F8 + - F9 + - '?' + - {type: held} + - ESC + - {t: ▽, type: trans} + - {t: ▽, type: trans} + Right: + - '~' + - < + - $$mdi:arrow-up$$ + - '>' + - + + - ^ + - ( + - ) + - ':' + - {t: PG UP, h: HOME} + - '`' + - $$mdi:arrow-left$$ + - $$mdi:arrow-down$$ + - $$mdi:arrow-right$$ + - '-' + - '*' + - '[' + - ']' + - ; + - {t: PG DN, h: END} + - '|' + - '=' + - '{' + - '}' + - _ + - '=' + - '{' + - '}' + - \ + - PSCRN + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {type: held} + Config: + - $$mdi:restart$$ + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - '&studio_unlock' + - {t: '$$mdi:bluetooth-connect$$', s: '0', type: sym_sub_text} + - {t: Gaming, h: '$$mdi:toggle-switch$$'} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - $$mdi:restart$$ + - {t: '$$mdi:flash$$', h: '$$mdi:new-box$$', s: '$$mdi:micro-sd$$', type: sym_by_sym} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: '$$mdi:bluetooth-connect$$', s: '1', type: sym_sub_text} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: '$$mdi:flash$$', h: '$$mdi:new-box$$', s: '$$mdi:micro-sd$$', type: sym_by_sym} + - '&studio_unlock' + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: '$$mdi:bluetooth-settings$$', s: '$$mdi:close-thick$$', type: sym_sub_text} + - {t: '$$mdi:bluetooth-connect$$', s: '2', type: sym_sub_text} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {type: held} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {type: held} + Alt Game: + - '4' + - '1' + - {t: ▽, type: trans} + - '2' + - '3' + - ^ + - '&' + - '*' + - ( + - ) + - '5' + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - {t: ▽, type: trans} + - T + - '6' + - '7' + - '8' + - '9' + - '0' + - F1 + - F2 + - F3 + - F4 + - F5 + - F6 + - F7 + - F8 + - F9 + - F10 + - {type: held} + - $$mdi:keyboard-tab$$ + - {t: ▽, type: trans} + - {t: ▽, type: trans} +combos: +- p: [1, 2] + k: ESC + l: [Base] +- p: [6, 7] + k: DEL +- p: [16, 17] + k: BSPC +- p: [23, 24] + k: $$mdi:apple-keyboard-command$$ + l: [Base, Left, Right] +- p: [25, 26] + k: $$mdi:apple-keyboard-command$$ +- p: [20, 21] + k: $$mdi:apple-keyboard-shift$$ + l: [Base, Left, Right] +- p: [28, 29] + k: $$mdi:apple-keyboard-shift$$ +- p: [20, 29] + k: $$mdi:apple-keyboard-caps$$