waycrate / swhkd

Sxhkd clone for Wayland (works on TTY and X11 too)
https://git.sr.ht/~shinyzenith/swhkd
BSD 2-Clause "Simplified" License
676 stars 47 forks source link

Re-emit ignored events from grabbed devices to uinput devices #163

Closed ajanon closed 1 year ago

ajanon commented 1 year ago

Ignored events (i.e. events other than key presses for now) are re-emitted to the uinput devices. This allows grabbing mouses and other pointer devices while still allowing the cursors to work.

In some cases, events are not re-emitted at all when the uinput device handles keys, relative axes and switches. By sending switch events to a separate uinput device just for switches and another one for keys and relative axes, we can re-emit keys, pointer events, and switches events properly.

ajanon commented 1 year ago

@EdenQwQ #147 did not work for you at the time. This PR builds on @Shinyzenith's work and should allow mouse movement to work (at least it does on my end). Would you mind taking a look to tell me if it works for you now?

Shinyzenith commented 1 year ago

This pr works perfectly for me!

Shinyzenith commented 1 year ago

Closes https://github.com/waycrate/swhkd/issues/131

ajanon commented 1 year ago

Great! Do you want other team members to test this further?

Shinyzenith commented 1 year ago

Great! Do you want other team members to test this further?

Would be nice if eden took a look too. I think eden is a little busy with university so if they don't respond, we shall go ahead with the merge.

Shinyzenith commented 1 year ago

Hi @ajanon, really sorry to bother you but would you mind rebasing this onto main branch?

ajanon commented 1 year ago

@Shinyzenith Here you go!

Shinyzenith commented 1 year ago

Thank you!

Shinyzenith commented 1 year ago

@ajanon Please go ahead and merge this if convenient ❤️

ajanon commented 1 year ago

I just rebased this onto main, and I will merge it once CI finishes.

I also removed Eden from the reviewers as they seem busy.

ajanon commented 1 year ago

@Shinyzenith If you could just approve this again so that I can merge it, it would be great!

Shinyzenith commented 1 year ago

Pr seems great! Go for the merge. Thank you for the patch ❤️

ajanon commented 1 year ago

I cannot merge on my side, the button is greyed out :disappointed:

Shinyzenith commented 1 year ago

How about now?

ajanon commented 1 year ago

Perfect! :)

Shinyzenith commented 1 year ago

Reminder to self: push to mirror