-
Notifications
You must be signed in to change notification settings - Fork 379
/
mouse.dtsi
61 lines (54 loc) · 1.45 KB
/
mouse.dtsi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// Settings tuned for 3840 x 2160 display resolution
#define ZMK_POINTING_DEFAULT_MOVE_VAL 600 // 600
#define ZMK_POINTING_DEFAULT_SCRL_VAL 20 // 10
#include <dt-bindings/zmk/pointing.h>
#include <input/processors.dtsi>
#include <zephyr/dt-bindings/input/input-event-codes.h>
// Based on @caksoylar's config, defaults in comments
&mmv {
acceleration-exponent = <1>; // 1
time-to-max-speed-ms = <500>; // 300
delay-ms = <0>; // 0
};
&msc {
acceleration-exponent = <0>; // 0
time-to-max-speed-ms = <300>; // 300
delay-ms = <0>; // 0
};
&mmv_input_listener {
warp {
layers = <NAV>;
input-processors = <&zip_xy_scaler 3 1>;
};
precision {
layers = <FN>;
input-processors = <&zip_xy_scaler 1 2>;
};
};
/ {
zip_scroll_scaler: zip_scroll_scaler {
compatible = "zmk,input-processor-scaler";
#input-processor-cells = <2>;
type = <INPUT_EV_REL>;
codes = <INPUT_REL_WHEEL INPUT_REL_HWHEEL>;
track-remainders;
};
};
&msc_input_listener {
warp {
layers = <NAV>;
input-processors = <&zip_scroll_scaler 2 1>;
};
precision {
layers = <FN>;
input-processors = <&zip_scroll_scaler 1 2>;
};
};
#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