Skip to content

Commit

Permalink
fixup! feat(mouse): Add mouse move and scroll support
Browse files Browse the repository at this point in the history
  • Loading branch information
petejohanson committed Nov 22, 2024
1 parent ac7c0f2 commit b670c75
Show file tree
Hide file tree
Showing 14 changed files with 47 additions and 5 deletions.
3 changes: 3 additions & 0 deletions app/dts/bindings/behaviors/zmk,behavior-input-two-axis.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT

description: Two axis input behavior

compatible: "zmk,behavior-input-two-axis"
Expand Down
3 changes: 3 additions & 0 deletions app/dts/bindings/zmk,input-listener.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT

description: |
Listener to subscribe to input events and send HID updates after processing
Expand Down
3 changes: 3 additions & 0 deletions app/dts/bindings/zmk,input-split.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT

include: [base.yaml]

compatible: "zmk,input-split"
Expand Down
5 changes: 5 additions & 0 deletions app/dts/input/processors.dtsi
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

#include <input/processors/scaler.dtsi>
#include <input/processors/code_mapper.dtsi>
Expand Down
5 changes: 5 additions & 0 deletions app/dts/input/processors/code_mapper.dtsi
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

#include <zephyr/dt-bindings/input/input-event-codes.h>

Expand Down
7 changes: 6 additions & 1 deletion app/dts/input/processors/scaler.dtsi
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

#include <zephyr/dt-bindings/input/input-event-codes.h>
#include <zephyr/dt-bindings/input/input-event-codes.h>

/ {
/omit-if-no-ref/ zip_x_scaler: zip_x_scaler {
Expand Down
5 changes: 5 additions & 0 deletions app/dts/input/processors/temp_layer.dtsi
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

#include <zephyr/dt-bindings/input/input-event-codes.h>

Expand Down
5 changes: 5 additions & 0 deletions app/dts/input/processors/transform.dtsi
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

#include <zephyr/dt-bindings/input/input-event-codes.h>

Expand Down
2 changes: 1 addition & 1 deletion app/include/drivers/input_processor.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020 The ZMK Contributors
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
Expand Down
6 changes: 6 additions & 0 deletions app/include/dt-bindings/zmk/input_transform.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

#include <zephyr/dt-bindings/dt-util.h>

#define INPUT_TRANSFORM_XY_SWAP BIT(0)
Expand Down
2 changes: 1 addition & 1 deletion app/src/behaviors/behavior_input_two_axis.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 The ZMK Contributors
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
Expand Down
2 changes: 2 additions & 0 deletions app/src/mouse/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT

target_sources_ifdef(CONFIG_ZMK_INPUT_LISTENER app PRIVATE input_listener.c)
target_sources_ifdef(CONFIG_ZMK_INPUT_PROCESSOR_TRANSFORM app PRIVATE input_processor_transform.c)
Expand Down
2 changes: 1 addition & 1 deletion app/src/mouse/Kconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2023 The ZMK Contributors
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT

config ZMK_MOUSE
Expand Down
2 changes: 1 addition & 1 deletion app/src/mouse/input_listener.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020 The ZMK Contributors
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
Expand Down

0 comments on commit b670c75

Please sign in to comment.