From owner-freebsd-drivers@FreeBSD.ORG Tue Aug 25 05:02:38 2009 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84B03106568C for ; Tue, 25 Aug 2009 05:02:38 +0000 (UTC) (envelope-from henry.hu.sh@gmail.com) Received: from mail-qy0-f187.google.com (mail-qy0-f187.google.com [209.85.221.187]) by mx1.freebsd.org (Postfix) with ESMTP id 3B06D8FC18 for ; Tue, 25 Aug 2009 05:02:37 +0000 (UTC) Received: by qyk17 with SMTP id 17so224394qyk.7 for ; Mon, 24 Aug 2009 22:02:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=lALqlnNk55wJhwNPchkhsjYgLi9NzbQfLNTvPr1Nxvs=; b=ST4oi4XuzMx7VD8mBsaQY8WUajOdQ9kZLRbX5DpE7pQOUlD/hkKgNYhq0W3Lm9BrUr MfUofKNG6tOA2irFVJwmnIyKhHCNDEGOwclBH+T+rDZKV59XTUU3GOPcIR1b1/upvEW/ 1bryM2Gyt4ZmNLBeWDNCiAaLfNdtLsSAN/lCE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=izYLA28FhCP5LfbGGNggzYmUUpBKurLj8+3emCO0/Ans2EaOuDyllk4SL/UJTAxfLu oUJryOcLJRXEgCWS4rB1YRGHCnZ9EGNol31VP7Mvtb8s15PyYRCdULnfb8z3NlUxWHG6 sqFYh9Nssce4JjBz0s8AvKjuTbjxdmr/KEBFs= MIME-Version: 1.0 Received: by 10.229.69.83 with SMTP id y19mr1203393qci.50.1251176557415; Mon, 24 Aug 2009 22:02:37 -0700 (PDT) In-Reply-To: <5cd4c4cd0908232210p61f1b56aw660aad2bb4e53fbb@mail.gmail.com> References: <5cd4c4cd0908221713y5d396946h5e4000ee11a48e0c@mail.gmail.com> <200908230216.CAA12582@sopwith.solgatos.com> <53a1e0710908222309x78b04000t40e31fbee495355c@mail.gmail.com> <5cd4c4cd0908232210p61f1b56aw660aad2bb4e53fbb@mail.gmail.com> Date: Tue, 25 Aug 2009 13:02:37 +0800 Message-ID: <53a1e0710908242202n1345eb1fj53a7a2bf1d3672f@mail.gmail.com> From: Henry Hu To: Israel Jacques Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-drivers@freebsd.org Subject: Re: Dell USB keyboard X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Aug 2009 05:02:38 -0000 On Mon, Aug 24, 2009 at 1:10 PM, Israel Jacques wrote: > I have the following in my ~/.xmodmaprc: > > keycode 234 =3D XF86Back > keycode 233 =3D XF86Forward > keycode 232 =3D XF86Stop > keycode 231 =3D XF86Refresh > keycode 130 =3D XF86HomePage > keycode 236 =3D XF86Mail > keycode 198 =3D XF86MyComputer > keycode 161 =3D XF86Calculator > keycode 160 =3D XF86AudioMute > keycode 164 =3D XF86AudioStop > keycode 144 =3D XF86AudioPrev > keycode 153 =3D XF86AudioNext > keycode 162 =3D XF86AudioPlay > keycode 129 =3D XF86AudioMedia > keycode 174 =3D XF86AudioLowerVolume > keycode 176 =3D XF86AudioRaiseVolume > > And it doesn't work with my WM. If the messages of the multimedia keys are sent through the uhid device, then you need to write a configuration file for the usbhidaction, specify the keys and corresponding commands, and run usbhidaction when keyboard inserted. Can you see anything when a key is pressed with usbhidctl -alrv -f /dev/uhi= d0 ? > > Thanks for the tip. > > So far, I ran (as root): > > # usbhidctl -anrv -f /dev/uhid0 > Report descriptor: > Total =A0 input size 0 bytes > Total =A0output size 1 bytes > Total feature size 1 bytes > > On Sat, Aug 22, 2009 at 11:09 PM, Henry Hu wrote: >> On Sun, Aug 23, 2009 at 10:16 AM, Dieter w= rote: >>>> My question is, how do I go about writing a userland application to >>>> access the extra buttons? Would I have to use ioctl(2) to poll >>>> /dev/ukbd0? I would like to write the userland application in order to >>>> map them to: >>>> XF86Back >>> ... >>>> XF86AudioRaiseVolume >>>> >>>> Any suggestions? >>> >>> Can xmodmap(1) do what you need? =A0Appears to be in ports. >>> _______________________________________________ >>> freebsd-drivers@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-drivers >>> To unsubscribe, send any mail to "freebsd-drivers-unsubscribe@freebsd.o= rg" >>> >> You might try usbhidaction and usbhidctl on the uhid device. >> Once I was using a microsoft keyboard, and I hacked the programs a >> bit, and wrote a configuration file for usbhidaction, and finally I >> can use the multimedia keys. >> These programs have problems parsing the Report ID field. You might >> have to refer to the HID standard to modify them a bit. >> >> Good luck. >> > _______________________________________________ > freebsd-drivers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-drivers > To unsubscribe, send any mail to "freebsd-drivers-unsubscribe@freebsd.org= " >