From b670c75e0f273cc32b774dbfca4dbf3e137524dd Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Fri, 22 Nov 2024 12:20:15 -0700 Subject: [PATCH] fixup! feat(mouse): Add mouse move and scroll support --- .../bindings/behaviors/zmk,behavior-input-two-axis.yaml | 3 +++ app/dts/bindings/zmk,input-listener.yaml | 3 +++ app/dts/bindings/zmk,input-split.yaml | 3 +++ app/dts/input/processors.dtsi | 5 +++++ app/dts/input/processors/code_mapper.dtsi | 5 +++++ app/dts/input/processors/scaler.dtsi | 7 ++++++- app/dts/input/processors/temp_layer.dtsi | 5 +++++ app/dts/input/processors/transform.dtsi | 5 +++++ app/include/drivers/input_processor.h | 2 +- app/include/dt-bindings/zmk/input_transform.h | 6 ++++++ app/src/behaviors/behavior_input_two_axis.c | 2 +- app/src/mouse/CMakeLists.txt | 2 ++ app/src/mouse/Kconfig | 2 +- app/src/mouse/input_listener.c | 2 +- 14 files changed, 47 insertions(+), 5 deletions(-) diff --git a/app/dts/bindings/behaviors/zmk,behavior-input-two-axis.yaml b/app/dts/bindings/behaviors/zmk,behavior-input-two-axis.yaml index 0c138e03929..80972212ce0 100644 --- a/app/dts/bindings/behaviors/zmk,behavior-input-two-axis.yaml +++ b/app/dts/bindings/behaviors/zmk,behavior-input-two-axis.yaml @@ -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" diff --git a/app/dts/bindings/zmk,input-listener.yaml b/app/dts/bindings/zmk,input-listener.yaml index 0267b9503a9..877d7d8b78d 100644 --- a/app/dts/bindings/zmk,input-listener.yaml +++ b/app/dts/bindings/zmk,input-listener.yaml @@ -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 diff --git a/app/dts/bindings/zmk,input-split.yaml b/app/dts/bindings/zmk,input-split.yaml index bc2ca26f804..76d15a36753 100644 --- a/app/dts/bindings/zmk,input-split.yaml +++ b/app/dts/bindings/zmk,input-split.yaml @@ -1,3 +1,6 @@ +# Copyright (c) 2024 The ZMK Contributors +# SPDX-License-Identifier: MIT + include: [base.yaml] compatible: "zmk,input-split" diff --git a/app/dts/input/processors.dtsi b/app/dts/input/processors.dtsi index 48590701ab1..d072c0fcfcf 100644 --- a/app/dts/input/processors.dtsi +++ b/app/dts/input/processors.dtsi @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ #include #include diff --git a/app/dts/input/processors/code_mapper.dtsi b/app/dts/input/processors/code_mapper.dtsi index ba22bb1b661..6a9b5d164ed 100644 --- a/app/dts/input/processors/code_mapper.dtsi +++ b/app/dts/input/processors/code_mapper.dtsi @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ #include diff --git a/app/dts/input/processors/scaler.dtsi b/app/dts/input/processors/scaler.dtsi index 663e6992b7a..4cd329ac7cc 100644 --- a/app/dts/input/processors/scaler.dtsi +++ b/app/dts/input/processors/scaler.dtsi @@ -1,5 +1,10 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ -#include + #include / { /omit-if-no-ref/ zip_x_scaler: zip_x_scaler { diff --git a/app/dts/input/processors/temp_layer.dtsi b/app/dts/input/processors/temp_layer.dtsi index 0067f9e33c3..228ad4beffb 100644 --- a/app/dts/input/processors/temp_layer.dtsi +++ b/app/dts/input/processors/temp_layer.dtsi @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ #include diff --git a/app/dts/input/processors/transform.dtsi b/app/dts/input/processors/transform.dtsi index a8598156f9a..541e47d3304 100644 --- a/app/dts/input/processors/transform.dtsi +++ b/app/dts/input/processors/transform.dtsi @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ #include diff --git a/app/include/drivers/input_processor.h b/app/include/drivers/input_processor.h index fc315e0c9b6..aea57476ae4 100644 --- a/app/include/drivers/input_processor.h +++ b/app/include/drivers/input_processor.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 The ZMK Contributors + * Copyright (c) 2024 The ZMK Contributors * * SPDX-License-Identifier: MIT */ diff --git a/app/include/dt-bindings/zmk/input_transform.h b/app/include/dt-bindings/zmk/input_transform.h index 5e883c1359c..f75c6dabefd 100644 --- a/app/include/dt-bindings/zmk/input_transform.h +++ b/app/include/dt-bindings/zmk/input_transform.h @@ -1,3 +1,9 @@ +/* + * Copyright (c) 2024 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + #include #define INPUT_TRANSFORM_XY_SWAP BIT(0) diff --git a/app/src/behaviors/behavior_input_two_axis.c b/app/src/behaviors/behavior_input_two_axis.c index dd2f3bf69e2..267416b3dcd 100644 --- a/app/src/behaviors/behavior_input_two_axis.c +++ b/app/src/behaviors/behavior_input_two_axis.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 The ZMK Contributors + * Copyright (c) 2024 The ZMK Contributors * * SPDX-License-Identifier: MIT */ diff --git a/app/src/mouse/CMakeLists.txt b/app/src/mouse/CMakeLists.txt index f8ddc3f09a2..fdee57c8540 100644 --- a/app/src/mouse/CMakeLists.txt +++ b/app/src/mouse/CMakeLists.txt @@ -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) diff --git a/app/src/mouse/Kconfig b/app/src/mouse/Kconfig index a3ebff8087a..29695628f1d 100644 --- a/app/src/mouse/Kconfig +++ b/app/src/mouse/Kconfig @@ -1,4 +1,4 @@ -# Copyright (c) 2023 The ZMK Contributors +# Copyright (c) 2024 The ZMK Contributors # SPDX-License-Identifier: MIT config ZMK_MOUSE diff --git a/app/src/mouse/input_listener.c b/app/src/mouse/input_listener.c index 5e0dc9c7fb4..ec2b85d81a6 100644 --- a/app/src/mouse/input_listener.c +++ b/app/src/mouse/input_listener.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 The ZMK Contributors + * Copyright (c) 2024 The ZMK Contributors * * SPDX-License-Identifier: MIT */