diff options
author | Russ Cox <russcox@gmail.com> | 2009-09-14 17:23:37 -0400 |
---|---|---|
committer | Russ Cox <russcox@gmail.com> | 2009-09-14 17:23:37 -0400 |
commit | 50281180685522b19f39ed6b36a4983f81c5e300 (patch) | |
tree | c8a9f8f9f53133f4f4cf1711b5ce3ed06fc668b3 | |
parent | 38b62735e4e151b626c46dd284d19fb6b0b3f59b (diff) | |
download | plan9port-50281180685522b19f39ed6b36a4983f81c5e300.tar.gz plan9port-50281180685522b19f39ed6b36a4983f81c5e300.tar.bz2 plan9port-50281180685522b19f39ed6b36a4983f81c5e300.zip |
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
-rw-r--r-- | src/cmd/devdraw/x11-keysym2ucs.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/cmd/devdraw/x11-keysym2ucs.c b/src/cmd/devdraw/x11-keysym2ucs.c index 572f01d3..f6066b1d 100644 --- 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)) |