Compare commits
No commits in common. "fb3c7bc1754300fe7f3f342824d7a1861a1a41bf" and "96985e0a2ce64ffd0107ce2ae62152a1a9443d9e" have entirely different histories.
fb3c7bc175
...
96985e0a2c
12
src/lib.rs
12
src/lib.rs
|
@ -16,8 +16,8 @@ pub enum NativeEventType {
|
|||
pub struct NativeEvent {
|
||||
pub time: usize,
|
||||
pub event_type: NativeEventType,
|
||||
pub vkey: u16,
|
||||
pub keycode: u16,
|
||||
pub label: u16,
|
||||
pub key: u16,
|
||||
}
|
||||
|
||||
static mut CALLBACK: Option<extern "C" fn(NativeEvent)> = None;
|
||||
|
@ -45,14 +45,14 @@ pub extern "C" fn start_hook(callback: extern "C" fn(NativeEvent)) -> *const c_c
|
|||
skyhook::types::EventData::KeyPress(label, key) => NativeEvent {
|
||||
time: get_time(event.time),
|
||||
event_type: NativeEventType::KeyPressed,
|
||||
vkey: label as u16,
|
||||
keycode: key,
|
||||
label: label as u16,
|
||||
key,
|
||||
},
|
||||
skyhook::types::EventData::KeyRelease(label, key) => NativeEvent {
|
||||
time: get_time(event.time),
|
||||
event_type: NativeEventType::KeyReleased,
|
||||
vkey: label as u16,
|
||||
keycode: key,
|
||||
label: label as u16,
|
||||
key,
|
||||
},
|
||||
};
|
||||
send_callback(event);
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 3838edd7415f1adf81a79c215541f64be649c191
|
||||
Subproject commit 4e7ad264aac51c8ddee24c1f808fd88a4dc09dc0
|
Reference in New Issue