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

Add raw mouse button input functionality #19

Closed
eschewary opened this issue Aug 18, 2022 · 3 comments · Fixed by #23
Closed

Add raw mouse button input functionality #19

eschewary opened this issue Aug 18, 2022 · 3 comments · Fixed by #23
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@eschewary
Copy link

I need the raw mouse button input to also be readable in the same manner as keyboard key presses in this project. The following resources may be useful:

https://stackoverflow.com/questions/53845288/c-sharp-hooking-to-get-raw-mouse-key-events

https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-rawmouse

@Elektroney
Copy link

added feature in #20

@elringus elringus linked a pull request Aug 25, 2022 that will close this issue
@elringus elringus added enhancement New feature or request help wanted Extra attention is needed labels Aug 25, 2022
@elringus
Copy link
Owner

WIP for this is in https://github.com/Elringus/UnityRawInput/tree/feat/mouse

It's almost working, but there is an issue with unresponsive mouse cursor when Unity editor window is not in focus: #21 (comment)

If anyone have an idea on how to fix this, feel free to open a PR.

@silberkoenig
Copy link
Contributor

silberkoenig commented Aug 25, 2022

I guess the mouse got slow after the Unity update. But it's just a little configuration.
In Build Settings->Player Settings under Player->Resolution and Presentation is a checkbox Run In Background. When activated it works fine. Deactivated the unity process will drop the CPU and GPU usage nearly to zero in background.

If only clicks would be the mouse events, I think then it would be fine. But maybe the mouse movement kills it running on extremly low CPU usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants