pub struct RawKeyEventArgs { /* private fields */ }Expand description
A raw keyboard event.
Implementations§
Source§impl RawKeyEventArgs
impl RawKeyEventArgs
Sourcepub fn new(
device: Rc<dyn IInputDevice>,
timestamp: u64,
root: Rc<dyn IInputRoot>,
type_: RawKeyEventType,
key: Key,
modifiers: RawInputModifiers,
physical_key: PhysicalKey,
key_symbol: Option<String>,
key_device_type: KeyDeviceType,
) -> Self
pub fn new( device: Rc<dyn IInputDevice>, timestamp: u64, root: Rc<dyn IInputRoot>, type_: RawKeyEventType, key: Key, modifiers: RawInputModifiers, physical_key: PhysicalKey, key_symbol: Option<String>, key_device_type: KeyDeviceType, ) -> Self
Creates raw key event args.
pub fn key(&self) -> Key
pub fn set_key(&self, value: Key)
pub fn modifiers(&self) -> RawInputModifiers
pub fn set_modifiers(&self, value: RawInputModifiers)
pub fn type_(&self) -> RawKeyEventType
pub fn set_type(&self, value: RawKeyEventType)
pub fn physical_key(&self) -> PhysicalKey
pub fn set_physical_key(&self, value: PhysicalKey)
pub fn key_device_type(&self) -> KeyDeviceType
pub fn set_key_device_type(&self, value: KeyDeviceType)
pub fn key_symbol(&self) -> Option<String>
pub fn set_key_symbol(&self, value: Option<String>)
Methods from Deref<Target = RawInputEventArgs>§
Sourcepub fn device(&self) -> &Rc<dyn IInputDevice>
pub fn device(&self) -> &Rc<dyn IInputDevice>
The associated device.
Sourcepub fn root(&self) -> &Rc<dyn IInputRoot>
pub fn root(&self) -> &Rc<dyn IInputRoot>
The root from which the event originates.
Sourcepub fn handled(&self) -> bool
pub fn handled(&self) -> bool
Whether the event was handled.
If an event is not marked handled after processing, this event will be returned to the windowing subsystem for further processing.
Sourcepub fn set_handled(&self, value: bool)
pub fn set_handled(&self, value: bool)
Marks the event as handled or unhandled.
Sourcepub fn set_timestamp(&self, value: u64)
pub fn set_timestamp(&self, value: u64)
Sets the timestamp associated with the event.
Trait Implementations§
Source§impl Deref for RawKeyEventArgs
impl Deref for RawKeyEventArgs
Source§type Target = RawInputEventArgs
type Target = RawInputEventArgs
The resulting type after dereferencing.
Source§fn deref(&self) -> &RawInputEventArgs
fn deref(&self) -> &RawInputEventArgs
Dereferences the value.
Source§impl IRawInputEventArgs for RawKeyEventArgs
impl IRawInputEventArgs for RawKeyEventArgs
Source§fn as_raw_input_event_args(&self) -> &RawInputEventArgs
fn as_raw_input_event_args(&self) -> &RawInputEventArgs
The base raw input event args.
Auto Trait Implementations§
impl !Freeze for RawKeyEventArgs
impl !RefUnwindSafe for RawKeyEventArgs
impl !Send for RawKeyEventArgs
impl !Sync for RawKeyEventArgs
impl !UnwindSafe for RawKeyEventArgs
impl Unpin for RawKeyEventArgs
impl UnsafeUnpin for RawKeyEventArgs
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> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more