-
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
Compose key does not always work #467
Comments
Just to be clear: are you using a specific Input Method (i.e. IBus), or is it just for debugging and you rely on default settings? |
I have made my tests again with (note
It seems I made a few error during my first tests:
|
Having ibus installed does not mean it is active. Do you have the IM env variables set? This is very important to know, as ibus does not use xkbcommon. |
It seems Gtk handles Compose very differently than xkbcommon (and thus Qt and KDE apps):
So I do not think this is a bug: Compose is not a modifier key, it is not expected to be held down. |
Thank you for your feedback. No, I don't export any IM variables (I did when I tested with ibus, but I reset my environment meanwhile). On X11, the behavior of
So, you're right this key is really specific. It is neither a modifier neither a normal key. |
In fact on GTK/X11, |
Do you to have the same issue when using |
I don't have |
It is the expected behavior for Gtk. The last two “do not work” because the sequence So what we have here are implementation differences (Gtk/xkbcommon-Qt). As Compose key and But I will try to have a look at the Gtk implementation, to check if this is a feature or an unintended side effect. If this is a feature, I would like to known the motivation. |
In fact the only difference between GTK and xkbcommon is: press |
I did not dive into Gtk code, but the behavior seems simple enough to understand: when no valid sequence is found, Gtk does not reset its state machine. You can use If you want the same behavior in non-Gtk apps, you should open a ticket in e.g. Qt repository and point to this issue. @whot @bluetech I think we would still need a new API for that though: something like: // Option 1: new function with configurable behavior, using an additional argument
enum xkb_compose_feed_result
xkb_compose_state_feed2(struct xkb_compose_state *state, xkb_keysym_t keysym, bool reset)
// Option 2: new function that keep previous state in case of failure
enum xkb_compose_feed_result
xkb_compose_state_feed_no_reset(struct xkb_compose_state *state, xkb_keysym_t keysym) |
Summary
I have mapped Compose key to CapsLock physical key. Then, I have noticed the behavior of the Compose key is ignored half of the time.
Steps to reproduce
Map CapsLock to Compose using KDE System Settings > Input Devices > Keyboard > Advanced > Position of Compose Key > Caps Lock.
Open a KDE application (tested with konsole and kontact). Keep Compose pressed, then type '=', then 'c', then release Compose. Repeat several times. Euro symbol (€) should be typed, but sometime you get "=c".
Useful observations
The behavior is correct if user release Compose before typing '=' and 'c'.
If you install ibus, ibus feedback show that maintaining Compose press quickly start/abort the compose sequence. So, the issue is somewhere in the repetition code of the Compose key.
I know this behavior happens in KDE applications, GIMP and LibreOffice. However, Chrome has a different behavior (it works very well with ibus).
I have first reported this bug to libinput, however they say the issue is rather related to
libxkbcommon
.Required information
Note
RepeatDelay=140
is a rather low value.The text was updated successfully, but these errors were encountered: