-
Notifications
You must be signed in to change notification settings - Fork 124
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
1 keysym 2 keycodes #504
Comments
Quoting Peter’s answer from the thread you pointed (emphasis mine):
It would be useful if you could describe your use case, because I cannot guess it from your snippet. |
I'm running SwayWM and trying to |
As a general advice, please do not assume too much when presenting a use case or filing an issue: not everybody use Sway or know the It seems you try to bind a keysym to some action but your tool does not support having a keysym mapped to multiple key codes, does it? Since you opened an issue here, I assume you have some code using the libxkbcommon API. Could you maybe link it here if it’s open source, and give a complete context?
I do not understand the last part, do you mean |
I did not think the compositor I am using matters since the crux of the issue is libxkbcommon api so I did not initially present that context
No need to assume, the gdb snippet that you ignored is evidence (gdb) print xkb_state_key_get_one_sym(config->keysym_translation_state, 107)
$8 = 65377
(gdb) print xkb_state_key_get_one_sym(config->keysym_translation_state, 218)
$9 = 65377
(gdb) bt
#0 cmd_bindsym (argc=6, argv=0x5555561324e8) at ../sway/commands/bind.c:577
#1 0x000055555556dc9f in config_command (exec=0x55555618b3a0 "bindsym --to-code Print exec ~/bin/script-testing.sh notify-brightness up", new_block=0x7fffffffdfc8)
at ../sway/commands.c:426
#2 0x0000555555570e2d in read_config (file=0x55555614a4c0, config=0x55555614f8c0, swaynag=0x55555614f8c8) at ../sway/config.c:824
#3 0x000055555556fa9b in load_config (path=0x5555560a20c0 "/home/furkan/.config/sway/config", config=0x55555614f8c0, swaynag=0x55555614f8c8) at ../sway/config.c:437
#4 0x000055555556fe75 in load_main_config (file=0x0, is_active=false, validating=false) at ../sway/config.c:509
#5 0x000055555557d283 in main (argc=1, argv=0x7fffffffe2d8) at ../sway/main.c:351 In the GDB snippet, the xkb_state_key_get_one_sym function is called twice with different key codes, both returning the same symbol value (65377) for both
Please let me know if I need to further clarify. |
Nor ignored: I expected actual code, not an isolated use of a function of our API. You did ignore my question though. Since you do not provide further context nor code, I will just point to my previous comment and close the issue. |
Feel free to re-opened after analyzing the code mentioned ( |
By virtual I mean "Internet" or "Extended" keys as described in
I used
keysym for a = 97 And
Given the output of wev, I would expect to see 65377 being mapped back to keysym So this is not an issue right? |
You need to provide the hexadecimal keysym value or keysym name via
EDIT:
2 results pointing respectively to key codes |
Precisely why I excluded that irrelevant information from this post, it would not help you answer whether
It does not on version 1.7.0
Thanks! |
Please leave the decision to decide what is relevant to the maintainers, will you? And mind your tone. I still do not know exactly what This issue is a puzzle |
Mind your own tone and goodbye! |
@sahinf So swaywm/sway#8339 is where you actually use libxkbcommon and have the issue. It would have been so much easier if you would have linked that PR in the first place, instead of declaring multiple times such context irrelevant. |
Hi,
How should a duplicate keycode->keysym mapping be handled?
This thread says that it's not 100% reliable to convert keysyms to keycodes.
In my case, I am using the SwayWM with the following evdev layout
But both keycodes 107 (
PRSC
) and 218 (<I218>
) get mapped to the keysymbol for XKB_KEY_Print 0xff61=65377There are workarounds like deleting the automatically generated internet keys from evdev file or using bindcode api directly vs making bindsym do the conversion but I'd like to know what's wrong here to problems like this in the future.
The text was updated successfully, but these errors were encountered: