Struct fidl_fuchsia_ui_input::KeyboardEvent
source · pub struct KeyboardEvent {
pub event_time: u64,
pub device_id: u32,
pub phase: KeyboardEventPhase,
pub hid_usage: u32,
pub code_point: u32,
pub modifiers: u32,
}
Expand description
KeyboardEvent
represents event generated by a user’s interaction with a
keyboard.
Those events are triggered by distinct pressed state changes of the keys.
The state transitions should be as follows: PRESSED -> (REPEAT ->) RELEASED or PRESSED -> (REPEAT ->) CANCELLED
The input system will repeat those events automatically when a code_point is available.
DEPRECATED: Will be removed in favor of fuchsia.ui.input.KeyEvent
.
Fields§
§event_time: u64
Time the event was delivered. The time is in nanoseconds and corresponds to the monotonic time as determined by the zx_clock_get_monotonic syscall.
device_id: u32
§phase: KeyboardEventPhase
§hid_usage: u32
Keyboard HID Usage See https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf
code_point: u32
The unicode code point represented by this key event, if any. Dead keys are represented as Unicode combining characters.
If there is no unicode code point, this value is zero.
modifiers: u32
Key modifiers as defined by the different kModifier constants such as
kModifierCapsLock
currently pressed
Trait Implementations§
source§impl Clone for KeyboardEvent
impl Clone for KeyboardEvent
source§fn clone(&self) -> KeyboardEvent
fn clone(&self) -> KeyboardEvent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for KeyboardEvent
impl Debug for KeyboardEvent
source§impl Decode<KeyboardEvent> for KeyboardEvent
impl Decode<KeyboardEvent> for KeyboardEvent
source§impl Encode<KeyboardEvent> for &KeyboardEvent
impl Encode<KeyboardEvent> for &KeyboardEvent
source§impl<T0: Encode<u64>, T1: Encode<u32>, T2: Encode<KeyboardEventPhase>, T3: Encode<u32>, T4: Encode<u32>, T5: Encode<u32>> Encode<KeyboardEvent> for (T0, T1, T2, T3, T4, T5)
impl<T0: Encode<u64>, T1: Encode<u32>, T2: Encode<KeyboardEventPhase>, T3: Encode<u32>, T4: Encode<u32>, T5: Encode<u32>> Encode<KeyboardEvent> for (T0, T1, T2, T3, T4, T5)
source§impl Hash for KeyboardEvent
impl Hash for KeyboardEvent
source§impl Ord for KeyboardEvent
impl Ord for KeyboardEvent
source§fn cmp(&self, other: &KeyboardEvent) -> Ordering
fn cmp(&self, other: &KeyboardEvent) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<KeyboardEvent> for KeyboardEvent
impl PartialEq<KeyboardEvent> for KeyboardEvent
source§fn eq(&self, other: &KeyboardEvent) -> bool
fn eq(&self, other: &KeyboardEvent) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<KeyboardEvent> for KeyboardEvent
impl PartialOrd<KeyboardEvent> for KeyboardEvent
source§fn partial_cmp(&self, other: &KeyboardEvent) -> Option<Ordering>
fn partial_cmp(&self, other: &KeyboardEvent) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl TypeMarker for KeyboardEvent
impl TypeMarker for KeyboardEvent
§type Owned = KeyboardEvent
type Owned = KeyboardEvent
source§fn inline_align(context: Context) -> usize
fn inline_align(context: Context) -> usize
source§fn inline_size(context: Context) -> usize
fn inline_size(context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.source§impl ValueTypeMarker for KeyboardEvent
impl ValueTypeMarker for KeyboardEvent
§type Borrowed<'a> = &'a <KeyboardEvent as TypeMarker>::Owned
type Borrowed<'a> = &'a <KeyboardEvent as TypeMarker>::Owned
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more