EffectKindno longer implementsEq.Effect::kind()now returnsEffectKindinstead ofOption<EffectKind>.ForceFeedbackEvent::code()now returnsForceFeedbackCodeinstead ofOption<ForceFeedbackCode>.EventKind::Otherhas been renamed and hidden, and is no longer part of the public API.UnknownVarianterror type is now calledParseVariantError.- The
From<UnknownVariant> for io::Errorimplementation has been removed.
- The
Effect::direction()now uses aDirectionwrapper type.- The
logfunctionality is now hidden behind a"log"Cargo feature (enabled by default). Evdev::set_X_masknow accepts animpl IntoIteratorargument rather than a&BitSet<V>.- Previously deprecated APIs have been removed.
Condition-based force-feedback effects (Spring,Friction, …) now have explicit constructors in addition to theFromimplementations.- Added new
BusandInputPropconstants from upstream.
- Fix the return value of
BitSet::insertto match the documentation. - Make validation of values to be inserted into a
BitSetless strict, to permit the same set ofBitSets that the kernel will produce.
- The
Evdev::writemethod was deprecated in favor of a newEvdev::write_eventsmethod, to align the naming withread_events.- Similar deprecations have been performed for other types.
- No longer map
ENODEVtoErrorKind::NotFoundwhen opening anEvdev(instead ofErrorKind::Uncategorized).- This reverts a change was previously introduced in v0.4.3.
- Users of
Evdev::openalready had to handleENODEVregardless of this mapping, so nothing changes for correct applications. Both types of errors were possible before, and remain possible after the change.
- Add new event codes from upstream.
- Depend on
serde_coreinstead ofserdewhen the"serde"feature is enabled. - Don't report
ENODEVerrors to callers when enumerating devices that disappeared. - Document the possible error types when opening a device.
- Add
EffectId::{from_raw, raw}to allow conversion from/to raw integers. - Map
ENODEVtoErrorKind::NotFoundwhen opening anEvdev(instead ofErrorKind::Uncategorized).
- Add
UinputDevice::async_eventsfor asynchronously reading from a uinput device. - Add
UinputDevice::read_eventsto mirrorEvdev::read_events. - Minor documentation improvements.
- Don't clamp the value of absolute axes in
EventReader.- This fixes usage with certain drivers that deliberately send out-of-range axis values.
- Removed
FromRawFdimplementation ofUinputDevice.- Replaced with
UinputDevice::from_owned_fd.
- Replaced with
- Removed
Evdev::path(Evdevno longer stores the path it was opened from).enumerateandenumerate_hotplugnow yield(PathBuf, Evdev).
- Removed all
MAXandCNTconstants from event code types. - Shortened lifetime of
Effects returned byForceFeedbackUploadto be tied to&self. - Remove all
namemethods from event code types.- Codes can instead be formatted via
Debugor serialized with serde to obtain the name.
- Codes can instead be formatted via
- Removed all deprecated functionality.
- Added
rawandfrom_rawfunctions to all types that wrap an integer and didn't already have them. - Added
Switch::USB_INSERT. - Yield paths alongside devices when enumerating.
- Document more clearly that new enumeration constants can be added in minor releases.
- Document the
evdevdevice lifecycle. - Add a few missing setters to force-feedback types.
EventReader::valid_slotsnow returns a real iterator type instead ofimpl Iterator.
- Limit number of reports processed by
EventReader::update, to prevent getting stuck in there forever. - Made
enumerate_hotplug()more robust, avoiding duplicate devices. - Don't wrap
ENODEVin a custom error, making it easier to detect unplugged devices.
- Fix a panic in
examples/keymap.rs. - Fix all-zero
Scancodes being printed as the empty string.
- Include the
/dev/uinputpath in theio::Errorwhen opening the device fails. - Run the unit tests on Big Endian emulation in CI.
- Add a few missing getters for force-feedback types.
- Derive
PartialOrdandOrdforEffectId. - Rename
with_device_idtowith_input_id(with deprecation). - Rename the
ForceFeedbackEventconstructors to more evocative names (with deprecation). - Add
#[inline]to more functions.
- Fix a bug where uninitialized bytes would be unsoundly reinterpreted as
&[u8]when reading events from aUinputDevice. - Fix the
PartialEqimplementation ofPeriodicnot comparing custom waveform data.
- Improved documentation a bit.
- Deduplicated the internal implementation so that all event I/O happens in two root functions.
- Audited the crate for Undefined Behavior.
- Run CI on aarch64 Linux (GNU and musl).
- Add the crate to the
os::freebsd-apiscategory on crates.io.
- Try to fix the docs.rs render.
- Try to fix the docs.rs render.
- Try to fix the docs.rs render.
HotplugMonitorno longer implementsIterator, but now implementsIntoIterator.HotplugMonitornow yieldsHotplugEvents instead of already-openedEvdevs.- Call
HotplugEvent::opento open the device.
- Call
hotplug::enumeratehas moved toenumerate_hotplugin the crate root.
EventReader now allows reading events and reports via async.
This functionality requires enabling either the "tokio" or "async-io" Cargo features.
Note that a lot of evdev functionality cannot be made async and will always block.
Only reading events asynchronously via the EventReader is supported for now.
- FreeBSD: sleep after connecting to
devdto ensure no events go missing. - Mark some methods
#[inline]for more efficient code generation. - Don't redundantly invoke
fcntlif the non-blocking status is already what we want. - Implement
AsFdandIntoRawFdforHotplugMonitor. - Include device path in error message if opening fails.
- Add
Report::len, returning the number of events in theReport. - Device enumeration iterators have been made real types instead of
impl Iteratorand moved to theenumeratemodule.
- Update from
linux-ioctltouoctl1.0.
- Support FreeBSD, and test it in CI.
- Improve error messages when some
ioctls fail.
- Fix
InvalidInputerror when creatingEventReaders for most devices.
- Remove previously deprecated items.
- Change
Evdev::pathto return&Pathinstead ofOption<&Path>. - Replace
Iteratorimpl ofReportwithIntoIteratorimpls. - Change
InputEvent::kindto returnEventKindinstead ofOption<EventKind>.
- Implement
AsFd,AsRawFd, andIntoRawFdforEventReaderto mirrorEvdev. - Make most
AbsInfomethodsconst.
- Add
EventReader::reportsfor iterating overReports. - Deprecate
EventReader::next_reportin favor ofEventReader::reports. - Generate synthetic multitouch events when
EventReaderis created or events are dropped. - Fall back to write-only mode if opening an
Evdevin read-only mode fails due to lack of permission.
- Add
EventReader::next_reportfor fetching wholeReports from the device rather than events.
- Add
serdefeature that implementsSerializeandDeserializefor some of the event code wrapper types likeKey,Rel,Abs, etc.
- Renamed
Evdev::can_readandUinputDevice::can_readtoEvdev::is_readableandUinputDevice::is_readable, respectively (withcan_readbecoming a deprecated alias). - Added
Evdev::block_until_readableandUinputDevice::block_until_readable.
Initial release.