pub fn process_key(
        &mut self,
        state: ElementState,
        key: Option<VirtualKeyCode>,
        mods: &ModifiersState,
    ) {
        match (key, state) {
            (Some(key), ElementState::Pressed) => {
                *self.ctx.last_modifiers() = *mods;
                *self.ctx.received_count() = 0;
                *self.ctx.suppress_chars() = false;

                if self.process_key_bindings(mods, key) {
                    *self.ctx.suppress_chars() = true;
                }
            },
            (_, ElementState::Released) => *self.ctx.suppress_chars() = false,
            _ => ()
        }
    }
/// Process key input
///
/// If a keybinding was run, returns true. Otherwise returns false.
Process key input
If a keybinding was run, returns true. Otherwise returns false.
Process key input If a keybinding was run returns true . Otherwise returns false .
pub fn process_key(
        &mut self,
        state: ElementState,
        key: Option<VirtualKeyCode>,
        mods: &ModifiersState,
    ) {
        match (key, state) {
            (Some(key), ElementState::Pressed) => {
                *self.ctx.last_modifiers() = *mods;
                *self.ctx.received_count() = 0;
                *self.ctx.suppress_chars() = false;
                if self.process_key_bindings(mods, key) {
                    *self.ctx.suppress_chars() = true;
                }
            },
            (_, ElementState::Released) => *self.ctx.suppress_chars() = false,
            _ => ()
        }
    }
pub fn process_key ( & mut self , state : ElementState , key : Option < VirtualKeyCode > , mods : & ModifiersState , ) { match ( key , state ) { ( Some ( key ) , ElementState :: Pressed ) => { * self . ctx . last_modifiers ( ) = * mods ; * self . ctx . received_count ( ) = 0 ; * self . ctx . suppress_chars ( ) = false ; if self . process_key_bindings ( mods , key ) { * self . ctx . suppress_chars ( ) = true ; } } , ( _ , ElementState :: Released ) => * self . ctx . suppress_chars ( ) = false , _ => ( ) } }
Process key input
If a keybinding was run, returns true.
Process key input If a keybinding was run returns true .
&mut self
state
ElementState
key
Option<VirtualKeyCode>
mods
&ModifiersState
&mut self
state
ElementState
key
Option<VirtualKeyCode>
mods
&ModifiersState