KeyEventWui

Enum KeyEventWui 

Source
pub enum KeyEventWui {
    Keydown {
        common: KeyEventWuiCommon,
    },
    Char {
        common: KeyEventWuiCommon,
        character: u16,
        unmodified_character: u16,
    },
    Keyup {
        common: KeyEventWuiCommon,
    },
}
Expand description

Represents a single Keyboard event. Is a thin wrapper around the actual key information needed by CEF. Do not @me that this is complicated and odd. I know. Be my guest when you want to make a PR that streamlines this approach. It is generally hard to maintain something that uses this interface because of all the moving parts. I tried to reduce complexity where possible.

Hold Key event information. Based on https://cef-builds.spotifycdn.com/docs/111.2/structcef__key__event__t.html

Do yourself a favor and read through these docs

NOTE: What about RAWKEYDOWN? As far as I can tell it serves no purpose in synthetic events, which is what I am generating here anyways so they can be ignored. If you need the event, it can easiliy be added. Make a PR

Variants§

§

Keydown

Fields

§

Char

Fields

§character: u16

The character generated by the keystroke. NOTE: Getting this unicode character is usually a platform specific process depending on your IO layer.

§unmodified_character: u16

Same as |character| but unmodified by any concurrently-held modifiers (except shift). This is useful for working out shortcut keys.

NOTE: Getting this unicode character is usually a platform specific process depending on your IO layer.

§

Keyup

Fields

Trait Implementations§

Source§

impl Debug for KeyEventWui

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<&KeyEventWui> for KeyEvent

Source§

fn from(value: &KeyEventWui) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, U> ConvertParam<U> for T
where T: Into<U>,

Source§

fn into_raw(self) -> U

Source§

impl<T, U> ConvertReturnValue<U> for T
where T: Into<U>,

Source§

fn wrap_result(self) -> U

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.