#keyboard #mouse #gamepad #hid

multiinput

A pure rust gamepad/mouse/keyboard input library based off of rawinput for the windows platform

15 releases

Uses old Rust 2015

0.1.0 May 11, 2020
0.0.15 Jan 6, 2019
0.0.14 Aug 4, 2018
0.0.13 Jul 22, 2018
0.0.2 Feb 15, 2017

#198 in Hardware support

Download history 24/week @ 2021-01-12 42/week @ 2021-01-19 19/week @ 2021-01-26 12/week @ 2021-02-02 44/week @ 2021-02-09 83/week @ 2021-02-16 27/week @ 2021-02-23 22/week @ 2021-03-02 14/week @ 2021-03-09 16/week @ 2021-03-16 57/week @ 2021-03-23 53/week @ 2021-03-30 35/week @ 2021-04-06 55/week @ 2021-04-13 27/week @ 2021-04-20 27/week @ 2021-04-27

127 downloads per month
Used in 3 crates

MIT license

60KB
1.5K SLoC

multiinput-rust

Documentation

A windows rawinput library for mice/keyboards/joysticks for use with rust.

The original purpose of this library was to help me learn how the art of binding dll's to rust and to allow the use of joysticks in game development (e.g. alongside the glium library). Eventually this was used to develop games that had a separate mice for each player.

Key Features

  • Can differentiate between different keyboards/mice.
  • It is intended to be single-purpose and lightweight and can be integrated with other libraries without interference (this is done by having a hidden background input window running).
  • In principle this approach could support all HID devices, provide input to devices (e.g. force feedback) and should be able to break the 4 device limit on Xinput controllers.

Known Limitations

  • Some track pads are not picked up
  • The application can crash if the wrong drivers are installed for a device (e.g. a joystick)
  • XInput support is limited (see the docs for details)

Dependencies

~27KB