Skip to content

Commit

Permalink
fix(win): add extended flag to hook read scancode
Browse files Browse the repository at this point in the history
  • Loading branch information
jtroo committed Mar 29, 2024
1 parent a6aa95a commit c25d415
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/oskbd/windows/llhook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,12 @@ impl InputEvent {
}
#[cfg(feature = "win_llhook_read_scancodes")]
{
crate::oskbd::u16_to_osc(lparam.scanCode as u16).map(Into::into).unwrap_or(lparam.vkCode)
let extended = if lparam.flags & 0x1 == 0x1 {
0xE000
} else {
0
};
crate::oskbd::u16_to_osc((lparam.scanCode as u16) | extended).map(Into::into).unwrap_or(lparam.vkCode)
}
};
Self {
Expand Down

0 comments on commit c25d415

Please sign in to comment.