Within the Comprehensive keyboard handling protocol, what is the functional difference between the 'Report alternate keys' and the 'Report associated text' progressive enhancements? #4267
Replies: 2 comments 4 replies
-
report alternate keys reports the value of the key in the "standard
keyboard layout". For example, on a russian keyboard it would report the
cyrillic key C as the C and the ascii C. This allows applications to
define a shortcut like ctrl+c that works in any keyboard layout.
report associated text reports all the text a key press generates as
a sequence of unicode numbers as part of the escape code. This is needed because
without it there would be no way to have release events for key presses
that generate text. Often the unicode number will be the same as the key
number or the shifted key number. But sometimes it wont. In particular
with IME it can be a whole word or phrase. In your lambda
case the text being reported is ĩ why your xcompose rule is generating
that text I haven't a clue, use --debug-input to get more info.
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
tealsnow
-
Text is only ever reported with a press event. So not sure what you mean by you dont care about the event types. A double colon means an empty sub-field. Search the spec page for empty. And the unicode text is the last number not the first. The first is the key code. https://sw.kovidgoyal.net/kitty/keyboard-protocol/#text-as-code-points |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So I'm in the process of creating an application that will take advantage of the 'comprehensive keyboard handling in terminals' protocol extension, and I'm struggling to see the difference between the two progressive enhancements.
For example, with the following progressive enhancements enabled:
a provides:
97;129;97
shift+a provides:
97:65;130;65
And strangly pressing λ (typed using xcompose) provides:
955::92;129
The first two make sense, although they repeat themselves.
The
λ
one makes sense to a degree. It does 'report an alternate key' being '\', a perfectly acceptable alternate character.But it fails to 'report associated text', which is not really an issue as the actual first 'number' is the correct Unicode.
And there are two colons, not sure what's happening there.
So what I'm asking is what the difference is between the 'report alternate keys' and the 'report associated text' progressive enhancements are. And what is happing with the lambda?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions