pub fn trigger_keys(
    key_codes: &[u16],
    events: &[u32],
) -> Result<u32, error_code::ErrorCode<error_code::SystemCategory>> {
    assert_eq!(key_codes.len(), events.len());
    let mut inputs: Vec<_> = key_codes
        .iter()
        .zip(events.iter())
        .map(|(key_code, event)| create_input(*key_code, *event))
        .collect();

    send_input(
        key_codes.len() as u32,
        &mut inputs,
        mem::size_of::<winuser::INPUT>() as i32,
    )
}
/// Trigger thef list o key events through the Windows api
Trigger thef list o key events through the Windows api
Trigger thef list o key events through the Windows api
pub fn trigger_keys(
    key_codes: &[u16],
    events: &[u32],
) -> Result<u32, error_code::ErrorCode<error_code::SystemCategory>> {
    assert_eq!(key_codes.len(), events.len());
    let mut inputs: Vec<_> = key_codes
        .iter()
        .zip(events.iter())
        .map(|(key_code, event)| create_input(*key_code, *event))
        .collect();
    send_input(
        key_codes.len() as u32,
        &mut inputs,
        mem::size_of::<winuser::INPUT>() as i32,
    )
}
pub fn trigger_keys ( key_codes : & [ u16 ] , events : & [ u32 ] , ) -> Result < u32 , error_code :: ErrorCode < error_code :: SystemCategory > > { assert_eq ! ( key_codes len ( ) events len ( ) ) ; let mut inputs : Vec < _ > = key_codes . iter ( ) . zip ( events . iter ( ) ) . map ( | ( key_code , event ) | create_input ( * key_code , * event ) ) . collect ( ) ; send_input ( key_codes . len ( ) as u32 , & mut inputs , mem :: size_of :: < winuser :: INPUT > ( ) as i32 , ) }
Trigger thef list o key events through the Windows api
Trigger thef list o key events through the Windows api
key_codes
&[u16]
events
&[u32]