Skip to content

Commit

Permalink
fix(linux): libinput "disable while typing" while kanata is running (#…
Browse files Browse the repository at this point in the history
…661)

Change virtual output device's bus_type from BUS_USB to BUS_I8042.

This fixes the dwt issues for me on Hyprland and I haven't noticed any
regression caused by this change.

Tested manually in Hyprland with `disable_while_typing=1`

Closes #548
Closes #659
  • Loading branch information
rszyma authored Dec 12, 2023
1 parent 375b624 commit 5ad5116
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/oskbd/linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,9 @@ impl KbdOut {

let mut device = uinput::VirtualDeviceBuilder::new()?
.name("kanata")
.input_id(evdev::InputId::new(evdev::BusType::BUS_USB, 1, 1, 1))
// libinput's "disable while typing" feature don't work when bus_type
// is set to BUS_USB, but appears to work when it's set to BUS_I8042.
.input_id(evdev::InputId::new(evdev::BusType::BUS_I8042, 1, 1, 1))
.with_keys(&keys)?
.with_relative_axes(&relative_axes)?
.build()?;
Expand Down

0 comments on commit 5ad5116

Please sign in to comment.