Distributed Multihead X
1.16.4
|
Macros | |
#define | USB_KEYBOARD_DEBUG 0 |
#define | GETPRIV |
#define | LOG0(f) dmxLog(dmxDebug,f) |
#define | LOG1(f, a) dmxLog(dmxDebug,f,a) |
#define | LOG2(f, a, b) dmxLog(dmxDebug,f,a,b) |
#define | LOG3(f, a, b, c) dmxLog(dmxDebug,f,a,b,c) |
#define | FATAL0(f) dmxLog(dmxFatal,f) |
#define | FATAL1(f, a) dmxLog(dmxFatal,f,a) |
#define | FATAL2(f, a, b) dmxLog(dmxFatal,f,a,b) |
#define | MOTIONPROC dmxMotionProcPtr |
#define | ENQUEUEPROC dmxEnqueueProcPtr |
#define | CHECKPROC dmxCheckSpecialProcPtr |
#define | BLOCK DMXBlockType |
#define | GLYPHS_PER_KEY 4 |
#define | NUM_KEYCODES 248 |
#define | MIN_KEYCODE 8 |
#define | MAX_KEYCODE (NUM_KEYCODES + MIN_KEYCODE - 1) |
Functions | |
static int | kbdUSBKeyDown (myPrivate *priv, int keyCode) |
static void | kbdUSBKeyState (myPrivate *priv, int type, int keyCode) |
void | kbdUSBCtrl (DevicePtr pDev, KeybdCtrl *ctrl) |
void | kbdUSBInit (DevicePtr pDev) |
static void | kbdUSBConvert (DevicePtr pDev, unsigned int scanCode, int value, ENQUEUEPROC enqueue, CHECKPROC checkspecial, BLOCK block) |
void | kbdUSBRead (DevicePtr pDev, MOTIONPROC motion, ENQUEUEPROC enqueue, CHECKPROC checkspecial, BLOCK block) |
int | kbdUSBOn (DevicePtr pDev) |
static void | kbdUSBGetMap (DevicePtr pDev, KeySymsPtr pKeySyms, CARD8 *pModMap) |
void | kbdUSBGetInfo (DevicePtr pDev, DMXLocalInitInfoPtr info) |
Variables | |
static KeySym | map [NUM_KEYCODES *GLYPHS_PER_KEY] |
This code implements a low-level device driver for a USB keyboard under Linux. The keymap description is derived from code by Thomas Roell, Orest Zborowski.
#define BLOCK DMXBlockType |
#define CHECKPROC dmxCheckSpecialProcPtr |
#define ENQUEUEPROC dmxEnqueueProcPtr |
#define GETPRIV |
Referenced by kbdUSBConvert(), kbdUSBCtrl(), kbdUSBOn(), and kbdUSBRead().
#define GLYPHS_PER_KEY 4 |
Referenced by kbdLinuxGetMap(), kbdLinuxReadKernelMapping(), and kbdUSBGetMap().
Referenced by kbdUSBRead().
#define MAX_KEYCODE (NUM_KEYCODES + MIN_KEYCODE - 1) |
Referenced by kbdLinuxGetMap(), and kbdUSBGetMap().
#define MIN_KEYCODE 8 |
Referenced by kbdLinuxConvert(), kbdLinuxGetMap(), kbdUSBConvert(), and kbdUSBGetMap().
#define MOTIONPROC dmxMotionProcPtr |
#define NUM_KEYCODES 248 |
Referenced by kbdLinuxGetMap(), and kbdUSBGetMap().
#define USB_KEYBOARD_DEBUG 0 |
|
static |
References GETPRIV, kbdLinuxKeyDown(), kbdUSBKeyDown(), kbdUSBKeyState(), and MIN_KEYCODE.
Referenced by kbdUSBRead().
void kbdUSBCtrl | ( | DevicePtr | pDev, |
KeybdCtrl * | ctrl | ||
) |
Set the LEDs.
References GETPRIV.
void kbdUSBGetInfo | ( | DevicePtr | pDev, |
DMXLocalInitInfoPtr | info | ||
) |
Fill the info structure with information needed to initialize pDev.
References _DMXLocalInitInfo::focusClass, _DMXLocalInitInfo::force, _DMXLocalInitInfo::kbdFeedbackClass, kbdUSBGetMap(), _DMXLocalInitInfo::keyboard, _DMXLocalInitInfo::keyClass, _DMXLocalInitInfo::keySyms, _DMXLocalInitInfo::modMap, and _DMXLocalInitInfo::names.
|
static |
References GLYPHS_PER_KEY, map, MAX_KEYCODE, MIN_KEYCODE, and NUM_KEYCODES.
Referenced by kbdUSBGetInfo().
void kbdUSBInit | ( | DevicePtr | pDev | ) |
|
static |
References _myPrivate::kbdState, and NUM_STATE_ENTRIES.
Referenced by kbdUSBConvert().
|
static |
References _myPrivate::kbdState, and NUM_STATE_ENTRIES.
Referenced by kbdUSBConvert().
int kbdUSBOn | ( | DevicePtr | pDev | ) |
Turn pDev on (i.e., take input from pDev).
References GETPRIV, and kbdUSBInit().
void kbdUSBRead | ( | DevicePtr | pDev, |
MOTIONPROC | motion, | ||
ENQUEUEPROC | enqueue, | ||
CHECKPROC | checkspecial, | ||
BLOCK | block | ||
) |
Read an event from the pDev device. If the event is a motion event, enqueue it with the motion function. Otherwise, check for special keys with the checkspecial function and enqueue the event with the enqueue function. The block type is passed to the functions so that they may block SIGIO handling as appropriate to the caller of this function.
References GETPRIV, kbdUSBConvert(), and LOG3.
|
static |
Referenced by kbdLinuxGetMap(), kbdLinuxReadKernelMapping(), and kbdUSBGetMap().