From owner-freebsd-usb@FreeBSD.ORG Tue Aug 20 12:00:02 2013 Return-Path: Delivered-To: freebsd-usb@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 82E5E32D for ; Tue, 20 Aug 2013 12:00:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7131E2928 for ; Tue, 20 Aug 2013 12:00:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r7KC01pp024736 for ; Tue, 20 Aug 2013 12:00:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r7KC017r024735; Tue, 20 Aug 2013 12:00:01 GMT (envelope-from gnats) Date: Tue, 20 Aug 2013 12:00:01 GMT Message-Id: <201308201200.r7KC017r024735@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org Cc: From: Hans Petter Selasky Subject: Re: usb/181425: USB keyboard with full N-key rollover not working X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Hans Petter Selasky List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 12:00:02 -0000 The following reply was made to PR usb/181425; it has been noted by GNATS. From: Hans Petter Selasky To: Andrey Zholos Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: usb/181425: USB keyboard with full N-key rollover not working Date: Tue, 20 Aug 2013 13:56:13 +0200 Hi, Have you looked into the USB HID specification from USB.org regarding this? I think USB keyboard stuff is explicitly defined. You are right that we don't support more than a few simultaneously pressed keys, and that would reguire a bit more changes in ukbd driver. Instead of applying a quirk, maybe ukbd.c could switch to boot-proto automatically when HIO_VARIABLE is set? It is simply a so-called USB control request. I'm not sure if it is better to use uhidd or ukbd for the purpose you want to use the keyboard. Thank you for your investigation! --HPS > > Ideally I would like to get this keyboard to work in normal protocol > with full rollover for perfectionist reasons, but I guess that would > require too many changes to ukbd.c and introduce overhead for the > majority of keyboards. > > > Patch attached with submission follows: > > --- sys/dev/usb/input/ukbd.c (revision 254515) > +++ sys/dev/usb/input/ukbd.c (working copy) > @@ -1130,8 +1130,12 @@ > HID_USAGE2(HUP_KEYBOARD, 0x00), > hid_input, 0, &sc->sc_loc_events, &flags, > &sc->sc_id_events)) { > - sc->sc_flags |= UKBD_FLAG_EVENTS; > - DPRINTFN(1, "Found keyboard events\n"); > + if (flags & HIO_VARIABLE) > + DPRINTFN(1, "Ignoring key bitmap\n"); > + else { > + sc->sc_flags |= UKBD_FLAG_EVENTS; > + DPRINTFN(1, "Found keyboard events\n"); > + } > } > > /* figure out leds on keyboard */ >