Skip to content

Commit

Permalink
Update mouse config to work with PR2027
Browse files Browse the repository at this point in the history
  • Loading branch information
caksoylar authored and github-actions[bot] committed Nov 19, 2023
1 parent 94e4c80 commit 5f817cf
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 51 deletions.
7 changes: 2 additions & 5 deletions config/3x5.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
#ifdef EXTERNAL_POWER
# include <dt-bindings/zmk/ext_power.h>
#endif
#ifdef MOUSE_KEYS
# include <dt-bindings/zmk/mouse.h>
#endif

// Layer aliases
#define DEF 0
Expand Down Expand Up @@ -295,9 +292,9 @@
label = "MSE";
bindings = <
// ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮
&none &none &none &none &none &mwh S_LEFT &mwh S_DOWN &mmv M_UP &mwh S_UP &mwh S_RIGHT
&none &none &none &none &none &msc SCRL_LEFT &msc SCRL_DOWN &mmv MOVE_UP &msc SCRL_UP &msc SCRL_RIGHT
// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
&kp LCTRL &kp LGUI &kp LALT &kp LSHFT &none &none &mmv M_LEFT &mmv M_DOWN &mmv M_RIGHT &none
&kp LCTRL &kp LGUI &kp LALT &kp LSHFT &none &none &mmv MOVE_LEFT &mmv MOVE_DOWN &mmv MOVE_RIGHT &none
// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
ALP_XXX &none &none &none ALP_XXX ALP_XXX &mkp MB4 &mkp MCLK &mkp MB5 ALP_XXX
// ╰─────────────┴─────────────┴─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┴─────────────┴─────────────╯
Expand Down
18 changes: 4 additions & 14 deletions config/mouse.dtsi
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#define ZMK_MOUSE_DEFAULT_MOVE_VAL 1500 // 600
#define ZMK_MOUSE_DEFAULT_SCRL_VAL 20 // 10

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

&mmv {
Expand All @@ -6,21 +9,8 @@
delay-ms = <0>; // 0
};

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

#define U_MOUSE_MOVE_MAX 1500 // 600
#define U_MOUSE_SCROLL_MAX 20 // 10

#define M_UP MOVE_VERT(-U_MOUSE_MOVE_MAX)
#define M_DOWN MOVE_VERT(U_MOUSE_MOVE_MAX)
#define M_LEFT MOVE_HOR(-U_MOUSE_MOVE_MAX)
#define M_RIGHT MOVE_HOR(U_MOUSE_MOVE_MAX)

#define S_UP SCROLL_VERT(U_MOUSE_SCROLL_MAX)
#define S_DOWN SCROLL_VERT(-U_MOUSE_SCROLL_MAX)
#define S_LEFT SCROLL_HOR(-U_MOUSE_SCROLL_MAX)
#define S_RIGHT SCROLL_HOR(U_MOUSE_SCROLL_MAX)
32 changes: 24 additions & 8 deletions keymap-drawer/corneish_zen.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions keymap-drawer/corneish_zen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,20 +192,20 @@ layers:
- ''
- ''
- ''
- MW←
- MW↓
- M↑
- MW↑
- MW→
- '&msc SCRL_LEFT'
- '&msc SCRL_DOWN'
- '&mmv MOVE_UP'
- '&msc SCRL_UP'
- '&msc SCRL_RIGHT'
- Ctrl
- Gui
- Alt
- Shift
- ''
- ''
- M←
- M↓
- M→
- '&mmv MOVE_LEFT'
- '&mmv MOVE_DOWN'
- '&mmv MOVE_RIGHT'
- ''
- ''
- ''
Expand Down
32 changes: 24 additions & 8 deletions keymap-drawer/rommana.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions keymap-drawer/rommana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,20 +162,20 @@ layers:
- ''
- ''
- ''
- MW←
- MW↓
- M↑
- MW↑
- MW→
- '&msc SCRL_LEFT'
- '&msc SCRL_DOWN'
- '&mmv MOVE_UP'
- '&msc SCRL_UP'
- '&msc SCRL_RIGHT'
- Ctrl
- Gui
- Alt
- Shift
- ''
- ''
- M←
- M↓
- M→
- '&mmv MOVE_LEFT'
- '&mmv MOVE_DOWN'
- '&mmv MOVE_RIGHT'
- ''
- ''
- ''
Expand Down

0 comments on commit 5f817cf

Please sign in to comment.