Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Nov 25, 2022

Conversation

ajanon
Copy link
Collaborator

@ajanon ajanon commented Oct 6, 2022

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 ajanon requested review from Shinyzenith and EdenQwQ October 6, 2022 08:18
@ajanon
Copy link
Collaborator Author

ajanon commented Oct 6, 2022

@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
Copy link
Member

This pr works perfectly for me!

Shinyzenith
Shinyzenith previously approved these changes Oct 6, 2022
@Shinyzenith
Copy link
Member

Closes #131

@ajanon
Copy link
Collaborator Author

ajanon commented Oct 6, 2022

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

@Shinyzenith
Copy link
Member

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.

@ajanon ajanon changed the base branch from mouse-fix to main October 6, 2022 09:42
@ajanon ajanon dismissed Shinyzenith’s stale review October 6, 2022 09:42

The base branch was changed.

@Shinyzenith
Copy link
Member

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

@Shinyzenith Shinyzenith added the Enhancement New feature or request label Oct 8, 2022
@Shinyzenith Shinyzenith linked an issue Oct 8, 2022 that may be closed by this pull request
@ajanon ajanon force-pushed the mouse-fix-re-emit branch from c6aa109 to b1b206c Compare October 10, 2022 07:36
@ajanon
Copy link
Collaborator Author

ajanon commented Oct 10, 2022

@Shinyzenith Here you go!

@Shinyzenith
Copy link
Member

Thank you!

@Shinyzenith
Copy link
Member

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

Shinyzenith and others added 3 commits November 25, 2022 09:13
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 ajanon removed the request for review from EdenQwQ November 25, 2022 08:14
@ajanon
Copy link
Collaborator Author

ajanon commented Nov 25, 2022

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 ajanon requested a review from Shinyzenith November 25, 2022 08:18
@ajanon
Copy link
Collaborator Author

ajanon commented Nov 25, 2022

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

@Shinyzenith
Copy link
Member

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

@ajanon
Copy link
Collaborator Author

ajanon commented Nov 25, 2022

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

@Shinyzenith
Copy link
Member

How about now?

@ajanon ajanon merged commit 59fb596 into main Nov 25, 2022
@ajanon
Copy link
Collaborator Author

ajanon commented Nov 25, 2022

Perfect! :)

@Shinyzenith Shinyzenith deleted the mouse-fix-re-emit branch November 25, 2022 17:01
@Shinyzenith
Copy link
Member

Reminder to self: push to mirror

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

Mouse cursor doesn't work
2 participants