Enum wayland_server::protocol::wl_keyboard::Event [−][src]
pub enum Event {
Keymap {
format: KeymapFormat,
fd: RawFd,
size: u32,
},
Enter {
serial: u32,
surface: Resource<WlSurface>,
keys: Vec<u8>,
},
Leave {
serial: u32,
surface: Resource<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
Keymapkeyboard mapping
This event provides a file descriptor to the client which can be memory-mapped to provide a keyboard mapping description.
Fields of Keymap
format: KeymapFormat | |
fd: RawFd | |
size: u32 |
Enterenter event
Notification that this seat's keyboard focus is on a certain surface.
Fields of Enter
serial: u32 | |
surface: Resource<WlSurface> | |
keys: Vec<u8> |
Leaveleave 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: u32 | |
surface: Resource<WlSurface> |
Keykey event
A key was pressed or released. The time argument is a timestamp with millisecond granularity, with an undefined base.
Fields of Key
serial: u32 | |
time: u32 | |
key: u32 | |
state: KeyState |
Modifiersmodifier 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: u32 | |
mods_depressed: u32 | |
mods_latched: u32 | |
mods_locked: u32 | |
group: u32 |
RepeatInforepeat 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: i32 | |
delay: i32 |
Trait Implementations
impl MessageGroup for Event[src]
impl MessageGroup for Eventconst MESSAGES: &'static [MessageDesc]
MESSAGES: &'static [MessageDesc] = &[super::MessageDesc{name: "keymap", since: 1, signature: &[super::ArgumentType::Uint, super::ArgumentType::Fd, super::ArgumentType::Uint],}, super::MessageDesc{name: "enter", since: 1, signature: &[super::ArgumentType::Uint, super::ArgumentType::Object, super::ArgumentType::Array],}, super::MessageDesc{name: "leave", since: 1, signature: &[super::ArgumentType::Uint, super::ArgumentType::Object],}, super::MessageDesc{name: "key", since: 1, signature: &[super::ArgumentType::Uint, super::ArgumentType::Uint, super::ArgumentType::Uint, super::ArgumentType::Uint],}, super::MessageDesc{name: "modifiers", since: 1, signature: &[super::ArgumentType::Uint, super::ArgumentType::Uint, super::ArgumentType::Uint, super::ArgumentType::Uint, super::ArgumentType::Uint],}, super::MessageDesc{name: "repeat_info", since: 4, signature: &[super::ArgumentType::Int, super::ArgumentType::Int],}]
Wire representation of this MessageGroup
type Map = ResourceMap
The wrapper type for ObjectMap allowing the mapping of Object and NewId arguments to the object map during parsing. Read more
fn is_destructor(&self) -> bool[src]
fn is_destructor(&self) -> boolWhether this message is a destructor Read more
fn opcode(&self) -> u16[src]
fn opcode(&self) -> u16The opcode of this message
fn child<Meta: ObjectMetadata>(
opcode: u16,
version: u32,
meta: &Meta
) -> Option<Object<Meta>>[src]
fn child<Meta: ObjectMetadata>(
opcode: u16,
version: u32,
meta: &Meta
) -> Option<Object<Meta>>Retrieve the child Object associated with this message if any
fn from_raw(msg: Message, map: &mut Self::Map) -> Result<Self, ()>[src]
fn from_raw(msg: Message, map: &mut Self::Map) -> Result<Self, ()>Construct a message from its raw representation
fn into_raw(self, sender_id: u32) -> Message[src]
fn into_raw(self, sender_id: u32) -> MessageTurn this message into its raw representation