Closed mbachry closed 3 years ago
I built the issue and was not aware of this pull request at the time. Incompatible with libinput-1.16.0 · Issue #99 · mooz/xkeysnail
This pull request is great.
However it have problem.
It is
but only if wayland compositor is present.
Because X11 use libinput in xf86-input-libinput So I think to fix too for X11 env.
I think solution.
I am running Debian Testing with libinput 1.16.1-1 but not running Wayland. I removed the Wayland checking, and this patch fixes the problem of udev thinking xkeysnail is a joystick. I reduced the patch to just the documentation change and these two lines:
_keyboard_codes = ecodes.keys.keys() - ecodes.BTN _uinput = UInput(events={ecodes.EV_KEY: _keyboard_codes})
However, there might be related issues. My external keyboard has an integrated mouse and left/right/middle click buttons. With this patch, my keyboard works as expected, but the buttons and mouse pointer movement fail. I can re-enable mouse buttons by adding back in the codes for them. Udev doesn't seem to mind mouse buttons.
I've done that refinement in PR 101.
@mbachry I take it this PR should be closed now that #101 is merged?
Totally! Thanks a lot for #101
I use Fedora 32 with
sway
wayland wm. After recentlibinput
update (from1.15.4
to1.15.902
) my keyboard stopped working, unless I disabledxkeysnail
.libinput
is used by sway and all most popular wayland compositors. It always had logic to ignore joysticks, but due to a bug the joystick check didn't work correctly. It was fixed recently. Unfortunately,xkeysnail
uinput device is detected as joystick by udev and as a resultxkeysnail
events are ignored by latestlibinput
:(note
ID_INPUT_JOYSTICK
).Udev's joystick detection seems to rely on checking which events are requested during uinput device setup. I noticed almost all
BTN_
events trigger joystick tag, so as a fix I disabled them all inxkeysnail
- but only if wayland compositor is present.