Codebase list kbd / 1da156f
Never handle plain ASCII characters as Unicode This doesn’t seem to work for compose: The Unicode keysym representing an ASCII char gets inserted and the kernel waits for another keypress to be “dead”. Signed-off-by: Michael Schutte <michi@uiae.at> Signed-off-by: Alexey Gladkov <legion@altlinux.org> Michael Schutte authored 14 years ago Alexey Gladkov committed 14 years ago
1 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
18601860
18611861 if (KTYP(code) == KT_META)
18621862 return code;
1863 else if (!input_is_unicode && code < 0x80)
1864 /* basic ASCII is fine in every situation */
1865 return code;
1866 else if (input_is_unicode && (code ^ 0xf000) < 0x80)
1867 /* so is Unicode "Basic Latin" */
1868 return code ^ 0xf000;
18631869 else if ((input_is_unicode && direction == TO_UNICODE) ||
18641870 (!input_is_unicode && direction == TO_8BIT))
18651871 /* no conversion necessary */
18661872 result = code;
1867 else if (!input_is_unicode && code < 0x80)
1868 /* convert ASCII chars without looking them up */
1869 result = (direction == TO_UNICODE) ? (code ^ 0xf000) : code;
1870 else if (input_is_unicode && (code ^ 0xf000) < 0x80)
1871 /* same for Unicode "Basic Latin" */
1872 result = (direction == TO_UNICODE) ? code : (code ^ 0xf000);
18731873 else {
18741874 /* depending on direction, this will give us either an 8-bit
18751875 * K(KTYP, KVAL) or a Unicode keysym xor 0xf000 */