Skip to content

sydarn/input-wrapper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Virtual Controller

Virtual Controller is a simple C program to emulate to userspace a controller composed of a specific set of input devices. The input devices are identified automatically and enumerated providing their functionality to the composite device. Currently supported is a single force-feedback device, a single abs device, and up to 8 key devices.

Building

There are currently no libraries required to compile or use the program, it is built entirely utilizing existing kernel features such as uinput (CONFIG_INPUT_UINPUT), evdev (CONFIG_INPUT_EVDEV), and epoll (CONFIG_EPOLL). These kernel options are usually default.

To compile, simply run make.

make

Installation

After compilation, install the program.

sudo make install

Usage

virtual_controller &

The program must be running in the background in order to redirect inputs to the newly created virtual controller. The user should have permission to both access input and uinput devices, and the kernel should support UINPUT,

Contributing

Pull requests are welcome. Code must follow the Linux Kernel Coding Style. While I reserve the right to revisit the decision, it is my expectation that no external libraries should be used; this is to ensure maximum portability in the solution.

License

GPLv2

About

Use IOCTLs to Redirect Inputs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 96.6%
  • Makefile 3.4%