Struct KeyEvent
pub struct KeyEvent(pub KeyCode, pub Modifiers);
Input key pressed and modifiers
Fields
0: KeyCode1: Modifiers
Implementations
impl KeyEvent
fn new(c: char, mods: Modifiers) -> SelfConstructor from
charand modifiersfn ctrl(c: char) -> SelfConstructor from
charwith Ctrl modifierfn alt(c: char) -> SelfConstructor from
charwith Alt modifierfn normalize(e: Self) -> Selfctrl-a => ctrl-A (uppercase) shift-A => A (no SHIFT modifier) shift-Tab =>
BackTab
Trait Implementations
impl Clone for KeyEvent
fn clone(&self) -> Self
impl Copy for KeyEvent
impl Debug for KeyEvent
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for KeyEvent
impl From<char> for KeyEvent
fn from(c: char) -> Self
impl Hash for KeyEvent
fn hash<__H: Hasher>(&self, state: &mut __H)
impl PartialEq for KeyEvent
fn eq(&self, other: &Self) -> bool