Date: Thu, 23 Feb 2006 09:29:16 GMT From: Norbert Koch <nkoch@demig.de> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/93738: ukbd_check_char returns FALSE with character buffered Message-ID: <200602230929.k1N9TG5M075036@www.freebsd.org> Resent-Message-ID: <200602230930.k1N9U9EP096695@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602230929.k1N9TG5M075036>