-
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
Should we recommend compose state to be global, per-seat, per-device? #254
Comments
The following should work:
In XCompose, when there's an exact conflict, the latter wins. I just tested it and it works for me. If it indeed doesn't work for you, please run the following command in your terminal, try to insert the sequence (I configured right Alt to be the Compose key), and paste the output.
|
The config you posted was already one of the variants I tried, sadly it doesn't work. My keyboard doesn't have a right alt, so I used the above command, but with
When pressing the compose key, there is no output. The line with keysym I ran the program in kitty and in xterm with the same results, if this makes any difference. |
I can't reproduce this, so something must be going on here.
This looks good.
This too.
That should not happen. Which libxkbcommon version is this? Can you think of anything else unusual? |
My system uses libxkbcommon 1.3.0 (Void Linux). But I think I may have found the issue, and it probably is indeed my unusual hardware setup. I have a split keyboard, and both halfes are connected via separate USB cables, so they are seen as two separate keyboards. With normal X input, like e.g. Xterm, compose works across those halfs, but it seems with libxkbcommon-based input it doesn't. My Compose key and |
Huh that's interesting. This is beyond the scope of libxkbcommon itself -- the library user decides how the keyboard devices map to It's interesting that you say that in X the compose state is not per-device but global. I'll need to refresh my memory on how it (X input methods) really works there, and we might amend our recommendations accordingly. |
(I've edited the title to the new question) |
Most X11 clients will receive a unified stream of key events (as well as unified keymap) through a single master device, usually the |
The behaviour and output of Another thing, which might be relevant to this issue: modifier keys (Ctrl, Shift, etc.) do work across keyboards without problem. |
@crater2150 Are you using kitty under X or Wayland? If X, can you show the output of If Wayland, which compositor? And for both, can you show the output of
That's right,
Hmm I know some compositors like sway have the concept of a "keyboard group" to allow multiple devices to use the same keymap/state/repeat info etc. But I'm not sure how prevalent this is. |
@bluetech I'm using X.
The split keyboard is the Output of
|
unless you want to have to deal with seats and device groups etc. I'd argue it's the best thing to do for a debugging tool.
From the libinput side which all compositors use:
X didn't have a per device-state until XI came along and that wasn't used for keyboards until XI2. Anything handling XI2 would probably handle compose per master device but since there's only one in 99.99% of all case, it's effectively a single global state :) |
Hi,
I filed a bug against
kitty
today, because my user XCompose was ignored (see kovidgoyal/kitty#3827). According to its developer, this is an issue with libxkbcommon and should be filed here.Since reporting the bug there, I ran an
strace
to see if the file is read and just now noticed, that it actually reads~/.config/XCompose
instead of~/.XCompose
(the latter being a symlink to the former on my system), which means that it didn't use my minimal version in the previous test, so I tried again replacing the correct file. The results are mostly the same, except thatthe system locale's compose was also not loaded until adding
include "%L"
.The sample configuration that I used is a
~/.config/XCompose
with just a single line:When typing
Compose
,*
in kitty, a * will be inserted immediately, pressinga
afterwards will also just insert it instead of producingα
. When addinginclude "%L"
before or after that line, system compose sequences will work as expected, but inserting α still won't.The same XCompose file works in other applications (e.g. Qt-based apps, GTK-based apps if exporting
GTK_IM_MODULE=xim
).Please let me know, if there is other debug information I can provide.
The text was updated successfully, but these errors were encountered: