Struct keyboard_types::webdriver::KeyInputState [−][src]
Store pressed keys and modifiers.
Spec: https://w3c.github.io/webdriver/#dfn-key-input-state
Implementations
impl KeyInputState[src]
pub fn new() -> KeyInputState[src]
New state without any keys or modifiers pressed.
Same as the default value.
pub fn dispatch_keydown(&mut self, raw_key: char) -> KeyboardEvent[src]
Get a keyboard-keydown event from a WebDriver key value.
Stores that the key is pressed in the state object.
The input cancel list is not implemented here but can be emulated
by adding the raw_key value with a keyUp action to a list
before executing this function.
Specification: https://w3c.github.io/webdriver/#dfn-dispatch-a-keydown-action
pub fn dispatch_keyup(&mut self, raw_key: char) -> Option<KeyboardEvent>[src]
Get a keyboard-keyup event from a WebDriver key value.
Updates state. Returns None if the key is not listed as pressed.
Specification: https://w3c.github.io/webdriver/#dfn-dispatch-a-keyup-action
Trait Implementations
impl Clone for KeyInputState[src]
fn clone(&self) -> KeyInputState[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for KeyInputState[src]
impl Default for KeyInputState[src]
fn default() -> KeyInputState[src]
impl<'de> Deserialize<'de> for KeyInputState[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
__D: Deserializer<'de>,
impl Serialize for KeyInputState[src]
Auto Trait Implementations
impl RefUnwindSafe for KeyInputState
impl Send for KeyInputState
impl Sync for KeyInputState
impl Unpin for KeyInputState
impl UnwindSafe for KeyInputState
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,