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:
Pete Johanson
2024-12-09 17:45:41 -07:00
committed by GitHub
parent 7e8c542c94
commit 6b40bfda53
119 changed files with 4223 additions and 229 deletions

75
app/src/pointing/Kconfig Normal file
View File

@@ -0,0 +1,75 @@
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT
menu "Pointing Options"
# Deprecated old config, kept for backwards compat
config ZMK_MOUSE
bool "(Deprecated) Mouse Support"
config ZMK_POINTING
bool "Pointing Device Support"
default y if ZMK_MOUSE
select INPUT
select INPUT_THREAD_PRIORITY_OVERRIDE
if ZMK_POINTING
# Needed for anyone using gpio-keys for things like soft-off setup.
config INPUT_GPIO_KEYS
default n
config INPUT_THREAD_STACK_SIZE
default 1024 if ZMK_SPLIT && !ZMK_SPLIT_ROLE_CENTRAL
if !ZMK_SPLIT || ZMK_SPLIT_ROLE_CENTRAL
config ZMK_POINTING_SMOOTH_SCROLLING
bool "Smooth Scrolling"
help
Enable smooth scrolling, with hosts that support HID Resolution Multipliers
config ZMK_INPUT_LISTENER
bool "Input listener for processing input events in the system"
default y
depends on DT_HAS_ZMK_INPUT_LISTENER_ENABLED
config ZMK_INPUT_PROCESSOR_TEMP_LAYER
bool "Temporary Layer Input Processor"
default y
depends on DT_HAS_ZMK_INPUT_PROCESSOR_TEMP_LAYER_ENABLED
endif
config ZMK_INPUT_PROCESSOR_TRANSFORM
bool "Transform Input Processor"
default y
depends on DT_HAS_ZMK_INPUT_PROCESSOR_TRANSFORM_ENABLED
config ZMK_INPUT_PROCESSOR_SCALER
bool "Scaling Input Processor"
default y
depends on DT_HAS_ZMK_INPUT_PROCESSOR_SCALER_ENABLED
config ZMK_INPUT_PROCESSOR_CODE_MAPPER
bool "Code Mapper Input Processor"
default y
depends on DT_HAS_ZMK_INPUT_PROCESSOR_CODE_MAPPER_ENABLED
config ZMK_INPUT_SPLIT
bool "Split input support"
default y
depends on DT_HAS_ZMK_INPUT_SPLIT_ENABLED && ZMK_SPLIT
if ZMK_INPUT_SPLIT
config ZMK_INPUT_SPLIT_INIT_PRIORITY
int "Input Split initialization priority"
default INPUT_INIT_PRIORITY
endif # ZMK_INPUT_SPLIT
endif # ZMK_POINTING
endmenu # Mouse Options