Skip to content

Commit 4b49bd9

Browse files
committed
graphics/input: Move getevent README.md to index.rst documentation.
Replace README.md with index.rst format documentation for getevent tool to follow NuttX documentation conventions. The rst file should be placed under Documentation/applications/testing/getevent/ in the NuttX main repository. Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
1 parent c90ba5e commit 4b49bd9

2 files changed

Lines changed: 56 additions & 49 deletions

File tree

graphics/input/getevent/README.md

Lines changed: 0 additions & 49 deletions
This file was deleted.

graphics/input/getevent/index.rst

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
====================================
2+
``getevent`` Input Event Monitor Tool
3+
====================================
4+
5+
The ``getevent`` utility monitors input events from mouse, touch, and keyboard
6+
devices in real-time. It supports automatic input device detection in ``/dev``
7+
and command-line device path specification.
8+
9+
Features
10+
--------
11+
12+
- Mouse event monitoring (clicks, movement, wheel)
13+
- Multi-touch event capture (coordinates, pressure, timestamps)
14+
- Keyboard key press detection (key codes, event types)
15+
- Automatic input device detection in ``/dev``
16+
- Non-blocking I/O with 500ms timeout
17+
- Resource-safe memory management
18+
19+
Build Configuration
20+
-------------------
21+
22+
Enable in NuttX configuration:
23+
24+
- ``CONFIG_GRAPHICS_INPUT_GETEVENT`` -- Enable getevent tool.
25+
- ``CONFIG_GRAPHICS_INPUT_GETEVENT_STACKSIZE`` -- Stack size for getevent task.
26+
- ``CONFIG_GRAPHICS_INPUT_GETEVENT_PRIORITY`` -- Priority of getevent task.
27+
- ``CONFIG_GRAPHICS_INPUT_GETEVENT_DETAIL_INFO`` -- Enable detailed information
28+
in getevent output, such as touch width, height, and pressure.
29+
30+
Usage
31+
-----
32+
33+
.. code:: bash
34+
35+
# Auto-detect all input devices
36+
getevent
37+
38+
# Monitor specific mouse device
39+
getevent -m /dev/mouse0
40+
41+
# Monitor specific touch device
42+
getevent -t /dev/input0
43+
44+
# Monitor specific keyboard
45+
getevent -k /dev/kbd0
46+
47+
# Combine multiple devices
48+
getevent -m /dev/mouse0 -t /dev/input0
49+
50+
Press ``Ctrl+C`` to safely terminate the monitoring process.
51+
52+
Requirements
53+
------------
54+
55+
- NuttX input subsystem support must be enabled.
56+
- Kernel syslog output must be configured for event logging.

0 commit comments

Comments
 (0)