summaryrefslogtreecommitdiff
path: root/hw/kdrive
diff options
context:
space:
mode:
authorCarlos Romero <kcrashcore@bellsouth.net>2004-07-07 19:21:07 +0000
committerCarlos Romero <kcrashcore@bellsouth.net>2004-07-07 19:21:07 +0000
commitf96ef08d48b01f6119799ede9ffc43d0134cbf8b (patch)
tree507e100bd598d563b4db13fcd39503b5b77ac72b /hw/kdrive
parenta5c9b3229ce418a5e3eacc40b7a7f11c0a26d958 (diff)
Initial kdrive XKB/XINPUT support, use --enable-xkb --enable-xinput
Diffstat (limited to 'hw/kdrive')
-rw-r--r--hw/kdrive/src/kinput.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
index b0271b8ac..1b6d94fdb 100644
--- a/hw/kdrive/src/kinput.c
+++ b/hw/kdrive/src/kinput.c
@@ -38,6 +38,11 @@
#include <signal.h>
#include <stdio.h>
+#ifdef XKB
+#define XKB_IN_SERVER
+#include <X11/extensions/XKBsrv.h>
+#endif
+
static DeviceIntPtr pKdKeyboard, pKdPointer;
static KdMouseFuncs *kdMouseFuncs;
@@ -431,6 +436,9 @@ KdKeybdProc(DeviceIntPtr pDevice, int onoff)
{
Bool ret;
DevicePtr pDev = (DevicePtr)pDevice;
+#ifdef XKB
+ XkbComponentNamesRec names;
+#endif
if (!pDev)
return BadImplementation;
@@ -442,10 +450,24 @@ KdKeybdProc(DeviceIntPtr pDevice, int onoff)
{
return !Success;
}
+#ifndef XKB
ret = InitKeyboardDeviceStruct(pDev,
&kdKeySyms,
kdModMap,
KdBell, KdKbdCtrl);
+#else
+ memset(&names, 0, sizeof(XkbComponentNamesRec));
+
+ if (XkbInitialMap)
+ names.keymap = XkbInitialMap;
+
+ XkbSetRulesDflts ("base", "pc101", "us", NULL, NULL);
+ ret = XkbInitKeyboardDeviceStruct (pDev,
+ &names,
+ &kdKeySyms,
+ kdModMap,
+ KdBell, KdKbdCtrl);
+#endif
if (!ret)
return BadImplementation;
break;
@@ -597,7 +619,7 @@ KdInitInput(KdMouseFuncs *pMouseFuncs,
static long zero1, zero2;
//SetExtInputCheck (&zero1, &zero2);
- ErrorF("Extended Input Devices not yet supported. Impelement it at line %d in %s",
+ ErrorF("Extended Input Devices not yet supported. Impelement it at line %d in %s\n",
__LINE__, __FILE__);
}
#endif