-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(pointing): Add pre-defined scroll scaler and mouse scroll tests (#…
…2759) feat(pointing): Add pre-defined scroll scaler tests(pointing): Add mouse scroll tests
- Loading branch information
Showing
23 changed files
with
299 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
s/.*hid_mouse_//p |
12 changes: 12 additions & 0 deletions
12
app/tests/pointing/mouse-scroll/move_diagonal/keycode_events.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
scroll_set: Mouse scroll set to -1/1 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
scroll_set: Mouse scroll set to -1/1 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
scroll_set: Mouse scroll set to -1/1 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
scroll_set: Mouse scroll set to -1/1 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 |
6 changes: 6 additions & 0 deletions
6
app/tests/pointing/mouse-scroll/move_diagonal/native_posix_64.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CONFIG_GPIO=n | ||
CONFIG_ZMK_BLE=n | ||
CONFIG_LOG=y | ||
CONFIG_LOG_BACKEND_SHOW_COLOR=n | ||
CONFIG_ZMK_LOG_LEVEL_DBG=y | ||
CONFIG_ZMK_POINTING=y |
28 changes: 28 additions & 0 deletions
28
app/tests/pointing/mouse-scroll/move_diagonal/native_posix_64.keymap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#include <behaviors.dtsi> | ||
#include <behaviors/mouse_move.dtsi> | ||
#include <dt-bindings/zmk/keys.h> | ||
#include <dt-bindings/zmk/kscan_mock.h> | ||
#include <dt-bindings/zmk/pointing.h> | ||
|
||
/ { | ||
keymap { | ||
compatible = "zmk,keymap"; | ||
|
||
default_layer { | ||
bindings = < | ||
&msc SCRL_LEFT &msc SCRL_UP | ||
&none &none | ||
>; | ||
}; | ||
}; | ||
}; | ||
|
||
|
||
&kscan { | ||
events = < | ||
ZMK_MOCK_PRESS(0,0,10) | ||
ZMK_MOCK_PRESS(0,1,500) | ||
ZMK_MOCK_RELEASE(0,0,10) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
s/.*hid_mouse_//p |
24 changes: 24 additions & 0 deletions
24
app/tests/pointing/mouse-scroll/move_hwheel/keycode_events.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
scroll_set: Mouse scroll set to 1/0 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
scroll_set: Mouse scroll set to 1/0 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
scroll_set: Mouse scroll set to 1/0 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
scroll_set: Mouse scroll set to 1/0 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
scroll_set: Mouse scroll set to -1/0 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
scroll_set: Mouse scroll set to -1/0 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
scroll_set: Mouse scroll set to -1/0 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
scroll_set: Mouse scroll set to -1/0 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 |
6 changes: 6 additions & 0 deletions
6
app/tests/pointing/mouse-scroll/move_hwheel/native_posix_64.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CONFIG_GPIO=n | ||
CONFIG_ZMK_BLE=n | ||
CONFIG_LOG=y | ||
CONFIG_LOG_BACKEND_SHOW_COLOR=n | ||
CONFIG_ZMK_LOG_LEVEL_DBG=y | ||
CONFIG_ZMK_POINTING=y |
28 changes: 28 additions & 0 deletions
28
app/tests/pointing/mouse-scroll/move_hwheel/native_posix_64.keymap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#include <behaviors.dtsi> | ||
#include <behaviors/mouse_move.dtsi> | ||
#include <dt-bindings/zmk/keys.h> | ||
#include <dt-bindings/zmk/kscan_mock.h> | ||
#include <dt-bindings/zmk/pointing.h> | ||
|
||
/ { | ||
keymap { | ||
compatible = "zmk,keymap"; | ||
|
||
default_layer { | ||
bindings = < | ||
&msc SCRL_RIGHT &msc SCRL_LEFT | ||
&none &none | ||
>; | ||
}; | ||
}; | ||
}; | ||
|
||
|
||
&kscan { | ||
events = < | ||
ZMK_MOCK_PRESS(0,0,500) | ||
ZMK_MOCK_RELEASE(0,0,10) | ||
ZMK_MOCK_PRESS(0,1,500) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
s/.*hid_mouse_//p |
24 changes: 24 additions & 0 deletions
24
app/tests/pointing/mouse-scroll/move_wheel/keycode_events.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
scroll_set: Mouse scroll set to 0/1 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
scroll_set: Mouse scroll set to 0/1 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
scroll_set: Mouse scroll set to 0/1 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
scroll_set: Mouse scroll set to 0/1 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
scroll_set: Mouse scroll set to 0/-1 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
scroll_set: Mouse scroll set to 0/-1 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
scroll_set: Mouse scroll set to 0/-1 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
scroll_set: Mouse scroll set to 0/-1 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 |
6 changes: 6 additions & 0 deletions
6
app/tests/pointing/mouse-scroll/move_wheel/native_posix_64.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CONFIG_GPIO=n | ||
CONFIG_ZMK_BLE=n | ||
CONFIG_LOG=y | ||
CONFIG_LOG_BACKEND_SHOW_COLOR=n | ||
CONFIG_ZMK_LOG_LEVEL_DBG=y | ||
CONFIG_ZMK_POINTING=y |
28 changes: 28 additions & 0 deletions
28
app/tests/pointing/mouse-scroll/move_wheel/native_posix_64.keymap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#include <behaviors.dtsi> | ||
#include <behaviors/mouse_move.dtsi> | ||
#include <dt-bindings/zmk/keys.h> | ||
#include <dt-bindings/zmk/kscan_mock.h> | ||
#include <dt-bindings/zmk/pointing.h> | ||
|
||
/ { | ||
keymap { | ||
compatible = "zmk,keymap"; | ||
|
||
default_layer { | ||
bindings = < | ||
&msc SCRL_UP &msc SCRL_DOWN | ||
&none &none | ||
>; | ||
}; | ||
}; | ||
}; | ||
|
||
|
||
&kscan { | ||
events = < | ||
ZMK_MOCK_PRESS(0,0,500) | ||
ZMK_MOCK_RELEASE(0,0,10) | ||
ZMK_MOCK_PRESS(0,1,500) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
>; | ||
}; |
1 change: 1 addition & 0 deletions
1
app/tests/pointing/mouse-scroll/processors/move_diagonal_scaling/events.patterns
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
s/.*hid_mouse_//p |
12 changes: 12 additions & 0 deletions
12
app/tests/pointing/mouse-scroll/processors/move_diagonal_scaling/keycode_events.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
scroll_set: Mouse scroll set to -3/3 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
scroll_set: Mouse scroll set to -3/3 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
scroll_set: Mouse scroll set to -3/3 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
scroll_set: Mouse scroll set to -3/3 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 |
6 changes: 6 additions & 0 deletions
6
app/tests/pointing/mouse-scroll/processors/move_diagonal_scaling/native_posix_64.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CONFIG_GPIO=n | ||
CONFIG_ZMK_BLE=n | ||
CONFIG_LOG=y | ||
CONFIG_LOG_BACKEND_SHOW_COLOR=n | ||
CONFIG_ZMK_LOG_LEVEL_DBG=y | ||
CONFIG_ZMK_POINTING=y |
36 changes: 36 additions & 0 deletions
36
app/tests/pointing/mouse-scroll/processors/move_diagonal_scaling/native_posix_64.keymap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
#include <dt-bindings/zmk/input_transform.h> | ||
#include <zephyr/dt-bindings/input/input-event-codes.h> | ||
|
||
#include <behaviors.dtsi> | ||
#include <input/processors.dtsi> | ||
#include <dt-bindings/zmk/keys.h> | ||
#include <dt-bindings/zmk/kscan_mock.h> | ||
#include <dt-bindings/zmk/pointing.h> | ||
|
||
&msc_input_listener { | ||
input-processors = <&zip_scroll_scaler 6 2>; | ||
}; | ||
|
||
/ { | ||
keymap { | ||
compatible = "zmk,keymap"; | ||
|
||
default_layer { | ||
bindings = < | ||
&msc SCRL_LEFT &msc SCRL_UP | ||
&none &none | ||
>; | ||
}; | ||
}; | ||
}; | ||
|
||
|
||
&kscan { | ||
events = < | ||
ZMK_MOCK_PRESS(0,0,10) | ||
ZMK_MOCK_PRESS(0,1,500) | ||
ZMK_MOCK_RELEASE(0,0,10) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
>; | ||
}; |
1 change: 1 addition & 0 deletions
1
app/tests/pointing/mouse-scroll/processors/move_diagonal_xy_invert/events.patterns
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
s/.*hid_mouse_//p |
12 changes: 12 additions & 0 deletions
12
app/tests/pointing/mouse-scroll/processors/move_diagonal_xy_invert/keycode_events.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
scroll_set: Mouse scroll set to 1/-1 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
scroll_set: Mouse scroll set to 1/-1 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
scroll_set: Mouse scroll set to 1/-1 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
scroll_set: Mouse scroll set to 1/-1 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 |
6 changes: 6 additions & 0 deletions
6
app/tests/pointing/mouse-scroll/processors/move_diagonal_xy_invert/native_posix_64.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CONFIG_GPIO=n | ||
CONFIG_ZMK_BLE=n | ||
CONFIG_LOG=y | ||
CONFIG_LOG_BACKEND_SHOW_COLOR=n | ||
CONFIG_ZMK_LOG_LEVEL_DBG=y | ||
CONFIG_ZMK_POINTING=y |
33 changes: 33 additions & 0 deletions
33
app/tests/pointing/mouse-scroll/processors/move_diagonal_xy_invert/native_posix_64.keymap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include <input/processors.dtsi> | ||
#include <behaviors.dtsi> | ||
#include <dt-bindings/zmk/keys.h> | ||
#include <dt-bindings/zmk/kscan_mock.h> | ||
#include <dt-bindings/zmk/pointing.h> | ||
#include <dt-bindings/zmk/input_transform.h> | ||
|
||
&msc_input_listener { | ||
input-processors = <&zip_scroll_transform (INPUT_TRANSFORM_X_INVERT | INPUT_TRANSFORM_Y_INVERT)>; | ||
}; | ||
|
||
/ { | ||
keymap { | ||
compatible = "zmk,keymap"; | ||
|
||
default_layer { | ||
bindings = < | ||
&msc SCRL_LEFT &msc SCRL_UP | ||
&none &none | ||
>; | ||
}; | ||
}; | ||
}; | ||
|
||
|
||
&kscan { | ||
events = < | ||
ZMK_MOCK_PRESS(0,0,10) | ||
ZMK_MOCK_PRESS(0,1,500) | ||
ZMK_MOCK_RELEASE(0,0,10) | ||
ZMK_MOCK_RELEASE(0,1,10) | ||
>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters