forked from zmkfirmware/zmk
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! feat(mouse): Add mouse move and scroll support
- Loading branch information
Showing
19 changed files
with
575 additions
and
27 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
5 changes: 5 additions & 0 deletions
5
...ts/mouse-keys/mouse-move/processors/temp_layer/1-deactivate-layer-timeout/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,5 @@ | ||
s/.*hid_mouse_//p | ||
s/.*set_layer_state: //p | ||
s/.*handle_state_changed_dispatcher: //p | ||
s/.*handle_position_state_changed: //p | ||
s/.*handle_keycode_state_changed: //p |
File renamed without changes.
File renamed without changes.
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
7 changes: 7 additions & 0 deletions
7
...eys/mouse-move/processors/temp_layer/2a-deactivate-layer-position-trigger/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,7 @@ | ||
s/.*hid_mouse_//p | ||
s/.*set_layer_state: //p | ||
s/.*hid_listener_keycode/kp/p | ||
s/.*mo_keymap_binding/mo/p | ||
s/.*handle_state_changed_dispatcher: //p | ||
s/.*handle_position_state_changed: //p | ||
s/.*handle_keycode_state_changed: //p |
21 changes: 21 additions & 0 deletions
21
...e-move/processors/temp_layer/2a-deactivate-layer-position-trigger/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,21 @@ | ||
Dispatching handle_position_state_changed | ||
Position excluded, continuing | ||
layer_changed: layer 1 state 1 | ||
movement_set: Mouse movement set to -1/0 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
movement_set: Mouse movement set to -2/0 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
movement_set: Mouse movement set to -2/0 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
movement_set: Mouse movement set to -3/0 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
Dispatching handle_position_state_changed | ||
Dispatching handle_position_state_changed | ||
Position not excluded, deactivating layer | ||
layer_changed: layer 1 state 0 | ||
Position excluded, continuing | ||
Dispatching handle_position_state_changed |
6 changes: 6 additions & 0 deletions
6
...ouse-move/processors/temp_layer/2a-deactivate-layer-position-trigger/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_MOUSE=y |
46 changes: 46 additions & 0 deletions
46
...se-move/processors/temp_layer/2a-deactivate-layer-position-trigger/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,46 @@ | ||
|
||
#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/mouse.h> | ||
|
||
&mmv_input_listener { | ||
input-processors = <&auto_mouse_layer 1 0>; | ||
}; | ||
|
||
/ { | ||
auto_mouse_layer: auto_mouse_layer { | ||
compatible = "zmk,input-processor-temp-layer"; | ||
#input-processor-cells = <2>; | ||
excluded-positions = <0>; | ||
}; | ||
keymap { | ||
compatible = "zmk,keymap"; | ||
label ="Default keymap"; | ||
|
||
default_layer { | ||
bindings = < | ||
&mmv MOVE_LEFT &mmv MOVE_UP | ||
&none &none | ||
>; | ||
}; | ||
|
||
mkp_layer { | ||
bindings = <&mkp LCLK &mkp RCLK &trans &trans>; | ||
}; | ||
}; | ||
}; | ||
|
||
|
||
&kscan { | ||
events = < | ||
ZMK_MOCK_PRESS(0,0,100) | ||
ZMK_MOCK_RELEASE(0,0,150) | ||
ZMK_MOCK_PRESS(1,0,200) | ||
ZMK_MOCK_RELEASE(1,0,250) | ||
>; | ||
}; |
7 changes: 7 additions & 0 deletions
7
...mouse-move/processors/temp_layer/2b-deactivate-layer-position-not-trigger/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,7 @@ | ||
s/.*hid_mouse_//p | ||
s/.*set_layer_state: //p | ||
s/.*hid_listener_keycode/kp/p | ||
s/.*mo_keymap_binding/mo/p | ||
s/.*handle_state_changed_dispatcher: //p | ||
s/.*handle_position_state_changed: //p | ||
s/.*handle_keycode_state_changed: //p |
28 changes: 28 additions & 0 deletions
28
...ve/processors/temp_layer/2b-deactivate-layer-position-not-trigger/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,28 @@ | ||
Dispatching handle_position_state_changed | ||
Position excluded, continuing | ||
layer_changed: layer 1 state 1 | ||
movement_set: Mouse movement set to -1/0 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
movement_set: Mouse movement set to -2/0 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
movement_set: Mouse movement set to -2/0 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
movement_set: Mouse movement set to -3/0 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
Dispatching handle_position_state_changed | ||
Dispatching handle_position_state_changed | ||
Position excluded, continuing | ||
button_press: Button 0 count 1 | ||
button_press: Mouse buttons set to 0x01 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 | ||
Dispatching handle_position_state_changed | ||
button_release: Button 0 count: 0 | ||
button_release: Button 0 released | ||
button_release: Mouse buttons set to 0x00 | ||
scroll_set: Mouse scroll set to 0/0 | ||
movement_set: Mouse movement set to 0/0 |
6 changes: 6 additions & 0 deletions
6
...-move/processors/temp_layer/2b-deactivate-layer-position-not-trigger/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_MOUSE=y |
Oops, something went wrong.