vhidkb

virtual HID keyboard
git clone git://git.rr3.xyz/vhidkb
Log | Files | Refs | README | LICENSE

commit 740460423726fab896119456519bfb9766b4a4bc
parent fd8de584be02983a268acf7e2825cedd3b53daa1
Author: Robert Russell <robertrussell.72001@gmail.com>
Date:   Wed, 17 Jul 2024 16:13:20 -0700

Update man page to meet conventions

See man-pages(7).

Diffstat:
MREADME | 4++--
Mvhidkb.1 | 27++++++++++++++-------------
2 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/README b/README @@ -36,8 +36,8 @@ NOTES By default, accessing /dev/uhid requires root privilages. For easy and secure use, the author recommends creating a "uhid" group for the /dev/uhid device and the vhidkb executable, with the latter having its - SGID bit set. (Changing the group of /dev/uhid can be automated in init - scripts.) + set-group-ID bit set. Changing the group of /dev/uhid can be automated + in init scripts. SEE ALSO HID Usage Tables <https://usb.org/sites/default/files/hut1_3_0.pdf> diff --git a/vhidkb.1 b/vhidkb.1 @@ -4,10 +4,10 @@ vhidkb \- virtual HID keyboard .SH SYNOPSIS \fBvhidkb\fR [\-h] [\-d \fIDEVICE\fR] [\-t \fIDELAY\fR] .SH DESCRIPTION -vhidkb creates a virtual 256-key HID keyboard with N-key rollover using the -Linux /dev/uhid interface. Each key starts in the released state, and each -byte received over stdin toggles the key of that number. Keys are numbered -in accordance with the HID usage page 0x07. vhidkb destroys the virtual +\fBvhidkb\fR creates a virtual 256-key HID keyboard with N-key rollover using +the Linux \fI/dev/uhid\fR interface. Each key starts in the released state, and +each byte received over stdin toggles the key of that number. Keys are numbered +in accordance with the HID usage page 0x07. \fBvhidkb\fR destroys the virtual keyboard and exits after reaching EOF. .SH OPTIONS .TP @@ -15,24 +15,25 @@ keyboard and exits after reaching EOF. Display a help message. .TP \fB\-d\fR \fIDEVICE\fR -Use \fIDEVICE\fR as the /dev/uhid interface instead of "/dev/uhid". +Use \fIDEVICE\fR as the \fI/dev/uhid\fR interface instead of "/dev/uhid". .TP \fB\-t\fR \fIDELAY\fR Wait \fIDELAY\fR milliseconds after the first process opens the HID device before sending key events. If \fIDELAY\fR is negative, then key events are sent -even if no process has the HID device open. By default, vhidkb acts as if +even if no process has the HID device open. By default, \fBvhidkb\fR acts as if "\-t 100" is passed as an option. .SH NOTES The \fB\-t\fR option exists as a hack to solve timing issues where an X server opens the HID device, closes it, and then opens it again, all within a few tens of milliseconds. (Why does Xorg do this? I don't know.) With 0ms \fIDELAY\fR, -the first opening causes vhidkb to start sending key events (assuming some data -is available on stdin), but these events will most likely end up being -discarded. +the first opening causes \fBvhidkb\fR to start sending key events (assuming +some data is available on stdin), but these events will most likely end up +being discarded. .P -By default, accessing /dev/uhid requires root privilages. For easy and secure -use, the author recommends creating a "uhid" group for the /dev/uhid device and -the vhidkb executable, with the latter having its SGID bit set. (Changing the -group of /dev/uhid can be automated in init scripts.) +By default, accessing \fI/dev/uhid\fR requires root privilages. For easy and +secure use, the author recommends creating a "uhid" group for the +\fI/dev/uhid\fR device and the \fBvhidkb\fR executable, with the latter having +its set-group-ID bit set. Changing the group of \fI/dev/uhid\fR can be +automated in init scripts. .SH "SEE ALSO" HID Usage Tables <https://usb.org/sites/default/files/hut1_3_0.pdf>