diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2022-10-25 17:11:11 +0200 |
---|---|---|
committer | sinanmohd <pcmsinan@gmail.com> | 2023-01-12 08:21:56 +0530 |
commit | 46e98c4ee988d00aa3cad67aba44a5fbf3d16b2f (patch) | |
tree | ba7e1a92668d90586e3976af7ab1b6d25462fcfb | |
parent | 803ba5cb19d4012515fd8a7fb7abb2516f8e9b40 (diff) |
To reproduce the issue:
"
If you already have the multi-key enabled on your system, then add this line
to your ~/.XCompose file:
[...]
<question> <T> <E> <S> <T> <question> :
"1234567890123456789012345678901234567890123456789012345678901234567890"
"
Reported by and an initial patch by Andy Gozas <andy@gozas.me>, thanks!
Adapted the patch, for now st (like dmenu) handles a fixed amount of composed
characters, or otherwise ignores it. This is done for simplicity sake.
-rw-r--r-- | x.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1967,7 +1967,7 @@ void kpress(XEvent *ev) { XKeyEvent *e = &ev->xkey; - KeySym ksym; + KeySym ksym = NoSymbol; char buf[64], *customkey; int len; Rune c; @@ -1977,10 +1977,13 @@ kpress(XEvent *ev) if (IS_SET(MODE_KBDLOCK)) return; - if (xw.ime.xic) + if (xw.ime.xic) { len = XmbLookupString(xw.ime.xic, e, buf, sizeof buf, &ksym, &status); - else + if (status == XBufferOverflow) + return; + } else { len = XLookupString(e, buf, sizeof buf, &ksym, NULL); + } /* 1. shortcuts */ for (bp = shortcuts; bp < shortcuts + LEN(shortcuts); bp++) { if (ksym == bp->keysym && match(bp->mod, e->state)) { |