pub async fn press_multiple_key3(&self, keys: Vec<input::Key>) -> Result<bool, Error> {
        let mut was_handled = false;
        let mut iter = keys.into_iter().peekable();
        while let Some(key) = iter.next() {
            let event = ui_input3::KeyEvent {
                timestamp: None,
                type_: Some(ui_input3::KeyEventType::Pressed),
                key: Some(key),
                modifiers: None,
                ..ui_input3::KeyEvent::EMPTY
            };
            let key_handled = self.manager.handle_key3_event(event).check()?.await?;

            if key_handled && iter.peek().is_some() {
                panic!("Shortcuts activated, but unused keys remained in the sequence!");
            }
            was_handled = was_handled || key_handled;
        }
        Ok(was_handled)
    }
/// Emulates multiple key press events sequentially using input3 interface.
/// Returns `Ok(true)` if any of the keys were handled.
Emulates multiple key press events sequentially using input3 interface.
Returns `Ok(true)` if any of the keys were handled.
Emulates multiple key press events sequentially using input3 interface . Returns ` Ok ( true ) ` if any of the keys were handled .
pub async fn press_multiple_key3(&self, keys: Vec<input::Key>) -> Result<bool, Error> {
        let mut was_handled = false;
        let mut iter = keys.into_iter().peekable();
        while let Some(key) = iter.next() {
            let event = ui_input3::KeyEvent {
                timestamp: None,
                type_: Some(ui_input3::KeyEventType::Pressed),
                key: Some(key),
                modifiers: None,
                ..ui_input3::KeyEvent::EMPTY
            };
            let key_handled = self.manager.handle_key3_event(event).check()?.await?;
            if key_handled && iter.peek().is_some() {
                panic!("Shortcuts activated, but unused keys remained in the sequence!");
            }
            was_handled = was_handled || key_handled;
        }
        Ok(was_handled)
    }
pub async fn press_multiple_key3 ( & self , keys : Vec < input :: Key > ) -> Result < bool , Error > { let mut was_handled = false ; let mut iter = keys . into_iter ( ) . peekable ( ) ; while let Some ( key ) = iter . next ( ) { let event = ui_input3 :: KeyEvent { timestamp : None , type_ : Some ( ui_input3 :: KeyEventType :: Pressed ) , key : Some ( key ) , modifiers : None , .. ui_input3 :: KeyEvent :: EMPTY } ; let key_handled = self . manager . handle_key3_event ( event ) . check ( ) ? . await ? ; if key_handled && iter . peek ( ) . is_some ( ) { panic ! ( " " ) ; } was_handled = was_handled || key_handled ; } Ok ( was_handled ) }
Emulates multiple key press events sequentially using input3 interface.
Emulates multiple key press events sequentially using input3 interface .
&self
keys
Vec<input::Key>
&self
keys
Vec<input::Key>