Skip to content

Conversation

LeonKraim
Copy link

Thanks for your kind and fast response im having a bit of trouble with github so i had to create a new pullrequest!
If you were to accept this pullrequest would you be so kind and close the issue #19.
He posted this issue on a bounty hunting site so i can get rewarded! ^^

@elringus
Copy link
Owner

Ok, so I've tried testing like this:

RawMouseButtons.Start(WorkInBackground);
RawMouseButtons.OnMouseUp += LogKeyUp;
RawMouseButtons.OnMouseDown += LogKeyDown;

But it doesn't seem to work. Eg, when I click LMB it logs key up twice.

Also, please format and clean the code and try to follow the style used in the other files.

@elringus elringus added the enhancement New feature or request label Aug 24, 2022
LeonKraim and others added 5 commits August 25, 2022 00:09
@elringus
Copy link
Owner

Thank you for the cleanup! I've also refactored it a bit. While it's working for mouse buttons now, I've noticed that when Work In Background is enabled and Unity editor window is out of focus, mouse is unusable (cursor moves very slow and becomes unresponsive). I've tried running the hooks in a background thread (Async option), but wasn't able to make it work. Do you have any ideas?

@elringus elringus linked an issue Aug 25, 2022 that may be closed by this pull request
@LeonKraim
Copy link
Author

LeonKraim commented Aug 25, 2022

It probably has todo with the thread id, of th hook or the hook id. we maybe instead of hooking all processes only should hook the visible ones maybe there is some interference or something il will test it once im back home

@elringus
Copy link
Owner

Sorry, but judging by the above 3 commits it doesn't look like you understand what you're doing. Both keyboard and mouse detection was working correctly, but you just broke it with changes that doesn't make any sense. I'll have to close this PR, as I can't spend more time on this. Working version before the 3 changes is in https://github.com/Elringus/UnityRawInput/tree/feat/mouse (in case anyone would like to suggest a fix for the slow cursor)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add raw mouse button input functionality

2 participants