-
Notifications
You must be signed in to change notification settings - Fork 123
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
Assignment of several Keys (Delete and Arrows) in uiohook.h #96
Comments
This is most likely not an issue with libuiohook (anymore). I tested it and the codes in uiohook.h seemed to work fine, it's most likely the outdated version of uiohook that the plugin uses. Edit: Although the right button definitely seems to be broken on linux (just compiled 1.2 and I get keycode 0x0 in the pressed event): |
I could solve the issue with your proposed solution of adding EE to all hex values of these scancodes. Thanks a lot! |
@univrsal probably not... but I would have to look. I seem to remember that working for me but I think I am using evdev. I'll take a look locally when I get a second. This weeks going to be a disaster for me so i'll try to remember to check it next week. Ping me if you don't hear back from me. |
No worries, take your time. |
I also noticed that MOUSE_BUTTON_3 is right click and MOUSE_BUTTON_2 is the mouse wheel, so might want to test that as well. Maybe it's just my setup. |
For the button mappings, I suspect XGetDeviceButtonMapping is needed here: https://github.com/kwhat/libuiohook/blob/1.2/src/x11/input_hook.c#L534 |
Hi, kwhat, I have tested libuiohook in linux deepin 20.2.4. MOUSE_BUTTON_2 is middle button and MOUSE_BUTTON_3 is right button, VC_KP_LEFT is VC_ALT_R, how to solve these problems? |
The mouse button issues are probably going to be easier to solve than the keyboard issue. There is an X11 function that returns the button mappings that should be called here, but I don't remember what the name of the function was. Maybe XGetDeviceButtonMapping as suggested above? Now that I look at it, this maybe simpler than I thought. MOUSE_BUTTON_2 is middle button and MOUSE_BUTTON_3 is right button is what it should be from X11, is that not what it matches up with on Windows / Mac? For the keyboard, things are going to be a lot more difficult and unless I can duplicate it locally, it won't get solved. |
Thanks kwhat, I have also tested libuiohook in windows10 and 11, MOUSE_BUTTON_2 is right button and MOUSE_BUTTON_3 is middle button, but it has not been tested in MacOS yet. |
Let me know what OS X is and I'll make them the same across. |
On Windows, Linux and MacOS, Qt keycode mapping is correct, you can refer to the source code: |
I've added a fix for the mouse button mappings. Still not sure if this is a problem with the keyboard map. I suspect we will probably need XGetKeyboardMapping for something similar to what xmodmap produces with -pk and -pm. |
The current key mapping stuff on X11 is really a mess and I think XGetKeyboardMapping is the way to go. It is going to change a lot of stuff with the way key codes work so I am going to put that part off until 1.3. |
Thanks for putting all that effort into this issues. I just gave the 1.3 branch a try and I do get correct keycodes for the arrow keys. |
@univrsal 1.3 is still pretty alpha, there is a massive change sitting on my local that will change a lot of stuff in that branch bringing much better language support to X11 platforms. Lets get the numpad_masks_fix in before I start working on the windows side of the 1.3 updates. |
Ok, you merged the other commit already, though. Was that intentional? They were both based on 1.3 |
Yeah I was able to rebase the other one off of 1.2 in the browser. It's
going to be a long time before 1.3 is stable.
…On Sun, Apr 17, 2022, 11:50 AM Alex ***@***.***> wrote:
Ok, you merged the other commit already, though. Was that intentional?
They were both based on 1.3
—
Reply to this email directly, view it on GitHub
<#96 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFFCRCNMUFDCBW443PFN2DVFRMOHANCNFSM4WKSHNWA>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
I still have a few more things to merge, but 1.3 should be fairly stable at this point. As far as I can tell, this issue was resolved in that branch. If someone can confirm, please let me know. |
Hi there,
At first thanks for creating an awesome library! I really appreaciate the work you put in there.
I'm using the input overlay OBS-Plugin by univrsal (https://github.com/univrsal/input-overlay) which is dependent on your library.
I detected some issues, that i cannot reference several keys, despite writing the correct scancodes defined in your uiohook.h
It happens with the keys Delete und Arrow Left Right Up or Down.
If found that it your code exactly those keys are defined twice or are either remapped:
Maybe this causes those issues. I would really appreaciate if you could check for any solution on that.
The text was updated successfully, but these errors were encountered: