Skip to content

Commit

Permalink
fix(sweep): revert to upstream main to test Windows USB disconnects w…
Browse files Browse the repository at this point in the history
…hen master Bluetooth state changes

Bluetooth state changes include connecting/disconnecting of both hosts and slaves
  • Loading branch information
JJGadgets committed Apr 6, 2024
1 parent 21f4125 commit adf3264
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 32 deletions.
62 changes: 32 additions & 30 deletions config/cradio.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,24 @@
// };

// mouse keys (copied from urob)
#define ZMK_MOUSE_DEFAULT_MOVE_VAL 3750 // 600
#define ZMK_MOUSE_DEFAULT_SCRL_VAL 20 // 10
// TODO: test USB disconnects when Bluetooth state changes on master (from both host and slave)
// #define ZMK_MOUSE_DEFAULT_MOVE_VAL 3750 // 600
// #define ZMK_MOUSE_DEFAULT_SCRL_VAL 20 // 10

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

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

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

/ {
behaviors {
Expand Down Expand Up @@ -201,22 +202,23 @@
// ╰──────────┴──────────╯ ╰──────────┴──────────╯
>;
};
mouse_layer {
bindings = <
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
//│ `~ │ 1 │ 2 │ 3 │ \| │ │ [{ │ ]} │ -_ │ =+ │ '" │
&trans &trans &trans &trans &trans &msc SCRL_UP &msc SCRL_LEFT &mmv MOVE_UP &msc SCRL_RIGHT &to 0
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ TAB │ 4 │ 5 │ 6 │ 0 │ │ TAB │ LEFT │ DOWN │ UP │ RIGHT │
&trans &trans &trans &trans &trans &msc SCRL_DOWN &mmv MOVE_LEFT &mmv MOVE_DOWN &mmv MOVE_RIGHT &to 0
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ DELETE │ 7 │ 8 │ 9 │ 0 │ │ PSCRN │ HOME │ PG_UP │ PG_DN │ END │
&trans &trans &trans &trans &trans &none &mkp MB4 &mkp MB3 &mkp MB5 &to 0
//╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯
&to 0 &trans &mkp MB1 &mkp MB2
// ╰──────────┴──────────╯ ╰──────────┴──────────╯
>;
};
mouse_layer { bindings = <EMPTYLAYER>; }; // TODO: test USB disconnects when Bluetooth state changes on master (from both host and slave)
// mouse_layer {
// bindings = <
// //╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
// //│ `~ │ 1 │ 2 │ 3 │ \| │ │ [{ │ ]} │ -_ │ =+ │ '" │
// &trans &trans &trans &trans &trans &msc SCRL_UP &msc SCRL_LEFT &mmv MOVE_UP &msc SCRL_RIGHT &to 0
// //├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
// //│ TAB │ 4 │ 5 │ 6 │ 0 │ │ TAB │ LEFT │ DOWN │ UP │ RIGHT │
// &trans &trans &trans &trans &trans &msc SCRL_DOWN &mmv MOVE_LEFT &mmv MOVE_DOWN &mmv MOVE_RIGHT &to 0
// //├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
// //│ DELETE │ 7 │ 8 │ 9 │ 0 │ │ PSCRN │ HOME │ PG_UP │ PG_DN │ END │
// &trans &trans &trans &trans &trans &none &mkp MB4 &mkp MB3 &mkp MB5 &to 0
// //╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯
// &to 0 &trans &mkp MB1 &mkp MB2
// // ╰──────────┴──────────╯ ╰──────────┴──────────╯
// >;
// };
game_layer {
bindings = <
// NOTE: This is suited to my gaming habits.
Expand Down
6 changes: 4 additions & 2 deletions config/west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ manifest:
# See https://docs.zephyrproject.org/3.2.0/develop/west/manifest.html#projects
projects:
- name: zmk
remote: petejohanson
revision: feat/pointers-move-scroll
remote: zmkfirmware
revision: main
# remote: petejohanson
# revision: feat/pointers-move-scroll
# remote: urob
# revision: main
import: app/west.yml
Expand Down

0 comments on commit adf3264

Please sign in to comment.