-
-
Notifications
You must be signed in to change notification settings - Fork 251
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
Mouse and keyboard issues #298
Comments
Gonna add this here but also not expect it to be fixed until after the SDL work: Wayland interacts a bit differently than X does on Linux, and so there may need to be some additional work to explicitly request focus of the keyboard/mouse to get that working under Wayland. While controller input works fine for me, keyboard/mouse doesn't under the existing plugin, and I'd imagine the new work will need some changes as well. Happy to help test this out and probably figure out what weird code changes are necessary to make it work. |
Input hooking is done through libuiohook, Wayland support is tracked here kwhat/libuiohook#100, but that doesn't really matter as Wayland doesn't really support global input hooking last time I checked. |
Yeah, Wayland doesn't support global input hooks, but I believe that with something like OBS you can kind of hack it in by letting both windows have focus. Either way, I was planning to take a look myself to see what I can do for it since it's not really a standard use case. |
And it won't have it by design. Some features, such as global shortcuts, can only be implemented through portals as a universal method for a sandbox-compatible and safe solution or in specific libraries, i.e. wlroots. |
Probably related to #174 is io-cct returning Another issue I encountered is that in io-cct the mouse wheel scroll directions are reversed. The description of the element lists them in the correct order (up then down). In OBS they are recognised properly. Lastly, still regarding the mouse wheel, it appears that there is currently no differentiation between vertical and horizontal scrolling. I only use the mouse wheel element in the preset and haven't set anything up for horizontal scrolling (as I'm not using it in the game). In OBS, scrolling right triggers the visuals for scrolling down and scrolling left the visuals for scrolling up, while in io-cct both are recognised as scrolling down. |
I propose the following for #180: Add a setting to swap middle mouse and right mouse button. It would go here, before any logic/dispatching: input-overlay/src/hook/uiohook_helper.hpp Line 50 in 5f394fa if (event->type == EVENT_MOUSE_CLICKED || event->type == EVENT_MOUSE_PRESSED ||
event->type == EVENT_MOUSE_RELEASED) {
if (event->data.mouse.button == 2)
event->data.mouse.button = 3;
else if (event->data.mouse.button == 3)
event->data.mouse.button = 2;
} Maybe there's a more appropriate place to switch the buttons, like the JavaScript. |
input-overlay/src/hook/uiohook_helper.hpp Lines 63 to 72 in 5f394fa
|
This issue accumulates all issues with mouse and keyboard buttons/mappings.
#247
Apparently an issue with the preset (fixed in #100)
#266
Side mouse button swapped (These mapping issues might not be really fixable as "swapped" for one person could be the correct order for others and therefore a separate layout with swapped side buttons would probably just be better)
#209
Tilde key not registering on uk qwerty. This was on v4.8 so maybe the new uiohook version already fixed this.
#216
Tilde key not working on us qwerty.
#201
ü, ö, ä not working (io-cct probably not returning the correct keycodes
#180
Right mouse button and middle mouse button swapped
#174
Arrow keys issue as well as numpad/function keys (delete, insert etc.) (Related PR for libuiohook)
#187
Tilde, left super/meta/windows key, side mouse buttons
Just like with the gamepad issues, I'll close the individual issues and use this one to track their progress
These issues leave the following keys/buttons to test:
The text was updated successfully, but these errors were encountered: