kern/93738: ukbd_check_char returns FALSE with character buffered
Norbert Koch
nkoch at demig.de
Thu Feb 23 01:30:10 PST 2006
>Number: 93738
>Category: kern
>Synopsis: ukbd_check_char returns FALSE with character buffered
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Feb 23 09:30:08 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Norbert Koch
>Release: RELENG-4/RELENG-6
>Organization:
>Environment:
>Description:
When playing around with kbdmux I found scan codes coming from
my (secondary) usb keyboard mixed with those coming from
my primary keyboard.
An Example:
1. Numpad-Enter on the usb keyboard
2. ESC on the ps/2 keyboard
3. Numpad-Enter on the usb keyboard
This results in the following sequence:
E0 1C E0 01 81 9C E0 1C E0
++++++++ +++++ ++ ++++++++
| | | |
| | | 2nd Numpad-Enter withount break code
| | |
| | break code for 1st Numpad-Enter
| |
| break/make for ESC
|
1st Numpad-Enter without break code
The problem is in ukbd_check_char() which is different
from ukbd_check() in not testing ks_buffered[0].
This leads to ukbd returning the missing break code with
the next key pressed on the usb keyboard.
This obviously results in a lot of trouble with kbdmux.
I managed to have the Xserver returning a permanent
state of ctrl key pressed.
>How-To-Repeat:
>Fix:
This patch is against current.
--- ukbd.c.orig Thu Feb 23 09:48:44 2006
+++ ukbd.c Thu Feb 23 09:55:00 2006
@@ -1143,6 +1143,10 @@
if (!KBD_IS_ACTIVE(kbd))
return FALSE;
state = (ukbd_state_t *)kbd->kb_data;
+#ifdef UKBD_EMULATE_ATSCANCODE
+ if (state->ks_buffered_char[0])
+ return TRUE;
+#endif
if (!(state->ks_flags & COMPOSE) && (state->ks_composed_char > 0))
return TRUE;
if (state->ks_inputs > 0)
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list