[][src]Trait simulate::Keylike

pub trait Keylike: Copy {
    pub fn into_event(self, action: Action) -> Event;

    pub fn press(self) -> Event { ... }
pub fn release(self) -> Event { ... }
pub fn press_release(self) -> Chain<Once<Event>, Once<Event>> { ... } }

A trait for structures which can be turned into an event, given an action.

Required methods

pub fn into_event(self, action: Action) -> Event[src]

Turns the keylike into an event.

Loading content...

Provided methods

pub fn press(self) -> Event[src]

Creates an event that causes the keylike to be pressed.

pub fn release(self) -> Event[src]

Creates an event that causes the keylike to be released.

pub fn press_release(self) -> Chain<Once<Event>, Once<Event>>[src]

Creates an iterator that yield a Press event and a Release for this keylike.

Loading content...

Implementations on Foreign Types

impl Keylike for char[src]

Loading content...

Implementors

impl Keylike for Key[src]

Loading content...