Docs.rs
  • input-linux-0.7.1
    • input-linux 0.7.1
    • Permalink
    • Docs.rs crate page
    • MIT
    • Links
    • Documentation
    • Repository
    • crates.io
    • Source
    • Owners
    • arcnmx
    • Dependencies
      • bytes ^1 normal optional
      • input-linux-sys ^0.9.0 normal
      • nix ^0.29 normal
      • serde ^1 normal optional
      • tokio-util ^0.6 normal optional
      • tokio-util ^0.7 normal optional
    • Versions
    • 100% of the crate is documented
  • Platform
    • i686-unknown-linux-gnu
    • x86_64-unknown-linux-gnu
  • Feature flags
  • docs.rs
    • About docs.rs
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation

Crate input_linux

input_linux0.7.1

  • All Items

Crate Items

  • Re-exports
  • Modules
  • Structs
  • Enums
  • Traits

Crates

  • input_linux

Crate input_linux

Source
Expand description

Userspace bindings to the Linux evdev and uinput subsystems.

Start by looking at the EvdevHandle and UInputHandle types.

Re-exports§

pub use crate::evdev::EvdevHandle;
pub use crate::uinput::UInputHandle;
pub use crate::bitmask::Bitmask;
pub use input_linux_sys as sys;

Modules§

bitmask
Bitmasks are a set of bits that can be indexed and queried by the values of various enum types.
enum_iterator
Iteration over enum values.
evdev
An interface to the Linux kernel’s event devices (/dev/input/*).
uinput
An interface to the Linux uinput kernel module that can be used to create virtual input devices.

Structs§

AbsoluteEvent
Events that occur when the state of an absolute axis is changed.
AbsoluteInfo
Describes the capabilities and constraints of an input device’s absolute axis.
AbsoluteInfoSetup
A descriptor used to create a virtual uinput absolute axis.
AutorepeatEvent
An event that configures the autorepeat behaviour of the input device.
EventCodeccodec
EventTime
An event timestamp.
ForceFeedbackEvent
An event that configures a force feedback effect.
ForceFeedbackStatusEvent
An event that indicates the status of a force feedback effect.
InputEvent
A generic event.
InputId
Identifies an input device.
KeyEvent
An event that indicates the state of a key has changed.
KeyState
Key event value states.
LedEvent
An event that indicates whether the specified LED should turn on/off.
MiscEvent
Miscellaneous events.
RangeError
Indicates that a value or event type code was out of range.
RelativeEvent
Events that occur when the state of a relative axis is changed.
SoundEvent
An event that indicates the device should play a specified sound.
SwitchEvent
Special switch events.
SynchronizeEvent
Synchronization events are used by evdev to group events or convey other out-of-band information.
UInputEvent
A special event type used to send force-feedback events to uinput.

Enums§

AbsoluteAxis
Absolute axes.
AutorepeatKind
Autorepeat values.
Event
An owned and typed input event.
EventKind
Event types
EventMut
A mutable reference to an input event.
EventRef
A reference to an input event.
ForceFeedbackKind
Force feedback events.
ForceFeedbackStatusKind
Force feedback status events.
InputProperty
Device properties and quirks.
Key
Keys and Buttons
LedKind
LEDs.
MiscKind
Miscellaneous events.
RelativeAxis
Relative axes.
SoundKind
Sounds
SwitchKind
Switch events.
SynchronizeKind
Synchronization events.
UInputKind
UInput feedback events.

Traits§

GenericEvent
A generic linux input event.

Results

Settings
Help
    struct
    input_linux::uinput::UInputHandle
    A handle to a uinput allowing the use of ioctls
    method
    input_linux::uinput::UInputHandle::into_inner
    UInputHandle<F> -> F
    Extracts the contained handle.
    method
    input_linux::uinput::UInputHandle::into_raw_fd
    UInputHandle<F> -> RawFd
    method
    input_linux::uinput::UInputHandle::as_fd
    &UInputHandle<F> -> BorrowedFd
    method
    input_linux::uinput::UInputHandle::as_inner
    &UInputHandle<F> -> &F
    A reference to the contained handle.
    method
    input_linux::uinput::UInputHandle::version
    &UInputHandle<F> -> Result<u32>
    UI_GET_VERSION
    method
    input_linux::uinput::UInputHandle::sys_path
    &UInputHandle<F> -> Result<PathBuf>
    Returns the sysfs directory for the input device.
    method
    input_linux::uinput::UInputHandle::dev_create
    &UInputHandle<F> -> Result<()>
    UI_DEV_CREATE
    method
    input_linux::uinput::UInputHandle::evdev_name
    &UInputHandle<F> -> Result<OsString>
    The device name of the input device.
    method
    input_linux::uinput::UInputHandle::evdev_path
    &UInputHandle<F> -> Result<PathBuf>
    The device node path of the input device.
    method
    input_linux::uinput::UInputHandle::dev_destroy
    &UInputHandle<F> -> Result<()>
    UI_DEV_DESTROY
    method
    input_linux::uinput::UInputHandle::sys_name
    &UInputHandle<F> -> Result<Vec<u8>>
    UI_GET_SYSNAME
    method
    input_linux::uinput::UInputHandle::set_evbit
    &UInputHandle<F>, EventKind -> Result<()>
    UI_SET_EVBIT
    method
    input_linux::uinput::UInputHandle::set_ffbit
    &UInputHandle<F>, ForceFeedbackKind -> Result<()>
    UI_SET_FFBIT
    method
    input_linux::uinput::UInputHandle::set_swbit
    &UInputHandle<F>, SwitchKind -> Result<()>
    UI_SET_SWBIT
    method
    input_linux::uinput::UInputHandle::set_absbit
    &UInputHandle<F>, AbsoluteAxis -> Result<()>
    UI_SET_ABSBIT
    method
    input_linux::uinput::UInputHandle::set_keybit
    &UInputHandle<F>, Key -> Result<()>
    UI_SET_KEYBIT
    method
    input_linux::uinput::UInputHandle::set_ledbit
    &UInputHandle<F>, LedKind -> Result<()>
    UI_SET_LEDBIT
    method
    input_linux::uinput::UInputHandle::set_mscbit
    &UInputHandle<F>, MiscKind -> Result<()>
    UI_SET_MSCBIT
    method
    input_linux::uinput::UInputHandle::set_relbit
    &UInputHandle<F>, RelativeAxis -> Result<()>
    UI_SET_RELBIT
    method
    input_linux::uinput::UInputHandle::set_sndbit
    &UInputHandle<F>, SoundKind -> Result<()>
    UI_SET_SNDBIT
    method
    input_linux::uinput::UInputHandle::set_propbit
    &UInputHandle<F>, InputProperty -> Result<()>
    UI_SET_PROPBIT
    method
    input_linux::uinput::UInputHandle::as_inner_mut
    &mut UInputHandle<F> -> &mut F
    A mutable reference to the contained handle.
    method
    input_linux::uinput::UInputHandle::set_phys
    &UInputHandle<F>, &CStr -> Result<()>
    UI_SET_PHYS
    method
    input_linux::uinput::UInputHandle::abs_setup
    &UInputHandle<F>, &uinput_abs_setup -> Result<()>
    UI_ABS_SETUP
    method
    input_linux::uinput::UInputHandle::dev_setup
    &UInputHandle<F>, &uinput_setup -> Result<()>
    UI_DEV_SETUP
    method
    input_linux::uinput::UInputHandle::ff_erase_end
    &UInputHandle<F>, &uinput_ff_erase -> Result<()>
    UI_END_FF_ERASE
    method
    input_linux::uinput::UInputHandle::ff_upload_end
    &UInputHandle<F>, &uinput_ff_upload -> Result<()>
    UI_END_FF_UPLOAD
    method
    input_linux::uinput::UInputHandle::write
    &UInputHandle<F>, &[input_event] -> Result<usize>
    Write input events to the device
    method
    input_linux::uinput::UInputHandle::ff_erase_begin
    &UInputHandle<F>, &mut uinput_ff_erase -> Result<()>
    UI_BEGIN_FF_ERASE
    method
    input_linux::uinput::UInputHandle::ff_upload_begin
    &UInputHandle<F>, &mut uinput_ff_upload -> Result<()>
    UI_BEGIN_FF_UPLOAD
    method
    input_linux::uinput::UInputHandle::read
    &UInputHandle<F>, &mut [input_event] -> Result<usize>
    Read events from uinput (see EV_UINPUT)
    method
    input_linux::uinput::UInputHandle::sys_name_buf
    &UInputHandle<F>, &mut [u8] -> Result<usize>
    UI_GET_SYSNAME
    method
    input_linux::uinput::UInputHandle::create
    &UInputHandle<F>, &InputId, &[u8], u32, &[AbsoluteInfoSetup] -> Result<()>
    Create a new uinput device, and fall back on the legacy …
    method
    input_linux::uinput::UInputHandle::create_legacy
    &UInputHandle<F>, &InputId, &[u8], u32, &[AbsoluteInfoSetup] -> Result<()>
    Create a new uinput device using the legacy UI_DEV_CREATE …
    method
    input_linux::uinput::UInputHandle::new
    F -> UInputHandle<F>
    Create a new handle using an existing open file object.
    method
    input_linux::uinput::UInputHandle::from_fd
    RawFd -> UInputHandle<OwnedFd>
    Create a new handle from a raw file descriptor.
    method
    input_linux::uinput::UInputHandle::from_raw_fd
    RawFd -> UInputHandle<F>