From owner-svn-src-all@FreeBSD.ORG Mon Aug 3 18:50:06 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83CFA1065678; Mon, 3 Aug 2009 18:50:06 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from mail.icecube.wisc.edu (trout.icecube.wisc.edu [128.104.255.119]) by mx1.freebsd.org (Postfix) with ESMTP id CF3158FC13; Mon, 3 Aug 2009 18:50:05 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.icecube.wisc.edu (Postfix) with ESMTP id 1D58A5829B; Mon, 3 Aug 2009 13:50:05 -0500 (CDT) X-Virus-Scanned: amavisd-new at icecube.wisc.edu Received: from mail.icecube.wisc.edu ([127.0.0.1]) by localhost (trout.icecube.wisc.edu [127.0.0.1]) (amavisd-new, port 10030) with ESMTP id cn-EU+qqfkxY; Mon, 3 Aug 2009 13:50:05 -0500 (CDT) Received: from wanderer.tachypleus.net (i3-dhcp-172-16-223-208.icecube.wisc.edu [172.16.223.208]) by mail.icecube.wisc.edu (Postfix) with ESMTP id 4B76A5829D; Mon, 3 Aug 2009 13:50:03 -0500 (CDT) Message-ID: <4A77315A.3050606@freebsd.org> Date: Mon, 03 Aug 2009 13:50:02 -0500 From: Nathan Whitehorn User-Agent: Thunderbird 2.0.0.22 (X11/20090731) MIME-Version: 1.0 To: Hans Petter Selasky References: <20090802192902.GS47463@elvis.mu.org> <20090803.012206.1492586399.imp@bsdimp.com> <20090804032402.J21599@delplex.bde.org> <200908032033.08169.hselasky@c2i.net> In-Reply-To: <200908032033.08169.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, Bruce Evans , svn-src-all@freebsd.org, alfred@freebsd.org, rwatson@freebsd.org, nparhar@gmail.com, svn-src-head@freebsd.org, "M. Warner Losh" Subject: Re: svn commit: r195960 - in head/sys/dev/usb: . controller input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 18:50:07 -0000 Hans Petter Selasky wrote: > On Monday 03 August 2009 19:46:16 Bruce Evans wrote: > >> On Mon, 3 Aug 2009, M. Warner Losh wrote: >> >>> In message: <200908030827.21108.hselasky@c2i.net> >>> >>> : I see two solutions: >>> : >>> : 1) Disable the timekeeping if no keys are pressed. >>> : >>> : 2) Second option is to use getmicrotime. Actually what I need is just a >>> : millisecond time reference so I know when to repeat the last key. >>> : >>> : Any opinions? DELAY() or getmicrotime() ? >>> >> DELAY(1) is somewhet usable. >> > > I think DELAY(1) is not accurate enough. > > I suggest that the DELAY(1000) is only active while a key is actually pressed. > > See attached patch. Please test and report back. > Having recently written a keyboard driver, it is silly that the keyboard driver itself has to handle key repeat at all -- this kind of thing should be in the general kdb driver, along with AT KBD scancode emulation. Of the four keyboard drivers currently in the tree, three (sunkbd, akbd, ukbd) have a huge amount of code copied and pasted between them in order to emulate an AT keyboard, which are becoming less and less common. -Nathan