-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
[wayland][input] Add xkb compose and dead-keys support #23943
Conversation
59cc80a
to
6c1e788
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't say much on the GUI stuff. The wayland stuff seems fine, except for that this feature should be optional as the compose map is not available on webOS. For the same reason, I couldn't test it unfortunately. I'll look if there's something about the webOS side to fix this because dead keys appararently work on the webbrowser
59f8bdc
to
1d601f4
Compare
1d601f4
to
5d98c62
Compare
5d98c62
to
b581bde
Compare
…king behavior to be set
b581bde
to
7aea7ea
Compare
Description
This pull request adds support for compose keys (those created from pressing key combinations using dead keys) to xkbcommon - wayland implementation (read more about this here).
This has bugged me for a while, using an attached keyboard you can't input the deadkey unicode symbol (usually used in passwords like
~
,´
,^
, etc) nor the key composed combinations (e.g.~
+a
=ã
).Along with support for the key composer in xkbcommon, this PR also modifies the GUIEditControl to allow for user feedback while composing keys - similar to what happens when you use regular applications like the terminal or a text input in the browser:
|
)|
).See more about this in the video screencast below.
All this is guaranteed by a new set of events (
XBMC_KEYCOMPOSING_COMPOSING
,XBMC_KEYCOMPOSING_FINISHED
,XBMC_KEYCOMPOSING_CANCELLED
) that then map to actions that end up consumed by the GUI layer.Unfortunately this ended up being a bit involved and is also platform dependent. Regardless, it sets the blueprint for other platforms to implement something similar. I may have a crack at other platforms (namely other linux implementations and android) later if this one goes in.
Most of the complexity comes from the fact that to mimic the composed-key sequence cancellation behaviour we all are used to (replaying the sequence plus the key/unicode that lead to the cancellation) requires that state is stored outside of the composer. I am using the control cursor to track the "state": when the composing cancellation event occurs, the control flushes the cursor buffer (the key sequence until then) to the actual control input (to which is later appended the cancellation key).
Motivation and context
Fix #23828
How has this been tested?
Runtime tested on Linux, wayland qwerty keyboard with a portuguese layout.
What is the effect on users?
Dead key / Composed keys should now be supported when using keyboards just like other applications
Screenshots (if appropriate):
https://www.youtube.com/watch?v=1y147A87hAc
Types of change
Checklist: