Trait rin::prelude::KeyEvents[][src]

pub trait KeyEvents<'a> {
    pub fn pressed<K>(self, k: K) -> Stream<'a, Key>
    where
        K: Into<Key>
;
pub fn released<K>(self, k: K) -> Stream<'a, Key>
    where
        K: Into<Key>
;
pub fn pressed_with_mods<K>(
        self,
        k: K,
        modifers: KeyModifiers
    ) -> Stream<'a, Key>
    where
        K: Into<Key>
;
pub fn pressed_any(self) -> Stream<'a, Key>;
pub fn released_any(self) -> Stream<'a, Key>;
pub fn character(self, c: char) -> Stream<'a, char>;
pub fn character_any(self) -> Stream<'a, char>;
pub fn is_pressed<K>(self, k: K) -> Stream<'a, bool>
    where
        K: 'a + Into<Key>
; }

Required methods

pub fn pressed<K>(self, k: K) -> Stream<'a, Key> where
    K: Into<Key>, 
[src]

Selects only the key pressed event

pub fn released<K>(self, k: K) -> Stream<'a, Key> where
    K: Into<Key>, 
[src]

Selects only the key released event

pub fn pressed_with_mods<K>(
    self,
    k: K,
    modifers: KeyModifiers
) -> Stream<'a, Key> where
    K: Into<Key>, 
[src]

Selects only the key pressed event with the passed modifiers

pub fn pressed_any(self) -> Stream<'a, Key>[src]

Selects only the key pressed event for any key

pub fn released_any(self) -> Stream<'a, Key>[src]

Selects only the key released event for any key

pub fn character(self, c: char) -> Stream<'a, char>[src]

Selects only the character event

pub fn character_any(self) -> Stream<'a, char>[src]

Selects only the character event for any character

pub fn is_pressed<K>(self, k: K) -> Stream<'a, bool> where
    K: 'a + Into<Key>, 
[src]

Returns a stream that will send true if the specified key is pressed and false when it’s released

Loading content...

Implementors

impl<'a, S> KeyEvents<'a> for S where
    S: StreamExt<'a, KeyEvent>, 
[src]

Loading content...