diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-11-29 19:13:23 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-12-08 17:03:52 +0000 |
| commit | 85b10675146566f6912ef16690c6318faf3678b2 (patch) | |
| tree | f60c90715bab5db8f78226a65ca59a32ad08d17d /scripts/benchmark.py | |
| parent | input: reset compose state on key *releases*, not presses (diff) | |
input: kitty: merge handling of plain-text and composed characters
All plain-text and composed characters are now printed as-is, in a
single place.
Also fix handling of “generic” keys when emitted as escapes; don’t use
the raw XKB symbol as key in the escape, convert it to a unicode code
point first. For many symbols, these are the same. But not
all.
For now, we fallback to using the symbol as is if XKB fails to convert
it to a codepoint. Not sure if we should simply drop the key press
instead.
Composed characters also need special treatment; we can’t use the
symbol as is, since it typically refers to the last key
pressed (i.e. not the composed character). And, that key is
also (usually) a special “dead” key, which cannot be converted to a
unicode codepoint.
So, what we do is convert the generated utf8 string, and (try to)
convert it to a wchar. If it succeeds, use that. If not, fallback to
using the XKB symbol (as above).
Diffstat (limited to 'scripts/benchmark.py')
0 files changed, 0 insertions, 0 deletions
