tdevdraw: fix X11 input sequences - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 50281180685522b19f39ed6b36a4983f81c5e300
 (DIR) parent 38b62735e4e151b626c46dd284d19fb6b0b3f59b
 (HTM) 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:
         M src/cmd/devdraw/x11-keysym2ucs.c    |      17 +++++++++++++++++
       
       1 file changed, 17 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/src/cmd/devdraw/x11-keysym2ucs.c b/src/cmd/devdraw/x11-keysym2ucs.c
       t@@ -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))