Skip to content

Commit

Permalink
use custom zmk repo
Browse files Browse the repository at this point in the history
  • Loading branch information
sky-bro committed May 29, 2024
1 parent 83dda92 commit 4f5c95f
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ on: [push, pull_request, workflow_dispatch]

jobs:
build:
uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main
uses: sky-bro/zmk/.github/workflows/build-user-config.yml@k4i-sweep-kbd
6 changes: 6 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#+Title: k4i's split kbd

* References

- [[https://github.com/davidphilipbarr/Sweep][Sweep Repo]]
- [[https://www.youtube.com/watch?v=VShLPvF693k][keymap I initially copied]]
16 changes: 15 additions & 1 deletion config/cradio.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Turn on logging, and set ZMK logging to debug output
CONFIG_ZMK_USB_LOGGING=n

# Bluetooth
CONFIG_BT_MAX_CONN=5
CONFIG_BT_MAX_PAIRED=5
Expand All @@ -11,6 +14,17 @@ CONFIG_ZMK_IDLE_TIMEOUT=30000
CONFIG_ZMK_SLEEP=y
CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000

# MOUSE
CONFIG_ZMK_MOUSE=y

# WPM: inacurate, disabled by default
CONFIG_ZMK_WPM=n

# REPORT
CONFIG_ZMK_BEHAVIORS_QUEUE_SIZE=512
CONFIG_ZMK_SEND_STRING_DEFAULT_WAIT_MS=10
CONFIG_ZMK_SEND_STRING_DEFAULT_TAP_MS=10

# System
# length <= 16
CONFIG_ZMK_KEYBOARD_NAME="k4i's split kbd"
CONFIG_ZMK_KEYBOARD_NAME="sweep split kbd"
44 changes: 35 additions & 9 deletions config/cradio.keymap
Original file line number Diff line number Diff line change
@@ -1,18 +1,35 @@
// Copyright (c) 2022 The ZMK Contributors
// SPDX-License-Identifier: MIT

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

#define MAC 0
#define WIN 1
#define RIG 2
#define LEF 3
#define TRI 4
#define MOUSE 5


#define U_MS_U &mmv MOVE_UP
#define U_MS_D &mmv MOVE_DOWN
#define U_MS_L &mmv MOVE_LEFT
#define U_MS_R &mmv MOVE_RIGHT
#define U_WH_U &msc SCRL_UP
#define U_WH_D &msc SCRL_DOWN
#define U_WH_L &msc SCRL_LEFT
#define U_WH_R &msc SCRL_RIGHT


/ {
chosen {
zmk,charmap = &charmap_us;
};
behaviors {
ht: hold_tap {
label = "hold_tap";
Expand Down Expand Up @@ -43,7 +60,7 @@
&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P
&kp A &ht LALT S &ht LCTRL D &ht LGUI F &kp G &kp H &ht RGUI J &ht RCTRL K &ht RALT L &kp BSPC
&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp ENTER
&lt LEF TAB &kp LSHIFT &kp SPACE &lt RIG TAB
&lt LEF TAB &kp LSHIFT &kp SPACE &lt RIG TAB
>;
};

Expand All @@ -52,35 +69,44 @@
&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P
&kp A &ht LALT S &ht LGUI D &ht LCTRL F &kp G &kp H &ht RCTRL J &ht RGUI K &ht RALT L &kp BSPC
&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp ENTER
&lt LEF TAB &kp LSHIFT &kp SPACE &lt RIG TAB
&lt LEF TAB &kp LSHIFT &kp SPACE &lt RIG TAB
>;
};

right_layer {
bindings = <
&kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0
&kp DEL &kp CAPS &kp PSCRN &kp INS &trans &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT
&trans &trans &trans &trans &trans &trans &kp HOME &kp PG_DN &kp PG_UP &kp END
&kp DEL &kp CAPS &kp PSCRN &kp INS &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans
&trans &trans &trans &trans &trans &kp HOME &kp PG_DN &kp PG_UP &kp END &bootloader
&trans &kp ESC &trans &trans
>;
};

left_layer {
bindings = <
&kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp ASTRK &kp GRAVE &kp TILDE
&kp DQT &kp LBKT &kp LBRC &kp LPAR &trans &kp FSLH &kp MINUS &kp EQUAL &kp COLON &kp SEMI
&kp SQT &kp RBKT &kp RBRC &kp RPAR &trans &kp BSLH &kp UNDER &kp PLUS &kp PIPE &kp QMARK
&trans &trans &trans &trans
&kp DQT &kp LBKT &kp LBRC &kp LPAR &default_report &kp FSLH &kp MINUS &kp EQUAL &kp COLON &kp SEMI
&kp SQT &kp RBKT &kp RBRC &kp RPAR &bootloader &kp BSLH &kp UNDER &kp PLUS &kp PIPE &kp QMARK
&trans &trans &tog MOUSE &trans
>;
};

tri_layer {
bindings = <
&kp F1 &kp F2 &kp F3 &kp F4 &bt BT_SEL 0 &bt BT_SEL 2 &out OUT_TOG &tog WIN &kp C_MUTE &kp C_NEXT
&kp F1 &kp F2 &kp F3 &kp F4 &bt BT_SEL 0 &bt BT_SEL 2 &out OUT_TOG &tog WIN &kp C_MUTE &kp C_PREV
&kp F5 &kp F6 &kp F7 &kp F8 &bt BT_SEL 1 &bt BT_SEL 3 &kp C_BRI_UP &trans &kp C_VOL_UP &kp C_PP
&kp F9 &kp F10 &kp F11 &kp F12 &bt BT_CLR &bt BT_SEL 4 &kp C_BRI_DEC &trans &kp C_VOL_DN &kp C_PREV
&kp F9 &kp F10 &kp F11 &kp F12 &bt BT_CLR &bt BT_SEL 4 &kp C_BRI_DEC &trans &kp C_VOL_DN &kp C_NEXT
&trans &trans &trans &trans
>;
};

mouse {
bindings = <
&tog MOUSE &mkp MB4 &mkp MCLK &mkp MB5 &trans U_WH_L U_WH_D U_WH_U U_WH_R &tog MOUSE
&trans &trans &trans &trans &trans U_MS_L U_MS_D U_MS_U U_MS_R &trans
&trans &trans &trans &trans &trans &trans &mkp MB4 &mkp MCLK &mkp MB5 &trans
&kp SPACE &kp LSHIFT &mkp LCLK &mkp RCLK
>;
};
};
};
26 changes: 26 additions & 0 deletions config/mouse.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#define ZMK_MOUSE_DEFAULT_MOVE_VAL 2500 // 600
#define ZMK_MOUSE_DEFAULT_SCRL_VAL 20 // 10

#include <behaviors/mouse_keys.dtsi>
#include <dt-bindings/zmk/mouse.h>

&mmv {
acceleration-exponent = <1>; // 1
time-to-max-speed-ms = <300>; // 40
delay-ms = <0>; // 0
};

&msc {
acceleration-exponent = <0>; // 0
time-to-max-speed-ms = <40>; // 500
delay-ms = <0>; // 10
};

#define U_MS_U &mmv MOVE_UP
#define U_MS_D &mmv MOVE_DOWN
#define U_MS_L &mmv MOVE_LEFT
#define U_MS_R &mmv MOVE_RIGHT
#define U_WH_U &msc SCRL_UP
#define U_WH_D &msc SCRL_DOWN
#define U_WH_L &msc SCRL_LEFT
#define U_WH_R &msc SCRL_RIGHT
8 changes: 6 additions & 2 deletions config/west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ manifest:
# Additional modules containing boards/shields/custom code can be listed here as well
# See https://docs.zephyrproject.org/3.2.0/develop/west/manifest.html#projects
projects:
# - name: zmk
# remote: zmkfirmware
# revision: main
# import: app/west.yml
- name: zmk
remote: zmkfirmware
revision: main
url: https://github.com/sky-bro/zmk
revision: k4i-sweep-kbd
import: app/west.yml
self:
path: config

0 comments on commit 4f5c95f

Please sign in to comment.