Skip to content

A library for emulating evdev character devices in userspace

License

Notifications You must be signed in to change notification settings

colinmarc/southpaw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Southpaw

tests docs

This is a library that lets you emulate linux evdev character devices completely in userspace, using FUSE.

Why would I want to do that?

Linux has good support for emulating input devices, with uinput. However, uinput suffers from a few drawbacks:

  • It doesn't hew to any sort of namespacing, and the devices it emulates are global to the system. That makes it difficult to use with containers.
  • Because of the above, it usually requires elevated privileges.

Because FUSE mounts can be used inside mount namespaces, southpaw lets you simulate input devices in rootless containers, without even needing root inside the container.

Features

Basic publishing of events is supported, both for blocking and non-blocking readers. Force feedback is not supported yet.

The following ioctls are currently implemented:

Ioctl Support
EVIOCGVERSION
EVIOCGID
EVIOCGREP
EVIOCSREP
EVIOCGKEYCODE
EVIOCGKEYCODE_V2
EVIOCSKEYCODE
EVIOCSKEYCODE_V2
EVIOCGNAME
EVIOCGPHYS
EVIOCGUNIQ
EVIOCGPROP
EVIOCGMTSLOTS
EVIOCGKEY
EVIOCGLED
EVIOCGSND
EVIOCGSW
EVIOCGBIT
EVIOCGABS
EVIOCSABS
EVIOCSFF
EVIOCGRMFF
EVIOCGEFFECTS
EVIOCGRAB
EVIOCREVOKE
EVIOCGMASK
EVIOCSMASK
EVIOCSCLOCKID

About

A library for emulating evdev character devices in userspace

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages