Refactor dtsi files
This commit is contained in:
parent
7e632e223a
commit
3fda0cc152
4 changed files with 115 additions and 76 deletions
35
config/mouse.dtsi
Normal file
35
config/mouse.dtsi
Normal file
|
@ -0,0 +1,35 @@
|
|||
#include <dt-bindings/zmk/mouse.h>
|
||||
|
||||
&mmv {
|
||||
time-to-max-speed-ms = <1500>; // 300
|
||||
acceleration-exponent = <1>;
|
||||
delay-ms = <0>;
|
||||
};
|
||||
|
||||
&mwh {
|
||||
time-to-max-speed-ms = <5000>; // 300
|
||||
acceleration-exponent = <1>; // 0
|
||||
delay-ms = <0>;
|
||||
};
|
||||
|
||||
#define U_MOUSE_MOVE_MAX 1250
|
||||
#define U_MOUSE_SCROLL_MAX 100
|
||||
|
||||
#undef MOVE_UP
|
||||
#undef MOVE_DOWN
|
||||
#undef MOVE_LEFT
|
||||
#undef MOVE_RIGHT
|
||||
#define MOVE_UP MOVE_VERT(-U_MOUSE_MOVE_MAX)
|
||||
#define MOVE_DOWN MOVE_VERT(U_MOUSE_MOVE_MAX)
|
||||
#define MOVE_LEFT MOVE_HOR(-U_MOUSE_MOVE_MAX)
|
||||
#define MOVE_RIGHT MOVE_HOR(U_MOUSE_MOVE_MAX)
|
||||
|
||||
#undef SCROLL_UP
|
||||
#undef SCROLL_DOWN
|
||||
#undef SCROLL_LEFT
|
||||
#undef SCROLL_RIGHT
|
||||
#define SCROLL_UP SCROLL_VERT(U_MOUSE_SCROLL_MAX)
|
||||
#define SCROLL_DOWN SCROLL_VERT(-U_MOUSE_SCROLL_MAX)
|
||||
#define SCROLL_LEFT SCROLL_HOR(-U_MOUSE_SCROLL_MAX)
|
||||
#define SCROLL_RIGHT SCROLL_HOR(U_MOUSE_SCROLL_MAX)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue