Trait rin_window::events::KeyEvents [−][src]
pub trait KeyEvents<'a> { fn pressed<K: Into<Key>>(self, k: K) -> Stream<'a, Key>; fn released<K: Into<Key>>(self, k: K) -> Stream<'a, Key>; fn pressed_with_mods<K: Into<Key>>(
self,
k: K,
modifers: KeyModifiers
) -> Stream<'a, Key>; fn pressed_any(self) -> Stream<'a, Key>; fn released_any(self) -> Stream<'a, Key>; fn character(self, c: char) -> Stream<'a, char>; fn character_any(self) -> Stream<'a, char>; fn is_pressed<K: Into<Key> + 'a>(self, k: K) -> Stream<'a, bool>; }
Required methods
fn pressed<K: Into<Key>>(self, k: K) -> Stream<'a, Key>
[src]
Selects only the key pressed event
fn released<K: Into<Key>>(self, k: K) -> Stream<'a, Key>
[src]
Selects only the key released event
fn pressed_with_mods<K: Into<Key>>(
self,
k: K,
modifers: KeyModifiers
) -> Stream<'a, Key>
[src]
self,
k: K,
modifers: KeyModifiers
) -> Stream<'a, Key>
Selects only the key pressed event with the passed modifiers
fn pressed_any(self) -> Stream<'a, Key>
[src]
Selects only the key pressed event for any key
fn released_any(self) -> Stream<'a, Key>
[src]
Selects only the key released event for any key
fn character(self, c: char) -> Stream<'a, char>
[src]
Selects only the character event
fn character_any(self) -> Stream<'a, char>
[src]
Selects only the character event for any character
fn is_pressed<K: Into<Key> + 'a>(self, k: K) -> Stream<'a, bool>
[src]
Returns a stream that will send true if the specified key is pressed and false when it’s released
Implementors
impl<'a, S: StreamExt<'a, KeyEvent>> KeyEvents<'a> for S
[src]
impl<'a, S: StreamExt<'a, KeyEvent>> KeyEvents<'a> for S
[src]fn pressed<K: Into<Key>>(self, k: K) -> Stream<'a, Key>
[src]
fn pressed_with_mods<K: Into<Key>>(
self,
k: K,
modifers: KeyModifiers
) -> Stream<'a, Key>
[src]
self,
k: K,
modifers: KeyModifiers
) -> Stream<'a, Key>