fn create_input(key_code: u16, event: u32) -> winuser::INPUT {
    let kb_input_u = unsafe {
        let mut kb_input_u = winuser::INPUT_u::default();
        *kb_input_u.ki_mut() = winuser::KEYBDINPUT {
            wVk: key_code,
            wScan: 0,
            dwFlags: event,
            time: 0,
            dwExtraInfo: 0,
        };
        kb_input_u
    };

    winuser::INPUT {
        type_: winuser::INPUT_KEYBOARD,
        u: kb_input_u,
    }
}
/// Create an input struct from the key code and event
Create an input struct from the key code and event
Create an input struct from the key code and event
fn create_input(key_code: u16, event: u32) -> winuser::INPUT {
    let kb_input_u = unsafe {
        let mut kb_input_u = winuser::INPUT_u::default();
        *kb_input_u.ki_mut() = winuser::KEYBDINPUT {
            wVk: key_code,
            wScan: 0,
            dwFlags: event,
            time: 0,
            dwExtraInfo: 0,
        };
        kb_input_u
    };
    winuser::INPUT {
        type_: winuser::INPUT_KEYBOARD,
        u: kb_input_u,
    }
}
fn create_input ( key_code : u16 , event : u32 ) -> winuser :: INPUT { let kb_input_u = unsafe { let mut kb_input_u = winuser :: INPUT_u :: default ( ) ; * kb_input_u . ki_mut ( ) = winuser :: KEYBDINPUT { wVk : key_code , wScan : 0 , dwFlags : event , time : 0 , dwExtraInfo : 0 , } ; kb_input_u } ; winuser :: INPUT { type_ : winuser :: INPUT_KEYBOARD , u : kb_input_u , } }
Create an input struct from the key code and event
Create an input struct from the key code and event
key_code
u16
event
u32