NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #3486 most downloaded on crates.io
Minimal event-based abstraction for working with gamepads
Last release 4 months ago
30 May 2026
Release timing varies
gaps range from 3 weeks to 6 months
Nearly every release is documented
notes for 36 of 38 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
38 releases · first in 2018
windows: Propagate more errors to prevent panics on wine
macOS: Switched to objc2-core-foundation and objc2-io-kit. (!163)
objc2-core-foundation and objc2-io-kit. (!163)LinuxGamepadExt trait with devpath method. (!166, !167)udev_device_get_syspath. (!167)One column per quarter.
### Fixed - Fixed mappings on macOS.
### Changed - Updated windows and nix crates
windows and nix crates### Changed - Updated windows crate
windows crateFixed panic on macOS when gamepad’s vec had unexpected length after failing to open a device
windows crateFixed possible panic on Windows when NonRoamableId() could return error.
NonRoamableId() could return error.Added ev::Code::into_u32() ( @rukai ). ev::{Button, Axis, AxisOrBtn} now implements Hash ( @sheath ). Changed The URL of repository has changed to htt
Repeat filter.Axis::DPadY was inverted on Linux.windows crateAdded Support for parsing SLD 2.0.6 mappings. ButtonChanged event. It contains value in range [0.0, 1.0]. GilrsBuilder::set_axis_to_btn() . It allow t
ButtonChanged event. It contains value in range [0.0, 1.0].GilrsBuilder::set_axis_to_btn(). It allow to customize on which values
ButtonePressed and ButtonReleased are emitted.GilrsBuilder::set_update_state which control whether gamepad state should
be updated automatically.ButtonState::value().Mapping::insert_{btn,axis}().Gampead::os_name() and Gamepad::map_name(). (@rukai)GilrsBuilder::add_env_mappings() and GilrsBuilder::add_included_mappings(),
allow to configure whether to load mappings from SDL_GAMECONTROLLERCONFIG env
and bundled mappings. (@rukai)Gilrs::insert_event().Axis::second_axis() – returns the other axis of gamepad element. For example,
this function will return LeftStickX for LeftStickY.Mapping no longer implements Index and IndexMut operators. Use
Mapping::insert_{btn,axis}() methods to add new mappings.Axis::{LeftTrigger, LeftTrigger2, RightTrigger, RightTrigger2}. All events
with these are now button events. ButtonChanged event contains value.Gilrs::gamepad() and Gilrs::gamepad_mut() – use Index operator instead.Filter::filter to Filter::filter_ev because RFC 2124 added
filter method to Option (our Filter is implemented for Option<Event>).Gamepad::deadzone() now returns Option<f32> instead of f32.NativeEvCode is replaced by ev::Code, a strongly typed struct that also
distinguish between axes and buttons.State now tracks floating-point value of buttons.State::value() can now be used to also examine value of buttons.GilrsBuilder::set_update_state.Gilrs::new() and GilrsBuilder::build() now returns Result. Dummy context
can still be used, but only if result of failure is unsupported platform.Gilrs::connected_gamepad() and Gilrs::connected_gamepad_mut() to
get() and get_mut().Filter and FilterFn now borrows Gilrs mutably.c_char = u8.EventType and Event as non_exhaustivewasm: Fixed panic when browser assigned unexpected gamepad ID
Gilrs
was dropped.Nothing published for this version
### Changed - Updated windows crate
windows crateFixed building on FreeBSD and DragonFly by not using linux implementation
Added vendor_id() and product_id() to Gamepad.
vendor_id() and product_id() to Gamepad.windows crate to 0.54.### Changed - Updated windows crate to 0.52.
windows crate to 0.52.Disabled unnecessary default features for inotify.
inotify.Flatpak is now supported by using inotify instead of udev. (!104)
windows: Join wgi thread on Gilrs's drop
Gilrs's dropwindows to 0.51Linux: fixed panic when calling get_power_info on disconnected gamepad.
get_power_info on disconnected gamepad.### Added - Gilrs::next_event_blocking()
Gilrs::next_event_blocking()Updated io-kit-sys, windows and nix
io-kit-sys, windows and nixweb: Fixed handling of disconnected gamepads
windows to 0.44Fixed linux: Fixed compilation on platforms with c_char = u8 (for example ARM).
Gilrs is now Send on Linux.Fixed Fixed compilation errors on recent nightly introduced by addition of filter method to Option . If you want to use filters in your code on nightl
Added Mapping::remove_button() and Mapping::remove_axis() . GilrsBuilder for customizing how Gilrs is created. Event filters. See ev::filter module fo
Mapping::remove_button() and Mapping::remove_axis().GilrsBuilder for customizing how Gilrs is created.ev::filter module for more info.Gilrs::next_event() - use it with while let loop in your event loop.
This allow to avoid borrow checker problems that EventIterator caused.Dropped. Used by filters to indicate that you should ignore
this event.ButtonRepeated. Can be emitted by Repeat filter.Axis::{DPadX, DPadY}Gamepad::{button_name, axis_name, button_code, axis_code} functions for
accessing mapping data.Gamepad::axis_data, button_data – part of new extended gamepad state.Gamepad::id() – returns gamepad ID.Gilrs::update, inc, counter, reset_counter – part of new extended
gamepad state.Gilrs::with_mappings() – use GilrsBuilder.Gilrs::poll_events() and EventIterator – use Gilrs::next_event()
instead.is_pressed() and value() methods is
same, but check out documentation for new features.Gilrs::update(Event).
This change was necessary because filters can change events.Event is now a struct and contains common information like id of gamepad
and timestamp (new). Old enum was renamed to EventType and can be accessed
from Event.event public field.ff::Error::EffectNotSupported to ff::Error::NotSupported.Button::Unknown and Axis::Unknown have now value of 0.Gamepad::set_mapping() (and _strict variant) now returns error when
creating mapping with Button::Unknown or Axis::Unknown. Additionally
_strict version does not allow Button::{C, Z} and Axis::{LeftZ, RightZ}.NativEvCode
unreachable!() when creating mapping with Button::{C, Z, Unknown} or Axis::{LeftZ, RightZ}.Windows now defaults to using Windows Gaming Input instead of xinput.
If you need to use xInput you can disable the wgi feature (It's enabled by
default) and enable the xinput feature.
gilrs-core = {version = "0.5.0", default-features = false, features = ["wgi"]}
Apps on Windows will now require a focused window to receive inputs by default.
This is a limitation of Windows Gaming Input. It requires an in focus Window
be associated with the process to receive events. You can still switch back
to using xInput by turning off default features and enabling the xinput
feature.
Minimal supported rust version is now 1.64.
Gamepad::axes() on macos now also returns "hat" axes. This should fix dpad
on single Switch Joy-Con.v0.4.1 - 2016-12-12 Fixed Type inference error introduced by generic index in <[T]>::get
v0.4.0 - 2016-12-11 Added Gamepad::mappings_source(&self) which can be used to filter gamepads which not provide unified controller layout MappingsSou
Gamepad::mappings_source(&self) which can be used to filter gamepads which
not provide unified controller layoutMappingsSource enumGamepad::set_mapping(…)
Gilrs::with_mappings(&str) to create Gilrs with additional gamepad mappingsUnknown
(previously all unknown events have been ignored)mappings_source() to
filter unwanted gamepads){Gamepad,GamepadState}::is_btn_pressed(Button) to
is_pressed(Button)
{Gamepad,GamepadState}::axis_val(Axis) to value(Axis)
Gilrs should no longer panic if there are some unexpected problems with
Udevwasm-bindgen feature are removed.uuid and nix to current version.next_event() no longer panic if getGamepads() is not available.### Changed - Updated dependencies
Add support for wasm-bindgen (@coolreader18)
macos: dpad is supported as a set of dpad axes (gilrs filters dpad axes to dpad buttons) (@cleancut).
Fixed compilation on musl.
Fixed compilation on musl.
Updated dependencies.
Updated dependencies.
Fixed compilation on platforms with dummy impl
xinput: Removed unneeded logging
IS_Y_AXIS_REVERSED is now correctly set to trueWindows: XInput is now dynamically loaded using rusty-xinput
is_connected() after hotpluggingDisconnected event (@ryanisaacg)### Fixed - Compilation error on macOS
Initial support for macOS (@jtakakura). There are still some functionality missing, check related issues in #58.
AxisInfo::deadzone is now a Option.AxisInfo::deadzone() function.Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →