pub enum KeyEventType {
RawKeyDown = 2,
KeyDown = 0,
KeyUp = 1,
Char = 3,
}Expand description
The type of the KeyEvent.
Variants§
RawKeyDown = 2
Raw Key-Down type. Use this when a physical key is pressed.
You should use RawKeyDown for physical key presses since it allows the renderer to
handle accelerator command translation.
KeyDown = 0
Key-Down event type. (Does not trigger accelerator commands in WebCore) (eg, Ctrl+C for copy is an accelerator command).
You should probably use RawKeyDown instead when a physical key is pressed.
This type is only here for historic compatibility with WebCore’s key event types.
KeyUp = 1
Key-Up event type. Use this when a physical key is released.
Char = 3
Character input event type. Use this when the OS generates text from a physical key being
pressed (for example, this maps to WM_CHAR on Windows).
Trait Implementations§
Source§impl Clone for KeyEventType
impl Clone for KeyEventType
Source§fn clone(&self) -> KeyEventType
fn clone(&self) -> KeyEventType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for KeyEventType
Auto Trait Implementations§
impl Freeze for KeyEventType
impl RefUnwindSafe for KeyEventType
impl Send for KeyEventType
impl Sync for KeyEventType
impl Unpin for KeyEventType
impl UnwindSafe for KeyEventType
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,
Source§impl<T> Content for Twhere
T: Copy,
impl<T> Content for Twhere
T: Copy,
Source§unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E>
unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E>
Prepares an output buffer, then turns this buffer into an
Owned.
User-provided closure F must only write to and not read from &mut Self.Source§fn get_elements_size() -> usize
fn get_elements_size() -> usize
Returns the size of each element.
Source§fn to_void_ptr(&self) -> *const ()
fn to_void_ptr(&self) -> *const ()
Produces a pointer to the data.
Source§fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
Source§fn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.