df038663e3
http://www.math.missouri.edu/~stephen/software/bugfix-for-mousekeys for a complete description. Submitted by: Stephen Montgomery-Smith <stephen@math.missouri.edu>
61 lines
1.5 KiB
Plaintext
61 lines
1.5 KiB
Plaintext
--- programs/Xserver/xkb/xkbActions.c-orig Wed Jan 10 19:16:53 2001
|
|
+++ programs/Xserver/xkb/xkbActions.c Fri Jan 19 20:05:55 2001
|
|
@@ -1318,6 +1318,9 @@
|
|
}
|
|
else CoreProcessPointerEvent(xE,dev,count);
|
|
}
|
|
+ else if (keyEvent)
|
|
+ FixKeyState(xE,dev);
|
|
+
|
|
xkbi->prev_state= oldState;
|
|
XkbComputeDerivedState(xkbi);
|
|
keyc->prev_state= keyc->state;
|
|
--- programs/Xserver/dix/events.c-orig Thu Jan 11 16:02:02 2001
|
|
+++ programs/Xserver/dix/events.c Wed Jan 24 19:14:27 2001
|
|
@@ -2784,6 +2784,44 @@
|
|
(*keybd->DeactivateGrab)(keybd);
|
|
}
|
|
|
|
+#ifdef XKB
|
|
+/* This function is used to set the key pressed or key released state -
|
|
+ this is only used when the pressing of keys does not cause
|
|
+ CoreProcessKeyEvent to be called, as in for example Mouse Keys.
|
|
+*/
|
|
+void
|
|
+FixKeyState (xE, keybd)
|
|
+ register xEvent *xE;
|
|
+ register DeviceIntPtr keybd;
|
|
+{
|
|
+ int key, bit;
|
|
+ register BYTE *kptr;
|
|
+ register KeyClassPtr keyc = keybd->key;
|
|
+
|
|
+ key = xE->u.u.detail;
|
|
+ kptr = &keyc->down[key >> 3];
|
|
+ bit = 1 << (key & 7);
|
|
+#ifdef DEBUG
|
|
+ if ((xkbDebugFlags&0x4)&&
|
|
+ ((xE->u.u.type==KeyPress)||(xE->u.u.type==KeyRelease))) {
|
|
+ ErrorF("FixKeyState: Key %d %s\n",key,
|
|
+ (xE->u.u.type==KeyPress?"down":"up"));
|
|
+ }
|
|
+#endif
|
|
+ switch (xE->u.u.type)
|
|
+ {
|
|
+ case KeyPress:
|
|
+ *kptr |= bit;
|
|
+ break;
|
|
+ case KeyRelease:
|
|
+ *kptr &= ~bit;
|
|
+ break;
|
|
+ default:
|
|
+ FatalError("Impossible keyboard event");
|
|
+ }
|
|
+}
|
|
+#endif
|
|
+
|
|
void
|
|
#ifdef XKB
|
|
CoreProcessPointerEvent (xE, mouse, count)
|
|
|