forked from zmkfirmware/zmk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit 'dbbeb701aee215fbd5f5e9faecc778b745d4cf87' into ds87-pet…
…ejohanson-feat-pointers-move-scroll Merge from petejohanson's feat/pointers-move-scroll branch at SHA1 dbbeb70.
- Loading branch information
Showing
59 changed files
with
1,690 additions
and
319 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
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
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,9 @@ | ||
/* | ||
* Copyright (c) 2024 The ZMK Contributors | ||
* | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
|
||
#include "mouse_key_press.dtsi" | ||
#include "mouse_move.dtsi" | ||
#include "mouse_scroll.dtsi" |
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,25 @@ | ||
/* | ||
* Copyright (c) 2024 The ZMK Contributors | ||
* | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
|
||
#include <zephyr/dt-bindings/input/input-event-codes.h> | ||
|
||
/ { | ||
behaviors { | ||
/omit-if-no-ref/ mmv: mouse_move { | ||
compatible = "zmk,behavior-input-two-axis"; | ||
#binding-cells = <1>; | ||
x-input-code = <INPUT_REL_X>; | ||
y-input-code = <INPUT_REL_Y>; | ||
time-to-max-speed-ms = <300>; | ||
acceleration-exponent = <1>; | ||
}; | ||
}; | ||
|
||
mmv_input_listener: mmv_input_listener { | ||
compatible = "zmk,input-listener"; | ||
device = <&mmv>; | ||
}; | ||
}; |
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,26 @@ | ||
|
||
/* | ||
* Copyright (c) 2024 The ZMK Contributors | ||
* | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
|
||
#include <zephyr/dt-bindings/input/input-event-codes.h> | ||
|
||
/ { | ||
behaviors { | ||
/omit-if-no-ref/ msc: mouse_scroll { | ||
compatible = "zmk,behavior-input-two-axis"; | ||
#binding-cells = <1>; | ||
x-input-code = <INPUT_REL_HWHEEL>; | ||
y-input-code = <INPUT_REL_WHEEL>; | ||
time-to-max-speed-ms = <300>; | ||
acceleration-exponent = <0>; | ||
}; | ||
}; | ||
|
||
msc_input_listener: msc_input_listener { | ||
compatible = "zmk,input-listener"; | ||
device = <&msc>; | ||
}; | ||
}; |
25 changes: 25 additions & 0 deletions
25
app/dts/bindings/behaviors/zmk,behavior-input-two-axis.yaml
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,25 @@ | ||
description: Two axis input behavior | ||
|
||
compatible: "zmk,behavior-input-two-axis" | ||
|
||
include: one_param.yaml | ||
|
||
properties: | ||
x-input-code: | ||
type: int | ||
required: true | ||
y-input-code: | ||
type: int | ||
required: true | ||
trigger-period-ms: | ||
type: int | ||
default: 16 | ||
description: The time (in ms) between generated inputs when an input has non-zero speed. | ||
delay-ms: | ||
type: int | ||
time-to-max-speed-ms: | ||
type: int | ||
required: true | ||
acceleration-exponent: | ||
type: int | ||
default: 1 |
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 @@ | ||
description: | | ||
Listener to subscribe to input events and send HID updates after processing | ||
compatible: "zmk,input-listener" | ||
|
||
properties: | ||
device: | ||
type: phandle | ||
required: true | ||
xy-swap: | ||
type: boolean | ||
x-invert: | ||
type: boolean | ||
y-invert: | ||
type: boolean | ||
scale-multiplier: | ||
type: int | ||
default: 1 | ||
scale-divisor: | ||
type: int | ||
default: 1 |
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
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
Oops, something went wrong.