plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit 50281180685522b19f39ed6b36a4983f81c5e300
parent 38b62735e4e151b626c46dd284d19fb6b0b3f59b
Author: Russ Cox <russcox@gmail.com>
Date:   Mon, 14 Sep 2009 17:23:37 -0400

devdraw: fix X11 input sequences

fixes http://groups.google.com/group/plan9port-dev/t/f865adc9a520653a
see also http://archive.netbsd.se/?ml=plan9-9fans&a=2007-03&t=3328886

http://codereview.appspot.com/117072

Diffstat:
Msrc/cmd/devdraw/x11-keysym2ucs.c | 17+++++++++++++++++
1 file changed, 17 insertions(+), 0 deletions(-)

diff --git a/src/cmd/devdraw/x11-keysym2ucs.c b/src/cmd/devdraw/x11-keysym2ucs.c @@ -830,6 +830,23 @@ long _p9keysym2ucs(KeySym keysym) int max = sizeof(keysymtab) / sizeof(struct codepair) - 1; int mid; + switch(keysym){ + case 0xfe53: /*dead tilde*/ + keysym = 0x007e; /*asciitilde*/ + break; + case 0xfe52: /*dead_circumflex*/ + keysym = 0x005e; /*asciicircum*/ + break; + case 0xfe51: /*dead_acute*/ + keysym = 0x0027; /*apostrophe*/ + break; + case 0xfe50: /*dead_grave*/ + keysym = 0x0060; /*grave*/ + break; + default: + break; + } + /* first check for Latin-1 characters (1:1 mapping) */ if ((keysym >= 0x0020 && keysym <= 0x007e) || (keysym >= 0x00a0 && keysym <= 0x00ff))