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>
Remove README.md from apps repository. Documentation will be added to the nuttx main repository under Documentation/applications/testing/getevent/ in rst format. Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
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? |
| tristate "Enable getevent tool" | ||
| default n | ||
| ---help--- | ||
| Enable support for a command line getevent tool. |
There was a problem hiding this comment.
Please include an explanation about what is the getevent, when and why the user will use it?
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 :-) |
Add getevent, a command-line utility for monitoring NuttX input devices
including mouse, touch, and keyboard events.
Features:
and keyboard (key codes/event types) monitoring
Usage example:
getevent # auto-detect all input devices
getevent -m /dev/mouse0 # monitor specific mouse
getevent -t /dev/input0 # monitor specific touch device
getevent -k /dev/kbd0 # monitor specific keyboard