Unified · Split
| @@ -299,16 +299,27 @@ kbdputc(Queue *q, int c) · 298 unmodified lines | ||
| 299 | 299 | static int collecting, nk; |
| 300 | 300 | static Rune kc[5]; |
| 301 | 301 | |
| 302 | − if(c == Kalt){ | |
| 303 | − collecting = 1; | |
| 304 | − nk = 0; | |
| 305 | − return 0; | |
| 306 | − } | |
| 307 | − | |
| 308 | − if(!collecting){ | |
| 309 | − _kbdputc(c); | |
| 310 | − return 0; | |
| 311 | − } | |
| 302 | + switch(c){ | |
| 303 | + case 0: | |
| 304 | + case Kcaps: | |
| 305 | + case Knum: | |
| 306 | + case Kshift: | |
| 307 | + case Kaltgr: | |
| 308 | + case Kmod4: | |
| 309 | + case Kctl: | |
| 310 | + /* ignore modifiers */ | |
| 311 | + return 0; | |
| 312 | + | |
| 313 | + case Kalt: | |
| 314 | + collecting = 1; | |
| 315 | + nk = 0; | |
| 316 | + return 0; | |
| 317 | + } | |
| 318 | + | |
| 319 | + if(!collecting){ | |
| 320 | + _kbdputc(c); | |
| 321 | + return 0; | |
| 322 | + } | |
| 312 | 323 | |
| 313 | 324 | kc[nk++] = c; |
| 314 | 325 | c = latin1(kc, nk); |