void InitInput(int argc, char **argv) { KdKeyboardInfo *ki; KdPointerInfo *pi; KdAddKeyboardDriver(&EphyrKeyboardDriver); #ifdef KDRIVE_EVDEV KdAddKeyboardDriver(&LinuxEvdevKeyboardDriver); #endif KdAddPointerDriver(&EphyrMouseDriver); #ifdef KDRIVE_EVDEV KdAddPointerDriver(&LinuxEvdevMouseDriver); #endif if (!kdHasKbd) { ki = KdNewKeyboard(); if (!ki) FatalError("Couldn't create Xephyr keyboard\n"); ki->driver = &EphyrKeyboardDriver; KdAddKeyboard(ki); } if (!kdHasPointer) { pi = KdNewPointer(); if (!pi) FatalError("Couldn't create Xephyr pointer\n"); pi->driver = &EphyrMouseDriver; KdAddPointer(pi); } KdInitInput(); }
void InitInput (int argc, char **argv) { KdPointerInfo *pi; KdKeyboardInfo *ki; pi = KdNewPointer (); if (!pi) return; pi->driver = &FakePointerDriver; KdAddPointer(pi); ki = KdNewKeyboard (); if (!ki) return; ki->driver = &FakeKeyboardDriver; KdAddKeyboard(ki); KdInitInput (); }