David Dawes schrieb:

On Sun, Jun 15, 2003 at 01:49:56PM +0200, Robert wrote:


Matthieu Herrb schrieb:



Robert wrote (in a message from Sunday 15)


Brad Hards schrieb:



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 12 Jun 2003 14:57 pm, Jason Kim wrote:




Has anyone developed keyboard driver for X ? Or does anyone know current
situation?




XFree86 4.x has loadable drivers, including keyboard.



really ?
i thought the keyboard is compiled into server???



There are 2 keyboard drivers in XFree86 4.3.0. One is the legacy X
driver which is part of the base X server and the 2nd one is a new
Xinput based driver which is dynamically loadable. The name of this
loadable module is "kbd" (while the legacy driver is named
"keyboard").





so what is the deal then with the keyboard ....

my problem now is that i need to prevent X to generally map cetrain Scancodes to a generic keycode ...which then makes some extra buttons on my Tablet Pc send the samy keycode as Key-Up and i cannot put function on this keycode so i ll loose my KEY_UP also ...
i changed also the file atKeynames .h accordingly ...


I read then that the keyboard is compiled into the server , and also changing the "Driver" "Keyboard " into
Driver " "kbd" did not start the X-server ....


the scancodes i need to be free to get a free keycode are

0x5a and 0x59



It looks like all of the other scancodes like these that are currently returned for various 2-byte codes need to be remapped. I recently did this for 0x5c, which is KP_Equal on Macs. The attached patch (relative to the current CVS trunk) should handle the rest of them. Let me know if it works for you. If it does, I'll commit it. The patch handles both the built-in keyboard driver, and the modular "kbd" driver.

If we were starting over with this, we'd handle the mappings more cleanly.
We should probably do that for 5.0.



pls tell me some more things ...


i did these changes by hand in the vanilla X-4.3 source ....
then i did only recompile the kbd.o module and started but still i get KEY_UP as keysym and keycode 98 ( using xev ) for my key with scancode 0x5a and KEY_HOME and keycode 97 for my key with scancode 0.59 ... .and i did use kbd as driver in my InputSection !!!
will i have to recompile the whole X-server (XFree86 executable ) to make these changes work ???


So the question is what parts will be needed to exchange to make these cchanges valid !!!


David


------------------------------------------------------------------------

Index: programs/Xserver/hw/xfree86/common/atKeynames.h
===================================================================
RCS file: /home/x-cvs/xc/programs/Xserver/hw/xfree86/common/atKeynames.h,v
retrieving revision 3.18
diff -u -r3.18 atKeynames.h
--- programs/Xserver/hw/xfree86/common/atKeynames.h     29 Sep 2001 20:40:30 -0000     
 3.18
+++ programs/Xserver/hw/xfree86/common/atKeynames.h     16 Jun 2003 16:23:40 -0000
@@ -199,6 +199,55 @@
#define KEY_NFER         /* No Kanji Transfer     0x7b  */  123
#define KEY_Yen          /* Yen                   0x7d  */  125

+/*
+ * Fake 'scancodes' in the following ranges are generated for 2-byte
+ * codes not handled elsewhere. These correspond to most extended keys
+ * on so-called "Internet" keyboards:
+ *
+ * 0x79-0x93
+ * 0x96-0xa1
+ * 0xa3-0xac
+ * 0xb1-0xb4
+ * 0xba-0xbd
+ * 0xc2
+ * 0xcc-0xd2
+ * 0xd6-0xf7
+ */
+
+/*
+ * Remapped 'scancodes' are generated for single-byte codes in the range
+ * 0x59-0x5f,0x62-0x76. These are used for some extra keys on some keyboards.
+ */
+
+#define KEY_0x59 0x95
+#define KEY_0x5A 0xA2
+#define KEY_0x5B 0xAD
+#define KEY_0x5C KEY_KP_EQUAL
+#define KEY_0x5D 0xAE
+#define KEY_0x5E 0xAF
+#define KEY_0x5F 0xB0
+#define KEY_0x62 0xB5
+#define KEY_0x63 0xB6
+#define KEY_0x64 0xB7
+#define KEY_0x65 0xB8
+#define KEY_0x66 0xB9
+#define KEY_0x67 0xBE
+#define KEY_0x68 0xBF
+#define KEY_0x69 0xC0
+#define KEY_0x6A 0xC1
+#define KEY_0x6B 0xC3
+#define KEY_0x6C 0xC4
+#define KEY_0x6D 0xC5
+#define KEY_0x6E 0xC6
+#define KEY_0x6F 0xC7
+#define KEY_0x70 0xC8
+#define KEY_0x71 0xC9
+#define KEY_0x72 0xCA
+#define KEY_0x73 0xCB
+#define KEY_0x74 0xD3
+#define KEY_0x75 0xD4
+#define KEY_0x76 0xD5
+
/* These are for "notused" and "unknown" entries in translation maps. */
#define KEY_NOTUSED 0
#define KEY_UNKNOWN 255
Index: programs/Xserver/hw/xfree86/common/xf86Events.c
===================================================================
RCS file: /home/x-cvs/xc/programs/Xserver/hw/xfree86/common/xf86Events.c,v
retrieving revision 3.151
diff -u -r3.151 xf86Events.c
--- programs/Xserver/hw/xfree86/common/xf86Events.c 11 Jun 2003 16:06:27 -0000 3.151
+++ programs/Xserver/hw/xfree86/common/xf86Events.c 16 Jun 2003 16:25:30 -0000
@@ -490,7 +490,34 @@
#endif /* i386 && SVR4 */
{
switch (scanCode) {
+ case 0x59: scanCode = KEY_0x59; break;
+ case 0x5a: scanCode = KEY_0x5A; break;
+ case 0x5b: scanCode = KEY_0x5B; break;
case 0x5c: scanCode = KEY_KP_Equal; break; /* Keypad Equal */
+ case 0x5d: scanCode = KEY_0x5D; break;
+ case 0x5e: scanCode = KEY_0x5E; break;
+ case 0x5f: scanCode = KEY_0x5F; break;
+ case 0x62: scanCode = KEY_0x62; break;
+ case 0x63: scanCode = KEY_0x63; break;
+ case 0x64: scanCode = KEY_0x64; break;
+ case 0x65: scanCode = KEY_0x65; break;
+ case 0x66: scanCode = KEY_0x66; break;
+ case 0x67: scanCode = KEY_0x67; break;
+ case 0x68: scanCode = KEY_0x68; break;
+ case 0x69: scanCode = KEY_0x69; break;
+ case 0x6a: scanCode = KEY_0x6A; break;
+ case 0x6b: scanCode = KEY_0x6B; break;
+ case 0x6c: scanCode = KEY_0x6C; break;
+ case 0x6d: scanCode = KEY_0x6D; break;
+ case 0x6e: scanCode = KEY_0x6E; break;
+ case 0x6f: scanCode = KEY_0x6F; break;
+ case 0x70: scanCode = KEY_0x70; break;
+ case 0x71: scanCode = KEY_0x71; break;
+ case 0x72: scanCode = KEY_0x72; break;
+ case 0x73: scanCode = KEY_0x73; break;
+ case 0x74: scanCode = KEY_0x74; break;
+ case 0x75: scanCode = KEY_0x75; break;
+ case 0x76: scanCode = KEY_0x76; break;
}
}
}
Index: programs/Xserver/hw/xfree86/os-support/shared/at_scancode.c
===================================================================
RCS file: /home/x-cvs/xc/programs/Xserver/hw/xfree86/os-support/shared/at_scancode.c,v
retrieving revision 1.2
diff -u -r1.2 at_scancode.c
--- programs/Xserver/hw/xfree86/os-support/shared/at_scancode.c 9 Jun 2003 19:59:46 -0000 1.2
+++ programs/Xserver/hw/xfree86/os-support/shared/at_scancode.c 16 Jun 2003 16:25:41 -0000
@@ -21,9 +21,34 @@
case KEY_Prefix1:
pKbd->scanPrefix = *scanCode; /* special prefixes */
return TRUE;
- case 0x5c:
- *scanCode = KEY_KP_Equal;
- break;
+ case 0x59: *scanCode = KEY_0x59; break;
+ case 0x5a: *scanCode = KEY_0x5A; break;
+ case 0x5b: *scanCode = KEY_0x5B; break;
+ case 0x5c: *scanCode = KEY_KP_Equal; break; /* Keypad Equal */
+ case 0x5d: *scanCode = KEY_0x5D; break;
+ case 0x5e: *scanCode = KEY_0x5E; break;
+ case 0x5f: *scanCode = KEY_0x5F; break;
+ case 0x62: *scanCode = KEY_0x62; break;
+ case 0x63: *scanCode = KEY_0x63; break;
+ case 0x64: *scanCode = KEY_0x64; break;
+ case 0x65: *scanCode = KEY_0x65; break;
+ case 0x66: *scanCode = KEY_0x66; break;
+ case 0x67: *scanCode = KEY_0x67; break;
+ case 0x68: *scanCode = KEY_0x68; break;
+ case 0x69: *scanCode = KEY_0x69; break;
+ case 0x6a: *scanCode = KEY_0x6A; break;
+ case 0x6b: *scanCode = KEY_0x6B; break;
+ case 0x6c: *scanCode = KEY_0x6C; break;
+ case 0x6d: *scanCode = KEY_0x6D; break;
+ case 0x6e: *scanCode = KEY_0x6E; break;
+ case 0x6f: *scanCode = KEY_0x6F; break;
+ case 0x70: *scanCode = KEY_0x70; break;
+ case 0x71: *scanCode = KEY_0x71; break;
+ case 0x72: *scanCode = KEY_0x72; break;
+ case 0x73: *scanCode = KEY_0x73; break;
+ case 0x74: *scanCode = KEY_0x74; break;
+ case 0x75: *scanCode = KEY_0x75; break;
+ case 0x76: *scanCode = KEY_0x76; break;
}
break;
case KEY_Prefix0:
Index: programs/xkbcomp/keycodes/xfree86
===================================================================
RCS file: /home/x-cvs/xc/programs/xkbcomp/keycodes/xfree86,v
retrieving revision 3.21
diff -u -r3.21 xfree86
--- programs/xkbcomp/keycodes/xfree86 9 Jun 2003 19:59:46 -0000 3.21
+++ programs/xkbcomp/keycodes/xfree86 16 Jun 2003 16:19:15 -0000
@@ -192,8 +192,8 @@
<I19> = 153;
<I1A> = 154;
<I1B> = 155;
- // <I1C> = 156;
- // <I1D> = 157;
+ // <I1C> = 156; <META>
+ // <I1D> = 157; <K59>
<I1E> = 158;
<I1F> = 159;
<I20> = 160;
@@ -206,7 +206,7 @@
<I27> = 167;
<I28> = 168;
<I29> = 169;
- // <I2A> = 170;
+ // <I2A> = 170; <K5A>
<I2B> = 171;
<I2C> = 172;
<I2D> = 173;
@@ -217,37 +217,37 @@
<I32> = 178;
<I33> = 179;
<I34> = 180;
- // <I35> = 181;
- // <I36> = 182;
- // <I37> = 183;
- // <I38> = 184;
+ // <I35> = 181; <K5B>
+ // <I36> = 182; <K5D>
+ // <I37> = 183; <K5E>
+ // <I38> = 184; <K5F>
<I39> = 185;
<I3A> = 186;
<I3B> = 187;
<I3C> = 188;
- // <I3D> = 189;
- // <I3E> = 190;
- // <I3F> = 191;
- // <I40> = 192;
- // <I41> = 193;
+ // <I3D> = 189; <K62>
+ // <I3E> = 190; <K63>
+ // <I3F> = 191; <K64>
+ // <I40> = 192; <K65>
+ // <I41> = 193; <K66>
<I42> = 194;
<I43> = 195;
<I44> = 196;
<I45> = 197;
- // <I46> = 198;
- // <I47> = 199;
- // <I48> = 200;
- // <I49> = 201;
+ // <I46> = 198; <K67>
+ // <I47> = 199; <K68>
+ // <I48> = 200; <K69>
+ // <I49> = 201; <K6A>
<I4A> = 202;
- // <I4B> = 203;
- // <I4C> = 204;
- // <I4D> = 205;
- // <I4E> = 206;
- // <I4F> = 207;
- // <I50> = 208;
- // <I51> = 209;
- // <I52> = 210;
- // <I53> = 211;
+ // <I4B> = 203; <K6B>
+ // <I4C> = 204; <K6C>
+ // <I4D> = 205; <K6D>
+ // <I4E> = 206; <K6E>
+ // <I4F> = 207; <K6F>
+ // <I50> = 208; <K70>
+ // <I51> = 209; <K71>
+ // <I52> = 210; <K72>
+ // <I53> = 211; <K73>
<I54> = 212;
<I55> = 213;
<I56> = 214;
@@ -255,9 +255,9 @@
<I58> = 216;
<I59> = 217;
<I5A> = 218;
- // <I5B> = 219;
- // <I5C> = 220;
- // <I5D> = 221;
+ // <I5B> = 219; <K74>
+ // <I5C> = 220; <K75>
+ // <I5D> = 221; <K76>
<I5E> = 222;
<I5F> = 223;
<I60> = 224;
@@ -292,6 +292,37 @@
<I7D> = 253;
<I7E> = 254;
<I7F> = 255;
+
+ // Codes generated for scancodes 0x59-0x5f, 0x62-0x76
+ <K59> = 157; // <I1D>
+ <K5A> = 170; // <I2A>
+ <K5B> = 181; // <I35>
+ alias <K5C> = <KPEQ>;
+ <K5D> = 182; // <I36>
+ <K5E> = 183; // <I37>
+ <K5F> = 184; // <I38>
+ <K62> = 189; // <I3D>
+ <K63> = 190; // <I3E>
+ <K64> = 191; // <I3F>
+ <K65> = 192; // <I40>
+ <K66> = 193; // <I41>
+ <K67> = 198; // <I46>
+ <K68> = 199; // <I47>
+ <K69> = 200; // <I48>
+ <K6A> = 201; // <I49>
+ <K6B> = 203; // <I4B>
+ <K6C> = 204; // <I4C>
+ <K6D> = 205; // <I4D>
+ <K6E> = 206; // <I4E>
+ <K6F> = 207; // <I4F>
+ <K70> = 208; // <I50>
+ <K71> = 209; // <I51>
+ <K72> = 210; // <I52>
+ <K73> = 211; // <I53>
+ <K74> = 219; // <I5B>
+ <K75> = 220; // <I5C>
+ <K76> = 221; // <I5D>
+


// Other codes never generated. The XFree86 ddx never generates
// these codes.



-- _____________________________________ *Robert Woerle Linux & Customer Support* *PaceBlade Technology Europe SA* phone: +49 89 552 99935 fax: +49 89 552 99910 mobile: +49 179 474 45 27 email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> web: http://www.paceblade.com _____________________________________




_______________________________________________ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel

Reply via email to