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]
K: Into<Key>,
Selects only the key pressed event
pub fn released<K>(self, k: K) -> Stream<'a, Key> where
K: Into<Key>,
[src]
K: Into<Key>,
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]
self,
k: K,
modifers: KeyModifiers
) -> Stream<'a, Key> where
K: Into<Key>,
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]
K: 'a + Into<Key>,
Returns a stream that will send true if the specified key is pressed and false when it’s released
Implementors
impl<'a, S> KeyEvents<'a> for S where
S: StreamExt<'a, KeyEvent>,
[src]
impl<'a, S> KeyEvents<'a> for S where
S: StreamExt<'a, KeyEvent>,
[src]pub fn pressed<K>(self, k: K) -> Stream<'a, Key> where
K: Into<Key>,
[src]
K: Into<Key>,
pub fn pressed_with_mods<K>(
self,
k: K,
modifers: KeyModifiers
) -> Stream<'a, Key> where
K: Into<Key>,
[src]
self,
k: K,
modifers: KeyModifiers
) -> Stream<'a, Key> where
K: Into<Key>,
pub fn released<K>(self, k: K) -> Stream<'a, Key> where
K: Into<Key>,
[src]
K: Into<Key>,
pub fn pressed_any(self) -> Stream<'a, Key>
[src]
pub fn released_any(self) -> Stream<'a, Key>
[src]
pub fn character(self, c: char) -> Stream<'a, char>
[src]
pub fn character_any(self) -> Stream<'a, char>
[src]
pub fn is_pressed<K>(self, k: K) -> Stream<'a, bool> where
K: 'a + Into<Key>,
[src]
K: 'a + Into<Key>,