[Vm-dev] [commit][2904] Integrate Philippe Back's fix for numberic keypads on X11;

commits at squeakvm.org commits at squeakvm.org
Thu Apr 24 21:29:09 UTC 2014


Revision: 2904
Author:   eliot
Date:     2014-04-24 14:29:08 -0700 (Thu, 24 Apr 2014)
Log Message:
-----------
Integrate Philippe Back's fix for numberic keypads on X11;
see https://pharo.fogbugz.com/f/cases/11352/.
Add relevant lines for the Raspberry Pi to the squeak startup script.

Modified Paths:
--------------
    branches/Cog/platforms/unix/config/bin.squeak.sh.in
    branches/Cog/platforms/unix/config/squeak.sh.in
    branches/Cog/platforms/unix/vm-display-X11/sqUnixX11.c

Property Changed:
----------------
    branches/Cog/platforms/Cross/vm/sqSCCSVersion.h


Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
   - Mon Apr 14 15:29:58 PDT 2014
   + Thu Apr 24 14:27:32 PDT 2014

Modified: branches/Cog/platforms/unix/config/bin.squeak.sh.in
===================================================================
--- branches/Cog/platforms/unix/config/bin.squeak.sh.in	2014-04-22 21:58:09 UTC (rev 2903)
+++ branches/Cog/platforms/unix/config/bin.squeak.sh.in	2014-04-24 21:29:08 UTC (rev 2904)
@@ -30,6 +30,8 @@
 	SVMLLP="/lib/tls/i686/cmov:/lib:/usr/lib/tls/i686/cmov:/usr/lib";;
 /lib/tls/i686/nosegneg/libc*)	\
 	SVMLLP="/lib/i686/nosegneg/tls:/lib:/usr/lib/i686/nosegneg/tls:/usr/lib";;
+/lib/arm-linux-gnueabihf/libc*)	\
+	SVMLLP="/lib/arm-linux-gnueabihf:/lib:/usr/lib/arm-linux-gnueabihf:/usr/lib";;
 "")	case `/bin/uname -m || /usr/bin/uname -m` in
 	*64*)	echo "/usr/bin/ldd didn't produce any output and the system is 64 bit.  You may need to (re)install the 32-bit libraries." 1>&2;;
 	*)	echo "/usr/bin/ldd didn't produce any output. Can't infer base LD_LIBRARY_PATH. Aborting." 1>&2

Modified: branches/Cog/platforms/unix/config/squeak.sh.in
===================================================================
--- branches/Cog/platforms/unix/config/squeak.sh.in	2014-04-22 21:58:09 UTC (rev 2903)
+++ branches/Cog/platforms/unix/config/squeak.sh.in	2014-04-24 21:29:08 UTC (rev 2904)
@@ -30,6 +30,8 @@
 	SVMLLP="/lib/tls/i686/cmov:/lib:/usr/lib/tls/i686/cmov:/usr/lib";;
 /lib/tls/i686/nosegneg/libc*)	\
 	SVMLLP="/lib/i686/nosegneg/tls:/lib:/usr/lib/i686/nosegneg/tls:/usr/lib";;
+/lib/arm-linux-gnueabihf/libc*)	\
+	SVMLLP="/lib/arm-linux-gnueabihf:/lib:/usr/lib/arm-linux-gnueabihf:/usr/lib";;
 "")	case `/bin/uname -m || /usr/bin/uname -m` in
 	*64*)	echo "/usr/bin/ldd didn't produce any output and the system is 64 bit.  You may need to (re)install the 32-bit libraries." 1>&2;;
 	*)	echo "/usr/bin/ldd didn't produce any output. Can't infer base LD_LIBRARY_PATH. Aborting." 1>&2

Modified: branches/Cog/platforms/unix/vm-display-X11/sqUnixX11.c
===================================================================
--- branches/Cog/platforms/unix/vm-display-X11/sqUnixX11.c	2014-04-22 21:58:09 UTC (rev 2903)
+++ branches/Cog/platforms/unix/vm-display-X11/sqUnixX11.c	2014-04-24 21:29:08 UTC (rev 2904)
@@ -1991,6 +1991,7 @@
 
 static int xkeysym2ucs4(KeySym keysym)
 {
+    /* Latin 2 Mappings */
   static unsigned short const ucs4_01a1_01ff[] = {
             0x0104, 0x02d8, 0x0141, 0x0000, 0x013d, 0x015a, 0x0000, /* 0x01a0-0x01a7 */
     0x0000, 0x0160, 0x015e, 0x0164, 0x0179, 0x0000, 0x017d, 0x017b, /* 0x01a8-0x01af */
@@ -2006,6 +2007,7 @@
     0x0159, 0x016f, 0x0000, 0x0171, 0x0000, 0x0000, 0x0163, 0x02d9  /* 0x01f8-0x01ff */
   };
 
+    /* Latin 3 Mappings */
   static unsigned short const ucs4_02a1_02fe[] = {
             0x0126, 0x0000, 0x0000, 0x0000, 0x0000, 0x0124, 0x0000, /* 0x02a0-0x02a7 */
     0x0000, 0x0130, 0x0000, 0x011e, 0x0134, 0x0000, 0x0000, 0x0000, /* 0x02a8-0x02af */
@@ -2021,6 +2023,7 @@
     0x011d, 0x0000, 0x0000, 0x0000, 0x0000, 0x016d, 0x015d          /* 0x02f8-0x02ff */
   };
 
+    /* Latin 4 Mappings */
   static unsigned short const ucs4_03a2_03fe[] = {
                     0x0138, 0x0156, 0x0000, 0x0128, 0x013b, 0x0000, /* 0x03a0-0x03a7 */
     0x0000, 0x0000, 0x0112, 0x0122, 0x0166, 0x0000, 0x0000, 0x0000, /* 0x03a8-0x03af */
@@ -2036,6 +2039,7 @@
     0x0000, 0x0173, 0x0000, 0x0000, 0x0000, 0x0169, 0x016b          /* 0x03f8-0x03ff */
   };
 
+    /* Katakana Mappings */
   static unsigned short const ucs4_04a1_04df[] = {
             0x3002, 0x3008, 0x3009, 0x3001, 0x30fb, 0x30f2, 0x30a1, /* 0x04a0-0x04a7 */
     0x30a3, 0x30a5, 0x30a7, 0x30a9, 0x30e3, 0x30e5, 0x30e7, 0x30c3, /* 0x04a8-0x04af */
@@ -2047,6 +2051,7 @@
     0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ef, 0x30f3, 0x309b, 0x309c  /* 0x04d8-0x04df */
   };
 
+    /* Arabic mappings */
   static unsigned short const ucs4_0590_05fe[] = {
     0x06f0, 0x06f1, 0x06f2, 0x06f3, 0x06f4, 0x06f5, 0x06f6, 0x06f7, /* 0x0590-0x0597 */
     0x06f8, 0x06f9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x0598-0x059f */
@@ -2065,6 +2070,7 @@
     0x06a9, 0x06af, 0x06ba, 0x06be, 0x06cc, 0x06d2, 0x06c1          /* 0x05f8-0x05fe */
   };
 
+    /* Cyrillic mappings */
   static unsigned short ucs4_0680_06ff[] = {
     0x0492, 0x0496, 0x049a, 0x049c, 0x04a2, 0x04ae, 0x04b0, 0x04b2, /* 0x0680-0x0687 */
     0x04b6, 0x04b8, 0x04ba, 0x0000, 0x04d8, 0x04e2, 0x04e8, 0x04ee, /* 0x0688-0x068f */
@@ -2084,6 +2090,7 @@
     0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a  /* 0x06f8-0x06ff */
   };
 
+    /* Greek mappings */
   static unsigned short const ucs4_07a1_07f9[] = {
             0x0386, 0x0388, 0x0389, 0x038a, 0x03aa, 0x0000, 0x038c, /* 0x07a0-0x07a7 */
     0x038e, 0x03ab, 0x0000, 0x038f, 0x0000, 0x0000, 0x0385, 0x2015, /* 0x07a8-0x07af */
@@ -2099,6 +2106,7 @@
     0x03c8, 0x03c9                                                  /* 0x07f8-0x07ff */
   };
 
+    /* Technical mappings */
   static unsigned short const ucs4_08a4_08fe[] = {
                                     0x2320, 0x2321, 0x0000, 0x231c, /* 0x08a0-0x08a7 */
     0x231d, 0x231e, 0x231f, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x08a8-0x08af */
@@ -2114,6 +2122,7 @@
     0x0000, 0x0000, 0x0000, 0x2190, 0x2191, 0x2192, 0x2193          /* 0x08f8-0x08ff */
   };
 
+    /* Special mappings from the DEC VT100 Special Graphics Character Set */
   static unsigned short const ucs4_09df_09f8[] = {
                                                             0x2422, /* 0x09d8-0x09df */
     0x2666, 0x25a6, 0x2409, 0x240c, 0x240d, 0x240a, 0x0000, 0x0000, /* 0x09e0-0x09e7 */
@@ -2122,6 +2131,7 @@
     0x2502                                                          /* 0x09f8-0x09ff */
   };
 
+    /* Publishing Mappings ? */
   static unsigned short const ucs4_0aa1_0afe[] = {
             0x2003, 0x2002, 0x2004, 0x2005, 0x2007, 0x2008, 0x2009, /* 0x0aa0-0x0aa7 */
     0x200a, 0x2014, 0x2013, 0x0000, 0x0000, 0x0000, 0x2026, 0x2025, /* 0x0aa8-0x0aaf */
@@ -2137,6 +2147,7 @@
     0x2640, 0x2121, 0x2315, 0x2117, 0x2038, 0x201a, 0x201e          /* 0x0af8-0x0aff */
   };
 
+    /* Hebrew Mappings */
   static unsigned short const ucs4_0cdf_0cfa[] = {
                                                             0x2017, /* 0x0cd8-0x0cdf */
     0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, 0x05d7, /* 0x0ce0-0x0ce7 */
@@ -2145,6 +2156,7 @@
     0x05e8, 0x05e9, 0x05ea                                          /* 0x0cf8-0x0cff */
   };
 
+    /* Thai Mappings */
   static unsigned short const ucs4_0da1_0df9[] = {
             0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07, /* 0x0da0-0x0da7 */
     0x0e08, 0x0e09, 0x0e0a, 0x0e0b, 0x0e0c, 0x0e0d, 0x0e0e, 0x0e0f, /* 0x0da8-0x0daf */
@@ -2160,6 +2172,7 @@
     0x0e58, 0x0e59                                                  /* 0x0df8-0x0dff */
   };
 
+    /* Hangul Mappings */
   static unsigned short const ucs4_0ea0_0eff[] = {
     0x0000, 0x1101, 0x1101, 0x11aa, 0x1102, 0x11ac, 0x11ad, 0x1103, /* 0x0ea0-0x0ea7 */
     0x1104, 0x1105, 0x11b0, 0x11b1, 0x11b2, 0x11b3, 0x11b4, 0x11b5, /* 0x0ea8-0x0eaf */
@@ -2175,6 +2188,7 @@
     0x11eb, 0x0000, 0x11f9, 0x0000, 0x0000, 0x0000, 0x0000, 0x20a9, /* 0x0ef8-0x0eff */
   };
 
+    /* Non existing range in keysymdef.h */
   static unsigned short ucs4_12a1_12fe[] = {
             0x1e02, 0x1e03, 0x0000, 0x0000, 0x0000, 0x1e0a, 0x0000, /* 0x12a0-0x12a7 */
     0x1e80, 0x0000, 0x1e82, 0x1e0b, 0x1ef2, 0x0000, 0x0000, 0x0000, /* 0x12a8-0x12af */
@@ -2189,11 +2203,13 @@
     0x0175, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1e6b, /* 0x12f0-0x12f7 */
     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0177          /* 0x12f0-0x12ff */
   };
-		
+    
+    /* Latin 9 Mappings */		
   static unsigned short const ucs4_13bc_13be[] = {
                                     0x0152, 0x0153, 0x0178          /* 0x13b8-0x13bf */
   };
 
+    /* Non existing range in keysymdef.h */
   static unsigned short ucs4_14a1_14ff[] = {
             0x2741, 0x00a7, 0x0589, 0x0029, 0x0028, 0x00bb, 0x00ab, /* 0x14a0-0x14a7 */
     0x2014, 0x002e, 0x055d, 0x002c, 0x2013, 0x058a, 0x2026, 0x055c, /* 0x14a8-0x14af */
@@ -2209,6 +2225,7 @@
     0x0554, 0x0584, 0x0555, 0x0585, 0x0556, 0x0586, 0x2019, 0x0027, /* 0x14f8-0x14ff */
   };
 
+    /* Non existing range in keysymdef.h */
   static unsigned short ucs4_15d0_15f6[] = {
     0x10d0, 0x10d1, 0x10d2, 0x10d3, 0x10d4, 0x10d5, 0x10d6, 0x10d7, /* 0x15d0-0x15d7 */
     0x10d8, 0x10d9, 0x10da, 0x10db, 0x10dc, 0x10dd, 0x10de, 0x10df, /* 0x15d8-0x15df */
@@ -2217,6 +2234,7 @@
     0x10f0, 0x10f1, 0x10f2, 0x10f3, 0x10f4, 0x10f5, 0x10f6          /* 0x15f0-0x15f7 */
   };
 
+    /* Non existing range in keysymdef.h */
   static unsigned short ucs4_16a0_16f6[] = {
     0x0000, 0x0000, 0xf0a2, 0x1e8a, 0x0000, 0xf0a5, 0x012c, 0xf0a7, /* 0x16a0-0x16a7 */
     0xf0a8, 0x01b5, 0x01e6, 0x0000, 0x0000, 0x0000, 0x0000, 0x019f, /* 0x16a8-0x16af */
@@ -2231,6 +2249,7 @@
     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0259          /* 0x16f0-0x16f6 */
   };
 
+    /* Vietnamesse Mappings */
   static unsigned short const ucs4_1e9f_1eff[] = {
                                                             0x0303,
     0x1ea0, 0x1ea1, 0x1ea2, 0x1ea3, 0x1ea4, 0x1ea5, 0x1ea6, 0x1ea7, /* 0x1ea0-0x1ea7 */
@@ -2247,13 +2266,39 @@
     0x1ef8, 0x1ef9, 0x01a0, 0x01a1, 0x01af, 0x01b0, 0x0309, 0x0323  /* 0x1ef8-0x1eff */
   };
 
+    /* Currency */
   static unsigned short const ucs4_20a0_20ac[] = {
     0x20a0, 0x20a1, 0x20a2, 0x20a3, 0x20a4, 0x20a5, 0x20a6, 0x20a7, /* 0x20a0-0x20a7 */
     0x20a8, 0x20a9, 0x20aa, 0x20ab, 0x20ac                          /* 0x20a8-0x20af */
   };
 
-  static unsigned short const sqSpecialKey[] = {1, 28, 30, 29, 31, 11, 12, 4, 1};
+    /* Keypad numbers mapping */
+  static unsigned short const ucs4_ffb0_ffb9[] = { 0x30, 0x31, 0x32, 0x33, 0x34,
+             0x35, 0x36, 0x37, 0x38, 0x39};
+ 
+     /* Keypad operators mapping */
+  static unsigned short const ucs4_ffaa_ffaf[] = { 
+             0x2a, /* Multiply  */
+             0x2b, /* Add       */
+             0x2c, /* Separator */
+             0x2d, /* Substract */
+             0x2e, /* Decimal   */
+             0x2f  /* Divide    */
+     };
 
+ 	static unsigned short const sqSpecialKey[] = { 
+             1,  /* HOME  */
+             28, /* LEFT  */ 
+             30, /* UP    */
+             29, /* RIGHT */
+             31, /* DOWN  */
+             11, /* PRIOR (page up?) */
+             12, /* NEXT (page down/new page?) */
+             4,  /* END */
+             1   /* HOME */
+     };
+
+
   /* Latin-1 */
   if (   (keysym >= 0x0020 && keysym <= 0x007e)
       || (keysym >= 0x00a0 && keysym <= 0x00ff)) return keysym;
@@ -2275,6 +2320,15 @@
   if (keysym          ==          0xff1b) return keysym & 0x001f;
   if (keysym          ==          0xffff) return keysym & 0x007f;
 
+  /* Misc mappings */
+  if (keysym == XK_Escape)
+ 	return keysym & 0x001f;
+  if (keysym == XK_Delete)
+ 	return keysym & 0x007f;
+  if (keysym == XK_KP_Equal)
+    return XK_equal;
+
+
   /* explicitly mapped */
 #define map(lo, hi) if (keysym >= 0x##lo && keysym <= 0x##hi) return ucs4_##lo##_##hi[keysym - 0x##lo];
   map(01a1, 01ff);  map(02a1, 02fe);  map(03a2, 03fe);  map(04a1, 04df);
@@ -2282,6 +2336,8 @@
   map(09df, 09f8);  map(0aa1, 0afe);  map(0cdf, 0cfa);  map(0da1, 0df9);
   map(0ea0, 0eff);  map(12a1, 12fe);  map(13bc, 13be);  map(14a1, 14ff);
   map(15d0, 15f6);  map(16a0, 16f6);  map(1e9f, 1eff);  map(20a0, 20ac);
+  map(ffb0, ffb9);
+  map(ffaa, ffaf);
 #undef map
 
 #if defined(XF86XK_Start)



More information about the Vm-dev mailing list