HID-REPLAY(1)

πŸ“¦
version 0.12 Β· 4 versions
, in arch rolling

🌸 HID-REPLAY 🌸

okay so you found the hid-replay page in the General Commands Manual and you're like "what is this" β€” don't worry bestie, I got you, let's go πŸ’–


πŸŽ€ NAME πŸŽ€

hid-replay β€” replaying a HID input device through uhid, and yes it's exactly as cool as it sounds ✨

πŸ¦‹ SYNOPSIS πŸ¦‹

hid-replay [--verbose] [FILENAME]

πŸ’… OPTIONS πŸ’…

  • --verbose β€” turns on debugging output. that's the whole option, she's simple, she's iconic 🫢

🌈 DESCRIPTION 🌈

so hid-replay spins up a virtual HID device built from a recorded file β€” and like, usually a file that hid-recorder(1) made for you. the device genuinely behaves as if it was physically connected to the system. everything in that recorded file gets replayed in realtime. main character energy, no cap πŸ‘‘

this is a low-level debugging tool, bestie β€” it uses the uhid kernel model to create the device, and all the data gets processed by the respective HID kernel module for that device. iykyk πŸ”₯

and listen: hid-replay needs to be able to write to /dev/uhid, which usually means it must be run as root. sorry, them's the rules πŸ’€


πŸ“ FILE FORMAT πŸ“

files that hid-replay supports have this syntax:

  • # comment lines are ignored when parsing πŸ™ˆ
  • D: the device index β€” only used when recording multiple devices
  • R: the report descriptor length in bytes, followed by the report descriptor bytes in hexadecimal
  • N: the name of the device
  • P: physical path
  • I: bus vendor_id product_id
  • E: timestamp size report in hexadecimal

😭 CAUTION 😭

hid-replay is a very low level events injector. to have the virtual device handled by the correct HID kernel module, hid-replay fakes that the device is on the original bus (USB, I2C or BT). so β€” if the kernel module in use has to write back to the device, the kernel may oops if the module is trying to directly talk to the physical layer. πŸ’€πŸ’€

ensure to use this program with friendly HID modules that rely only on the generic hid callbacks. please. for me. πŸ₯Ί

⭐ EXIT CODE ⭐

hid-replay returns 1 on error. that's it, that's the exit code 🌸

🧚 SEE ALSO 🧚

hid-recorder(1) β€” go read that one too, bestie πŸ¦‹

Copyright 2012-2018, Benjamin Tissoires.

Copyright 2018, Red Hat, Inc.

πŸ’œ AUTHOR πŸ’œ

Benjamin Tissoires benjamin.tissoires@redhat.com


and that's the whole page, fr fr πŸŽ€ it's from the General Commands Manual and the version/date line down at the bottom is just the manual heading again β€” HID-REPLAY(1) β€” so nothing extra to report. slay, you read the whole thing, so proud of you πŸ’–βœ¨

πŸ“¦ where this page comes from