Repository navigation
graphics/input: Add scroll command with Android-style syntax. - #4098
Merged
Merged
Conversation
cederom
reviewed
Nov 20, 2026
cederom
reviewed
Nov 20, 2026
cederom
reviewed
Nov 20, 2026
Contributor
|
Contributor
|
CI fix in place retarting the CI :-) |
Add input scroll <value> and input scroll --axis SCROLL,<value> to inject a sequence of mouse wheel reports. Send an initial activation report followed by paced reports that split the requested value into smaller steps. Provide input_gen_scroll() for chunked writes with a configurable interval and GRAPHICS_INPUT_TOOL_SCROLL_THRESHOLD for applications that require a scroll activation threshold. Keep the existing wheel command for a single report. Assisted-by: OpenCode:claude-opus-5-5 Signed-off-by: liuchan3 <liuchan3@xiaomi.com>
xiaoliud
force-pushed
the
input_scroll
branch
from
November 23, 2026 02:41
ff62571 to
89ed84e
Compare
Contributor
Author
|
Thanks for the review! Addressed all three comments in the updated commit. |
xiaoxiang781216
approved these changes
Nov 23, 2026
jerpelea
approved these changes
Nov 23, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add input scroll and input scroll --axis SCROLL,. The
command sends one activation report of threshold + 1, then splits the
requested value into reports of max(1, |value| / 10), with the last
report carrying any remainder, 30 ms apart. This drives applications
that only start scrolling after a threshold. The existing wheel
command is unchanged.
Add input_gen_scroll() and GRAPHICS_INPUT_TOOL_SCROLL_THRESHOLD (default
10, range 0..32766).
Impact
must keep it below UINT32_MAX / 1000. The command always passes 30.
Testing
and CONFIG_INPUT_MOUSE_WHEEL=y. Wheel reports were read from /dev/umouse
with examples/touchscreen (tc, CONFIG_EXAMPLES_TOUCHSCREEN_MOUSE=y).
then 10 x -5. scroll 0 sends nothing;
scroll abcandscroll 40000(outside int16_t) send no report and print the usage text.