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§device_id: u32§phase: KeyboardEventPhase§hid_usage: u32§code_point: u32§modifiers: u32Trait Implementations§
Source§impl Clone for KeyboardEvent
impl Clone for KeyboardEvent
Source§fn clone(&self) -> KeyboardEvent
fn clone(&self) -> KeyboardEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for KeyboardEvent
Source§impl Debug for KeyboardEvent
impl Debug for KeyboardEvent
Source§impl<___E> Encode<KeyboardEvent, ___E> for KeyboardEventwhere
___E: InternalHandleEncoder + ?Sized,
impl<___E> Encode<KeyboardEvent, ___E> for KeyboardEventwhere
___E: InternalHandleEncoder + ?Sized,
Source§fn encode(
self,
encoder_: &mut ___E,
out_: &mut MaybeUninit<KeyboardEvent>,
_: (),
) -> Result<(), EncodeError>
fn encode( self, encoder_: &mut ___E, out_: &mut MaybeUninit<KeyboardEvent>, _: (), ) -> Result<(), EncodeError>
Encodes this value into an encoder and output.
§const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
Source§impl<'a, ___E> Encode<KeyboardEvent, ___E> for &'a KeyboardEventwhere
___E: InternalHandleEncoder + ?Sized,
impl<'a, ___E> Encode<KeyboardEvent, ___E> for &'a KeyboardEventwhere
___E: InternalHandleEncoder + ?Sized,
Source§fn encode(
self,
encoder_: &mut ___E,
out_: &mut MaybeUninit<KeyboardEvent>,
_: (),
) -> Result<(), EncodeError>
fn encode( self, encoder_: &mut ___E, out_: &mut MaybeUninit<KeyboardEvent>, _: (), ) -> Result<(), EncodeError>
Encodes this value into an encoder and output.
§const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
Source§impl<___E> EncodeOption<Box<'static, KeyboardEvent>, ___E> for KeyboardEvent
impl<___E> EncodeOption<Box<'static, KeyboardEvent>, ___E> for KeyboardEvent
Source§fn encode_option(
this: Option<KeyboardEvent>,
encoder: &mut ___E,
out: &mut MaybeUninit<Box<'static, KeyboardEvent>>,
_: (),
) -> Result<(), EncodeError>
fn encode_option( this: Option<KeyboardEvent>, encoder: &mut ___E, out: &mut MaybeUninit<Box<'static, KeyboardEvent>>, _: (), ) -> Result<(), EncodeError>
Encodes this optional value into an encoder and output.
Source§impl<'a, ___E> EncodeOption<Box<'static, KeyboardEvent>, ___E> for &'a KeyboardEvent
impl<'a, ___E> EncodeOption<Box<'static, KeyboardEvent>, ___E> for &'a KeyboardEvent
Source§fn encode_option(
this: Option<&'a KeyboardEvent>,
encoder: &mut ___E,
out: &mut MaybeUninit<Box<'static, KeyboardEvent>>,
_: (),
) -> Result<(), EncodeError>
fn encode_option( this: Option<&'a KeyboardEvent>, encoder: &mut ___E, out: &mut MaybeUninit<Box<'static, KeyboardEvent>>, _: (), ) -> Result<(), EncodeError>
Encodes this optional value into an encoder and output.
impl Eq for KeyboardEvent
Source§impl FromWire<KeyboardEvent> for KeyboardEvent
impl FromWire<KeyboardEvent> for KeyboardEvent
Source§fn from_wire(wire: KeyboardEvent) -> KeyboardEvent
fn from_wire(wire: KeyboardEvent) -> KeyboardEvent
Converts the given owned value to this type.
§const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
Source§impl FromWireRef<KeyboardEvent> for KeyboardEvent
impl FromWireRef<KeyboardEvent> for KeyboardEvent
Source§fn from_wire_ref(wire: &KeyboardEvent) -> KeyboardEvent
fn from_wire_ref(wire: &KeyboardEvent) -> KeyboardEvent
Converts the given reference to this type.
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 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for KeyboardEvent
impl PartialEq for KeyboardEvent
Source§impl PartialOrd for KeyboardEvent
impl PartialOrd for KeyboardEvent
impl StructuralPartialEq for KeyboardEvent
Auto Trait Implementations§
impl Freeze for KeyboardEvent
impl RefUnwindSafe for KeyboardEvent
impl Send for KeyboardEvent
impl Sync for KeyboardEvent
impl Unpin for KeyboardEvent
impl UnsafeUnpin for KeyboardEvent
impl UnwindSafe for KeyboardEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, W> FromWireOption<Box<'_, W>> for Twhere
T: FromWire<W>,
impl<T, W> FromWireOption<Box<'_, W>> for Twhere
T: FromWire<W>,
§fn from_wire_option(wire: Box<'_, W>) -> Option<T>
fn from_wire_option(wire: Box<'_, W>) -> Option<T>
Converts the given owned value to an option of this type.
§impl<T, W> FromWireOptionRef<Box<'_, W>> for Twhere
T: FromWireRef<W>,
impl<T, W> FromWireOptionRef<Box<'_, W>> for Twhere
T: FromWireRef<W>,
§fn from_wire_option_ref(wire: &Box<'_, W>) -> Option<T>
fn from_wire_option_ref(wire: &Box<'_, W>) -> Option<T>
Converts the given reference to an option of this type.
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]