summaryrefslogtreecommitdiff
path: root/sys/man
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2023-01-01 18:37:08 +0000
committercinap_lenrek <cinap_lenrek@felloff.net>2023-01-01 18:37:08 +0000
commit705885553cced0300ed72722b20bad405af2bdce (patch)
tree80ec1d964bc7a30b4ca55ac08170da3b5dfe4645 /sys/man
parentba66d8f69edd895682f2661524a1d07612cb9ba8 (diff)
mouse: Make /dev/mousein readable to get mouse status without blocking
There is currently no way to get the current mouse position and button states without blocking.
Diffstat (limited to 'sys/man')
-rw-r--r--sys/man/3/mouse21
1 files changed, 14 insertions, 7 deletions
diff --git a/sys/man/3/mouse b/sys/man/3/mouse
index 54e51d5ea..eda62cfab 100644
--- a/sys/man/3/mouse
+++ b/sys/man/3/mouse
@@ -56,23 +56,30 @@ Writes to the
.B mousein
file are processed as if they were generated by the
mouse hardware itself,
-as extra mouse events to be processed and passed back via
-the
+as extra mouse events to be processed and passed back via the
.B mouse
file.
+Reading the
+.B mousein
+file returns the current mouse status without waiting.
The
.B mousein
file, which may be opened
-only by the host owner, is intended for controlling devices, such as USB mice,
+only by the host owner, is intended for controlling devices,
+such as USB mice and tablets,
that are managed by user-level software.
Each event should consist of
the letter
.B m
-followed by delta
-.IR x ,
-delta
-.IR y ,
+(for relative delta coordinates)
+or
+.B A
+(for absolute screen coordinates)
+followed by the
+.I x
and
+.I y
+coordinates and
.IR buttons
as space-separated decimal numbers.
.PP