SOURCES: vnc-svncviewer-pl_keys.patch (NEW) - added Polish keyboar...
witekfl
witekfl at pld-linux.org
Thu Dec 21 18:06:58 CET 2006
Author: witekfl Date: Thu Dec 21 17:06:58 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- added Polish keyboard support
---- Files affected:
SOURCES:
vnc-svncviewer-pl_keys.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/vnc-svncviewer-pl_keys.patch
diff -u /dev/null SOURCES/vnc-svncviewer-pl_keys.patch:1.1
--- /dev/null Thu Dec 21 18:06:58 2006
+++ SOURCES/vnc-svncviewer-pl_keys.patch Thu Dec 21 18:06:53 2006
@@ -0,0 +1,131 @@
+--- vnc-3.3.7-unixsrc/svncviewer/keys.h.old 2006-12-21 15:16:30.000000000 +0100
++++ vnc-3.3.7-unixsrc/svncviewer/keys.h 2006-12-21 15:16:49.000000000 +0100
+@@ -17,19 +17,23 @@
+ keynorm[16] = XK_q; keyshift[16] = XK_Q;
+ keynorm[17] = XK_w; keyshift[17] = XK_W;
+ keynorm[18] = XK_e; keyshift[18] = XK_E;
++keynorm_alt[18] = XK_eogonek; keyshift_alt[18] = XK_Eogonek;
+ keynorm[19] = XK_r; keyshift[19] = XK_R;
+ keynorm[20] = XK_t; keyshift[20] = XK_T;
+ keynorm[21] = XK_y; keyshift[21] = XK_Y;
+ keynorm[22] = XK_u; keyshift[22] = XK_U;
+ keynorm[23] = XK_i; keyshift[23] = XK_I;
+ keynorm[24] = XK_o; keyshift[24] = XK_O;
++keynorm_alt[24] = XK_oacute; keyshift_alt[24] = XK_Oacute;
+ keynorm[25] = XK_p; keyshift[25] = XK_P;
+ keynorm[26] = XK_bracketleft; keyshift[26] = XK_braceleft;
+ keynorm[27] = XK_bracketright; keyshift[27] = XK_braceright;
+ keynorm[28] = XK_Return; keyshift[28] = XK_Return;
+ keynorm[29] = XK_Control_L; keyshift[29] = XK_Control_L;
+ keynorm[30] = XK_a; keyshift[30] = XK_A;
++keynorm_alt[30] = XK_aogonek; keyshift_alt[30] = XK_Aogonek;
+ keynorm[31] = XK_s; keyshift[31] = XK_S;
++keynorm_alt[31] = XK_sacute; keyshift_alt[31] = XK_Sacute;
+ keynorm[32] = XK_d; keyshift[32] = XK_D;
+ keynorm[33] = XK_f; keyshift[33] = XK_F;
+ keynorm[34] = XK_g; keyshift[34] = XK_G;
+@@ -37,17 +41,22 @@
+ keynorm[36] = XK_j; keyshift[36] = XK_J;
+ keynorm[37] = XK_k; keyshift[37] = XK_K;
+ keynorm[38] = XK_l; keyshift[38] = XK_L;
++keynorm_alt[38] = XK_lstroke; keyshift_alt[38] = XK_Lstroke;
+ keynorm[39] = XK_semicolon; keyshift[39] = XK_colon;
+ keynorm[40] = XK_apostrophe; keyshift[40] = XK_quotedbl;
+ keynorm[41] = XK_grave; keyshift[41] = XK_asciitilde;
+ keynorm[42] = XK_Shift_L; keyshift[42] = XK_Shift_L;
+ keynorm[43] = XK_backslash; keyshift[43] = XK_bar;
+ keynorm[44] = XK_z; keyshift[44] = XK_Z;
++keynorm_alt[44] = XK_zabovedot; keyshift_alt[44] = XK_Zabovedot;
+ keynorm[45] = XK_x; keyshift[45] = XK_X;
++keynorm_alt[45] = XK_zacute; keyshift_alt[45] = XK_Zacute;
+ keynorm[46] = XK_c; keyshift[46] = XK_C;
++keynorm_alt[46] = XK_cacute; keyshift_alt[46] = XK_Cacute;
+ keynorm[47] = XK_v; keyshift[47] = XK_V;
+ keynorm[48] = XK_b; keyshift[48] = XK_B;
+ keynorm[49] = XK_n; keyshift[49] = XK_N;
++keynorm_alt[49] = XK_nacute; keyshift_alt[49] = XK_Nacute;
+ keynorm[50] = XK_m; keyshift[50] = XK_M;
+ keynorm[51] = XK_comma; keyshift[51] = XK_less;
+ keynorm[52] = XK_period; keyshift[52] = XK_greater;
+@@ -98,7 +107,7 @@
+ keynorm[97] = XK_Control_R; keyshift[97] = XK_Control_R;
+ keynorm[98] = XK_KP_Divide; keyshift[98] = XK_KP_Divide;
+ keynorm[99] = XK_Print; keyshift[99] = XK_Print;
+-keynorm[100] = XK_Alt_R; keyshift[100] = XK_Alt_R;
++keynorm[100] = XK_Mode_switch; keyshift[100] = XK_Mode_switch;
+ keynorm[101] = XK_Control_R; keyshift[101] = XK_Control_R;
+ keynorm[102] = XK_Home; keyshift[102] = XK_Home;
+ keynorm[103] = XK_Up; keyshift[103] = XK_Up;
+--- vnc-3.3.7-unixsrc/svncviewer/kbd.c.old 2006-12-21 15:16:39.000000000 +0100
++++ vnc-3.3.7-unixsrc/svncviewer/kbd.c 2006-12-21 15:16:44.000000000 +0100
+@@ -15,6 +15,7 @@
+ static int state[num_modifiers] = {0,};
+
+ static KeySym keynorm[NR_KEYS], keyshift[NR_KEYS];
++static KeySym keynorm_alt[NR_KEYS], keyshift_alt[NR_KEYS];
+ static KeySym keycode2keysym (int);
+ static void keyboard_handler (int, int);
+
+@@ -42,8 +43,13 @@
+ /*
+ * initialize keynorm[] and keyshift[] (keycode -> keysym) here.
+ */
++
+ # include "keys.h"
+
++ for (i = 0; i < NR_KEYS; i++) {
++ if (keynorm_alt[i] == 0) keynorm_alt[i] = keynorm[i];
++ if (keyshift_alt[i] == 0) keyshift_alt[i] = keyshift[i];
++ }
+ return True;
+ }
+
+@@ -84,7 +90,7 @@
+ case XK_Control_L: m = mod_control; break;
+ case XK_Control_R: m = mod_control; break;
+ case XK_Alt_L: m = mod_mod1; break;
+- case XK_Alt_R: m = mod_mod1; break;
++ case XK_Mode_switch: m = mod_mod3; break;
+ case XK_Num_Lock: m = mod_mod2; break;
+ case XK_Scroll_Lock: m = mod_mod5; break;
+ default: m = -1; break;
+@@ -99,6 +105,7 @@
+ case mod_control: /* control */
+ case mod_shift: /* shift */
+ case mod_mod1: /* alt */
++ case mod_mod3: /* right alt */
+ state[m] = 1;
+ break;
+ }
+@@ -111,6 +118,7 @@
+ case mod_control: /* control */
+ case mod_shift: /* shift */
+ case mod_mod1: /* alt */
++ case mod_mod3:
+ state[m] = 0;
+ break;
+ }
+@@ -127,13 +135,20 @@
+ *
+ * All in one expression!
+ */
+- return
+- (shifted = ((((state[mod_mod2] & 1)
++ return
++ state[mod_mod3] ?
++ ((shifted = ((((state[mod_mod2] & 1)
++ & (((keyshift[code] >= XK_KP_0) & (keyshift[code] <= XK_KP_9))
++ | (keyshift[code] == XK_KP_Decimal)))
++ | ((state[mod_lock] & 1)
++ & (keynorm[code] >= XK_a) & (keynorm[code] <= XK_z)))
++ ^ state[mod_shift])) ? keyshift_alt[code] : keynorm_alt[code]) :
++ ((shifted = ((((state[mod_mod2] & 1)
+ & (((keyshift[code] >= XK_KP_0) & (keyshift[code] <= XK_KP_9))
+ | (keyshift[code] == XK_KP_Decimal)))
+ | ((state[mod_lock] & 1)
+ & (keynorm[code] >= XK_a) & (keynorm[code] <= XK_z)))
+- ^ state[mod_shift])) ? keyshift[code] : keynorm[code];
++ ^ state[mod_shift])) ? keyshift[code] : keynorm[code]);
+ }
+
+ static void
================================================================
More information about the pld-cvs-commit
mailing list