mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-03-20 04:55:20 -05:00
feat(mouse): Add mouse move and scroll support (#2477)
* feat(mouse): Add mouse move and scroll support
* Use Zephyr input subsystem for all pointers.
* Input processors for modifying events, e.g. scaling, swapping
codes, temporary (mouse) layers, etc.
* Mouse move/scroll behaviors.
* Infrastructure in place for physical pointer input devices.
* feat: Add input split support.
* docs: Add initial pointer docs.
---------
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Co-authored-by: Alexander Krikun <krikun98@gmail.com>
Co-authored-by: Robert U <urob@users.noreply.github.com>
Co-authored-by: Shawn Meier <ftc@users.noreply.github.com>
Co-authored-by: Chris Andreae <chris@andreae.gen.nz>
Co-authored-by: Anant Thazhemadam <47104651+thazhemadam@users.noreply.github.com>
Co-authored-by: Erik Tollerud <erik.tollerud@gmail.com>
Co-authored-by: Nicolas Munnich <98408764+Nick-Munnich@users.noreply.github.com>
This commit is contained in:
29
app/dts/input/processors/code_mapper.dtsi
Normal file
29
app/dts/input/processors/code_mapper.dtsi
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2024 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <zephyr/dt-bindings/input/input-event-codes.h>
|
||||
|
||||
/ {
|
||||
/omit-if-no-ref/ zip_xy_swap_mapper: zip_xy_swap_mapper {
|
||||
compatible = "zmk,input-processor-code-mapper";
|
||||
#input-processor-cells = <0>;
|
||||
type = <INPUT_EV_REL>;
|
||||
map
|
||||
= <INPUT_REL_Y INPUT_REL_X>
|
||||
, <INPUT_REL_X INPUT_REL_Y>
|
||||
;
|
||||
};
|
||||
|
||||
/omit-if-no-ref/ zip_xy_to_scroll_mapper: zip_xy_to_scroll_mapper {
|
||||
compatible = "zmk,input-processor-code-mapper";
|
||||
#input-processor-cells = <0>;
|
||||
type = <INPUT_EV_REL>;
|
||||
map
|
||||
= <INPUT_REL_Y INPUT_REL_WHEEL>
|
||||
, <INPUT_REL_X INPUT_REL_HWHEEL>
|
||||
;
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user