Enum wayland_client::protocol::wl_keyboard::Event[][src]

#[non_exhaustive]pub enum Event {
    Keymap {
        format: KeymapFormat,
        fd: RawFd,
        size: u32,
    },
    Enter {
        serial: u32,
        surface: WlSurface,
        keys: Vec<u8>,
    },
    Leave {
        serial: u32,
        surface: WlSurface,
    },
    Key {
        serial: u32,
        time: u32,
        key: u32,
        state: KeyState,
    },
    Modifiers {
        serial: u32,
        mods_depressed: u32,
        mods_latched: u32,
        mods_locked: u32,
        group: u32,
    },
    RepeatInfo {
        rate: i32,
        delay: i32,
    },
}

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Keymap

keyboard mapping

This event provides a file descriptor to the client which can be memory-mapped to provide a keyboard mapping description.

From version 7 onwards, the fd must be mapped with MAP_PRIVATE by the recipient, as MAP_SHARED may fail.

Fields of Keymap

format: KeymapFormatfd: RawFdsize: u32
Enter

enter event

Notification that this seat’s keyboard focus is on a certain surface.

Fields of Enter

serial: u32surface: WlSurfacekeys: Vec<u8>
Leave

leave event

Notification that this seat’s keyboard focus is no longer on a certain surface.

The leave notification is sent before the enter notification for the new focus.

Fields of Leave

serial: u32surface: WlSurface
Key

key event

A key was pressed or released. The time argument is a timestamp with millisecond granularity, with an undefined base.

Fields of Key

serial: u32time: u32key: u32state: KeyState
Modifiers

modifier and group state

Notifies clients that the modifier and/or group state has changed, and it should update its local state.

Fields of Modifiers

serial: u32mods_depressed: u32mods_latched: u32mods_locked: u32group: u32
RepeatInfo

repeat rate and delay

Informs the client about the keyboard’s repeat rate and delay.

This event is sent as soon as the wl_keyboard object has been created, and is guaranteed to be received by the client before any key press event.

Negative values for either rate or delay are illegal. A rate of zero will disable any repeating (regardless of the value of delay).

This event can be sent later on as well with a new value if necessary, so clients should continue listening for the event past the creation of wl_keyboard.

Only available since version 4 of the interface

Fields of RepeatInfo

rate: i32delay: i32

Trait Implementations

impl Debug for Event[src]

impl MessageGroup for Event[src]

type Map = ProxyMap

The wrapper type for ObjectMap allowing the mapping of Object and NewId arguments to the object map during parsing. Read more

Auto Trait Implementations

impl !RefUnwindSafe for Event

impl Send for Event

impl Sync for Event

impl Unpin for Event

impl !UnwindSafe for Event

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.