Skip to content

Commit

Permalink
fix(win): skip mouse for key sync
Browse files Browse the repository at this point in the history
  • Loading branch information
jtroo committed Nov 24, 2024
1 parent 72d90e0 commit e8afdc4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/kanata/windows/llhook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,17 @@ impl Kanata {
let mapped_keys = MAPPED_KEYS.lock();
for mapped_osc in mapped_keys.iter().copied() {
// Check 2: each active win vk mapped in Kanata should have a value in pvk
if matches!(
mapped_osc,
OsCode::BTN_LEFT
| OsCode::BTN_RIGHT
| OsCode::BTN_MIDDLE
| OsCode::BTN_SIDE
| OsCode::BTN_EXTRA
) {
// Skip mouse. Probably not under primary control of Kanata.
continue;
}
let vk = i32::from(mapped_osc);
if vk >= 256 {
continue;
Expand Down

0 comments on commit e8afdc4

Please sign in to comment.