graphics/input: Add getevent input event monitor tool#3434
graphics/input: Add getevent input event monitor tool#3434HongChao6 wants to merge 4 commits intoapache:masterfrom
Conversation
There was a problem hiding this comment.
Thank you @HongChao6 very useful utility :-)
Please read https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md and update git commit descriptions :-)
I am wondering if nuttx-apps/testing/input would not be a better fit for this tool? The main purpose is testing / input not really graphics right? Also exiting code in graphics/input? What do you think folks? :-)
Add getevent utility for monitoring input events including mouse clicks/movement, multi-touch coordinates/pressure, and keyboard key presses. Supports automatic device detection in /dev and command-line device path specification with non-blocking I/O. Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
Fix format specifier mismatch where '%d' was used for int32_t type argument. Use PRId32 macro instead to ensure portable formatting across architectures. Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
Fix volatile qualifier warning in pointer assignment. Add errno logging for better error diagnostics. Replace malloc with calloc for zero-initialized allocation. Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
4b49bd9 to
9413590
Compare
Thanks for the suggestion. The getevent tool shares the same input subsystem infrastructure with monkey and generator under graphics/input/. Moving getevent alone would split the input toolset. If the community agrees that graphics/input is not the right place, I'd prefer to create a separate PR to move the entire graphics/input/ directory to testing/input/ together, rather than splitting them up in this PR. What do you think? |
acassis
left a comment
There was a problem hiding this comment.
@HongChao6 please create a Documentation about this Graphics Input Getevent, I think we also need some basic Documentation about Graphics Input in general
|
@acassis is this input tightly coupled with graphics? if not and can be used as general input then maybe we should create a separate and dedicated nuttx-apps/input ? :-) |
AFAIK Graphics Input is mostly used to create Monkey testing events, but a generic Input device tester |
|
Okay not to delay here we can put where existing input resides :-) Just an idea to uncover this functionality into its own space :-) |
cederom
left a comment
There was a problem hiding this comment.
TODO :-)
- PR description.
- Documentation.
- Kconfig description.
|
I have created a dedicated issue for discussion of input location #3436 :-) |
3796c6e
|
Addressed review feedback: Updated Kconfig help text with detailed description |
Remove the in-tree README.md in favor of rst documentation in the nuttx main repository. Update the Kconfig help text for getevent to describe what it does, when to use it, and why it is needed. Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
|
Hi @HongChao6, this error is not related to this PR You will need to wait for this PR #3440 to be merged, after which you will need to rebase |
Thanks for the heads up! I'll rebase once #3440 is merged. |
Summary
Add
getevent, a command-line input event monitor that captures and displays real-time events from input devices.What
geteventcaptures and displays real-time input events from mouse, touchscreen, and keyboard devices. It reads from input device nodes (/dev/mouse*,/dev/input*,/dev/kbd*) using non-blocking I/O withpoll(), and prints structured event data viasyslog.Supported event types:
When / Why
This tool is useful during:
Without
getevent, developers must write ad-hoc test programs or read device nodes manually to verify input behavior. This tool provides a ready-made, consistent way to do so.Usage
Press
Ctrl+Cto stop.Configuration