From owner-freebsd-drivers@FreeBSD.ORG Sun Aug 23 00:39:03 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 E5BAE106568C for ; Sun, 23 Aug 2009 00:39:03 +0000 (UTC) (envelope-from mrkotfw@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.250]) by mx1.freebsd.org (Postfix) with ESMTP id A3DA38FC0C for ; Sun, 23 Aug 2009 00:39:03 +0000 (UTC) Received: by an-out-0708.google.com with SMTP id d14so505556and.13 for ; Sat, 22 Aug 2009 17:39:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=TvGz6AuGtuNOQieV52KxRJNqkPYNWjYy5NkmjBZOpz8=; b=V2ygQIkE3teoHQJLuH6tI9sSG1O35w6q0fJ2iaE7oC5HIrWM4ixvlwlnSNBsnNEoLg HLtbaR2kG0JC2IfZstPxwtbp/VQ+xaLePX7ajqdXvcidEN2j4h5dzh4sxRXEXbt6L+mk p+KfUmeGBf/WSkDkk9OyvJyP45IM5LFjcncxY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=u0fAfAMqpe+txsglcqHuLHhvOmVoTwPfnQw9WgM/yqqrCZbjneNfs6PXhOwCEUOIVQ 060uBHyc/x8iHPy41rUW0nZ2Kdql3/1Ka4+W1q6/jvcf88+k7NGa6ZOAvOyV3P1QFk4f Posw31hDF0q19S/1OX7uoB7BJwNzvRqvBSdPM= MIME-Version: 1.0 Received: by 10.101.39.6 with SMTP id r6mr2870372anj.166.1250986421301; Sat, 22 Aug 2009 17:13:41 -0700 (PDT) Date: Sat, 22 Aug 2009 17:13:41 -0700 Message-ID: <5cd4c4cd0908221713y5d396946h5e4000ee11a48e0c@mail.gmail.com> From: Israel Jacques To: freebsd-drivers@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: 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: Sun, 23 Aug 2009 00:39:04 -0000 Hello all. I have the following keyboard: http://support.dell.com/support/edocs/acc/P76379/sk8135.jpg and I would like to add support for the hot keys and the multimedia buttons including the knob. dmesg: uhub1: on uhub0 uhub1: 3 ports with 2 removable, bus powered ukbd0: on uhub1 kbd2 at ukbd0 uhid0: on uhub1 usbdevs -v: port 2 addr 3: full speed, power 100 mA, config 1, Dell USB Keyboard Hub(0x1003), Dell(0x413c), rev 2.00 port 1 addr 4: full speed, power 50 mA, config 1, Dell USB Keyboard(0x2010), Dell(0x413c), rev 2.00 I tried xev and nothing worked. 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 XF86Forward XF86Stop XF86Refresh XF86HomePage XF86Mail XF86MyComputer XF86Calculator XF86AudioMute XF86AudioStop XF86AudioPrev XF86AudioNext XF86AudioPlay XF86AudioLowerVolume XF86AudioRaiseVolume Any suggestions? From owner-freebsd-drivers@FreeBSD.ORG Sun Aug 23 04:20:04 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 1A89A106568F for ; Sun, 23 Aug 2009 04:20:04 +0000 (UTC) (envelope-from freebsd@sopwith.solgatos.com) Received: from sopwith.solgatos.com (pool-96-225-217-247.ptldor.fios.verizon.net [96.225.217.247]) by mx1.freebsd.org (Postfix) with ESMTP id 9BAED8FC0C for ; Sun, 23 Aug 2009 04:20:03 +0000 (UTC) Received: by sopwith.solgatos.com (Postfix, from userid 66) id 99B42B64F; Sat, 22 Aug 2009 20:27:02 -0700 (PDT) Received: from localhost by sopwith.solgatos.com (8.8.8/6.24) id CAA12582; Sun, 23 Aug 2009 02:16:37 GMT Message-Id: <200908230216.CAA12582@sopwith.solgatos.com> To: freebsd-drivers@freebsd.org In-reply-to: Your message of "Sat, 22 Aug 2009 17:13:41 PDT." <5cd4c4cd0908221713y5d396946h5e4000ee11a48e0c@mail.gmail.com> Date: Sat, 22 Aug 2009 19:16:37 PDT From: Dieter 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: Sun, 23 Aug 2009 04:20:04 -0000 > 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? Appears to be in ports. From owner-freebsd-drivers@FreeBSD.ORG Sun Aug 23 06:32:16 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 7D30C106568D for ; Sun, 23 Aug 2009 06:32:16 +0000 (UTC) (envelope-from henry.hu.sh@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26]) by mx1.freebsd.org (Postfix) with ESMTP id 389228FC0A for ; Sun, 23 Aug 2009 06:32:16 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 3so964366qwe.7 for ; Sat, 22 Aug 2009 23:32:15 -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=r4Mv1+1/3mBt8q6fDy43FLS1PulZLeLUruYDqqTAWzw=; b=E186+Za37f+CJTp6ncscR28DPnuQBQa80OKcuEuqswH9ONrumkNC3BT0VQsVMkQvHn 6t9RS1TtZJeo+MOtYPqkXoU63v4GH73RUmDqFS2BYt1X6EpisrPQlY8dmgWqcZBNn8RL 5AR/0MXEBRe0SCC+9JHq5jMW0pY1EctXsdtvQ= 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=TRMX3ID2nQZSueVhnQg2Avu3Kv3IBtfhAjwA31o0odAnt0T17rxT0wV49s+N2DKgen eODCLqWZBHIOW5qdCbsnYHNigjvaVlDzuikeYl3a7e66wYw73P1uzi8MGCziQmc1OX09 poECSdXID1CmMEVBOSU1m7LQ+4EXscop8DJ9c= MIME-Version: 1.0 Received: by 10.229.32.148 with SMTP id c20mr675463qcd.52.1251007746643; Sat, 22 Aug 2009 23:09:06 -0700 (PDT) In-Reply-To: <200908230216.CAA12582@sopwith.solgatos.com> References: <5cd4c4cd0908221713y5d396946h5e4000ee11a48e0c@mail.gmail.com> <200908230216.CAA12582@sopwith.solgatos.com> Date: Sun, 23 Aug 2009 14:09:06 +0800 Message-ID: <53a1e0710908222309x78b04000t40e31fbee495355c@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: Sun, 23 Aug 2009 06:32:16 -0000 On Sun, Aug 23, 2009 at 10:16 AM, Dieter wrot= e: >> 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.org= " > 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. From owner-freebsd-drivers@FreeBSD.ORG Mon Aug 24 05:10:34 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 44AB110656C6 for ; Mon, 24 Aug 2009 05:10:34 +0000 (UTC) (envelope-from mrkotfw@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.251]) by mx1.freebsd.org (Postfix) with ESMTP id F38368FC23 for ; Mon, 24 Aug 2009 05:10:33 +0000 (UTC) Received: by an-out-0708.google.com with SMTP id d14so662587and.13 for ; Sun, 23 Aug 2009 22:10:33 -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:content-type :content-transfer-encoding; bh=0owY+YIe4+Xv86sB8h0vmAjU96gqTGMKcsmLYViBKYI=; b=v25H56J+KIPNnh8Hwp/Pfk0zhqE+cTZt6+4GfBPoTHeNIS0XiJlzagNQtCKlE22jkr qIxhW2xQ54xbUAaxWSyk69Xda93iJNzYBCTSf5ltlX+MxdDfnmj1NGAYE4nfI8A4oox3 zyF6jI4taq3jBu0jl9/alFFw0eLlGh0oUHY4k= 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 :content-type:content-transfer-encoding; b=nsVnV2aTrKmvKBvKqU1gPQ4KBCbEaw2TRgwsIgZt/A6iTfT+O4U9rMPIRP5EEsJaJ9 4FSKxV7TFBUBRjh8eUaqQXP3nhcLAdcYfn6WbJsuzLdrKxSWMJbtXRuPR6tqlyFL2Dr7 61F06FjiEJOQg6gSDCvlz2U8yMifC+GPnlMEU= MIME-Version: 1.0 Received: by 10.100.40.2 with SMTP id n2mr4097333ann.7.1251090633274; Sun, 23 Aug 2009 22:10:33 -0700 (PDT) In-Reply-To: <53a1e0710908222309x78b04000t40e31fbee495355c@mail.gmail.com> References: <5cd4c4cd0908221713y5d396946h5e4000ee11a48e0c@mail.gmail.com> <200908230216.CAA12582@sopwith.solgatos.com> <53a1e0710908222309x78b04000t40e31fbee495355c@mail.gmail.com> Date: Sun, 23 Aug 2009 22:10:32 -0700 Message-ID: <5cd4c4cd0908232210p61f1b56aw660aad2bb4e53fbb@mail.gmail.com> From: Israel Jacques To: freebsd-drivers@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: Mon, 24 Aug 2009 05:10:34 -0000 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. Thanks for the tip. So far, I ran (as root): # usbhidctl -anrv -f /dev/uhid0 Report descriptor: Total input size 0 bytes Total output 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 wr= ote: >>> 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? =C2=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.or= g" >> > 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. > 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= " > From owner-freebsd-drivers@FreeBSD.ORG Tue Aug 25 06:03:13 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 B4211106568B for ; Tue, 25 Aug 2009 06:03:13 +0000 (UTC) (envelope-from mrkotfw@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.251]) by mx1.freebsd.org (Postfix) with ESMTP id 6BE448FC1A for ; Tue, 25 Aug 2009 06:03:13 +0000 (UTC) Received: by an-out-0708.google.com with SMTP id d14so988577and.13 for ; Mon, 24 Aug 2009 23:03:12 -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:content-type :content-transfer-encoding; bh=pFWhPNzmR8lPOjN6h0mZLzDarweEdf4ZcnG8Dsv5dqc=; b=Mno1+o74ebtCcamcmGUQ/T4xu/b6G8YQW257A2mPJOIV5jPMUXlmqAD4wk3B4jQMDA /XzRDQ7zpZpB5dfsv+GBZY5UPgQx8sQvXR/2b7MUDzmrnTU7clMWLftax8a14l31Wy6q VPfpiLik8YzoOLPP2zFZsfMcLXCULkhcNtppg= 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 :content-type:content-transfer-encoding; b=qjZMNzHQrD0+aJC8hb1Kax7qgIto6aCeXKzgVcOvLRxQfJu57rZ9Gk0g8flTI9HKLd DndX+ztE48c38N+dEtXkJhKR1/efL+Dv1/vrHip+OcplFRqjgEZvkHRQ6vIU7uO4/Uab 15QN0CaqWUDk5hGMlkJE7QOcddoVmtAjnH68s= MIME-Version: 1.0 Received: by 10.101.49.11 with SMTP id b11mr5445320ank.121.1251180192592; Mon, 24 Aug 2009 23:03:12 -0700 (PDT) In-Reply-To: <53a1e0710908242202n1345eb1fj53a7a2bf1d3672f@mail.gmail.com> References: <5cd4c4cd0908221713y5d396946h5e4000ee11a48e0c@mail.gmail.com> <200908230216.CAA12582@sopwith.solgatos.com> <53a1e0710908222309x78b04000t40e31fbee495355c@mail.gmail.com> <5cd4c4cd0908232210p61f1b56aw660aad2bb4e53fbb@mail.gmail.com> <53a1e0710908242202n1345eb1fj53a7a2bf1d3672f@mail.gmail.com> Date: Mon, 24 Aug 2009 23:03:12 -0700 Message-ID: <5cd4c4cd0908242303q16031125m62d1122f7a024bd2@mail.gmail.com> From: Israel Jacques To: freebsd-drivers@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 06:03:13 -0000 Hi Henry. After about a minute of running: usbhidctl -alrv -f /dev/uhid0 > dump, I ge= t: 00000000 52 65 70 6f 72 74 20 64 65 73 63 72 69 70 74 6f |Report descrip= to| 00000010 72 3a 0a 54 6f 74 61 6c 20 20 20 69 6e 70 75 74 |r:.Total inp= ut| 00000020 20 73 69 7a 65 20 30 20 62 79 74 65 73 0a 54 6f | size 0 bytes.= To| 00000030 74 61 6c 20 20 6f 75 74 70 75 74 20 73 69 7a 65 |tal output si= ze| 00000040 20 31 20 62 79 74 65 73 0a 54 6f 74 61 6c 20 66 | 1 bytes.Total= f| 00000050 65 61 74 75 72 65 20 73 69 7a 65 20 31 20 62 79 |eature size 1 = by| 00000060 74 65 73 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a |tes...........= ..| 00000070 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a |..............= ..| * 0b675000 There is an option in the BIOS that allows me to disable BIOS support for USB. I'll reboot and report back on whether or not it makes a difference. As with usbhidaction, I'm assuming I would need to be able to get output from /dev/uhid0 in order to write a configuration file. Correct? On Mon, Aug 24, 2009 at 10:02 PM, Henry Hu wrote: > 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/u= hid0 ? >> >> Thanks for the tip. >> >> So far, I ran (as root): >> >> # usbhidctl -anrv -f /dev/uhid0 >> Report descriptor: >> Total =C2=A0 input size 0 bytes >> Total =C2=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 = wrote: >>>>> 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 t= o >>>>> map them to: >>>>> XF86Back >>>> ... >>>>> XF86AudioRaiseVolume >>>>> >>>>> Any suggestions? >>>> >>>> Can xmodmap(1) do what you need? =C2=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.= org" >>>> >>> 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.or= g" >> > From owner-freebsd-drivers@FreeBSD.ORG Tue Aug 25 07:51:37 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 AE57D1065697 for ; Tue, 25 Aug 2009 07:51:37 +0000 (UTC) (envelope-from henry.hu.sh@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.27]) by mx1.freebsd.org (Postfix) with ESMTP id 644118FC1C for ; Tue, 25 Aug 2009 07:51:36 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 3so1576138qwe.7 for ; Tue, 25 Aug 2009 00:51:36 -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=/785OjaN4dB1+KjJX5vkzVFt+RDdx/zyadr8n1dtsFo=; b=jJg9Zas9qdJzvYhjvyHT4/kthWFoaVFkp9HKhwgvGT9xoHyD9yCJSIyJYSkPBLJ2wW cAR8tamXtxEH/v2lzEWkUZP5fsnGBh77WUYnIShc1K1V1xC7Bx/Ya4WMSSMwx1TwttlR HLwRnNMgBC6AYxCexjwPxgIK2+Vj898o3KNZ0= 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=VFZZAMOmmaiJIHqValIALQlWqSxEXwLlyqB/duNoJKrg5gyfP3HfB9dkkxe+eiYNAV t02byrknd4XGgJ7zcm6KNfFjhK+C0SvhJ2gU3wAO3xLv93ThHalNsfuV2uowJCEA633v WMlzZSrx8NJmfZwV4DRBdpeUVaQca5DHGciiQ= MIME-Version: 1.0 Received: by 10.229.106.83 with SMTP id w19mr1278080qco.72.1251186696794; Tue, 25 Aug 2009 00:51:36 -0700 (PDT) In-Reply-To: <5cd4c4cd0908242303q16031125m62d1122f7a024bd2@mail.gmail.com> References: <5cd4c4cd0908221713y5d396946h5e4000ee11a48e0c@mail.gmail.com> <200908230216.CAA12582@sopwith.solgatos.com> <53a1e0710908222309x78b04000t40e31fbee495355c@mail.gmail.com> <5cd4c4cd0908232210p61f1b56aw660aad2bb4e53fbb@mail.gmail.com> <53a1e0710908242202n1345eb1fj53a7a2bf1d3672f@mail.gmail.com> <5cd4c4cd0908242303q16031125m62d1122f7a024bd2@mail.gmail.com> Date: Tue, 25 Aug 2009 15:51:36 +0800 Message-ID: <53a1e0710908250051k297cff18l25daeb1e27656ac5@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 07:51:37 -0000 On Tue, Aug 25, 2009 at 2:03 PM, Israel Jacques wrote: > Hi Henry. > > After about a minute of running: usbhidctl -alrv -f /dev/uhid0 > dump, I = get: > 00000000 =A052 65 70 6f 72 74 20 64 =A065 73 63 72 69 70 74 6f =A0|Report= descripto| > 00000010 =A072 3a 0a 54 6f 74 61 6c =A020 20 20 69 6e 70 75 74 =A0|r:.Tot= al =A0 input| > 00000020 =A020 73 69 7a 65 20 30 20 =A062 79 74 65 73 0a 54 6f =A0| size = 0 bytes.To| > 00000030 =A074 61 6c 20 20 6f 75 74 =A070 75 74 20 73 69 7a 65 =A0|tal = =A0output size| > 00000040 =A020 31 20 62 79 74 65 73 =A00a 54 6f 74 61 6c 20 66 =A0| 1 byt= es.Total f| > 00000050 =A065 61 74 75 72 65 20 73 =A069 7a 65 20 31 20 62 79 =A0|eature= size 1 by| > 00000060 =A074 65 73 0a 0a 0a 0a 0a =A00a 0a 0a 0a 0a 0a 0a 0a =A0|tes...= ..........| > 00000070 =A00a 0a 0a 0a 0a 0a 0a 0a =A00a 0a 0a 0a 0a 0a 0a 0a =A0|......= ..........| > * > 0b675000 > > There is an option in the BIOS that allows me to disable BIOS support > for USB. I'll reboot and report back on whether or not it makes a > difference. > > As with usbhidaction, I'm assuming I would need to be able to get > output from /dev/uhid0 in order to write a configuration file. > Correct? I'm sorry. After googling more, I find out that most multimedia keys are sent through the normal keyboard device, it seems like only the volume control information is sent through other devices. So if you run xev, and press the multimedia keys, you would see these keycodes, right? Which WM are you using? For compiz, you may specify the program to run in the CCSM. I'm not familiar with metacity, but I know at least you may specify it in gconf-editor. > > On Mon, Aug 24, 2009 at 10:02 PM, Henry Hu wrote: >> 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/= uhid0 ? >>> >>> 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= wrote: >>>>>> 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= .org" >>>>> >>>> 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.o= rg" >>> >> > _______________________________________________ > 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= " > From owner-freebsd-drivers@FreeBSD.ORG Tue Aug 25 16:32:21 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 689DC1065672 for ; Tue, 25 Aug 2009 16:32:21 +0000 (UTC) (envelope-from mrkotfw@gmail.com) Received: from mail-yw0-f202.google.com (mail-yw0-f202.google.com [209.85.211.202]) by mx1.freebsd.org (Postfix) with ESMTP id 03B718FC1A for ; Tue, 25 Aug 2009 16:32:20 +0000 (UTC) Received: by ywh40 with SMTP id 40so4916954ywh.14 for ; Tue, 25 Aug 2009 09:32:20 -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=Jk1EyWxq5SPQb55/5IwHrclLcQLIUKtFYbkNMVHCBts=; b=oslO+TKSfkDztYHuDVDkObPskwBqaGONWj+S2wbm5N66UqOQ9lxtK9ivG2ImEYeFQr Enppy8iD4k7PI9j0W8e5XCjUOVwbUMF5PWjS7Pgx+42HNPxH3Xtx3zbqHfqzdbTWeMb6 2uNvxk60LluG0Sgy5bx/GB81gwnJluW54DHcI= 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=e2SYlEXuQqbNFKhPszv0MILmt6SSiKasGqRPSZbbOSdZc9b5hXlgnk1MWj1QWu8v6C icXWZCqiEmierlA6hZMHHrgtywQK98mkUSQ2zqode5yWZuG87Ogc4i2tsYxqmSMIrW4g t8qjHWemSR5FlXoElKL2hdvB21UfJS2rlEXds= MIME-Version: 1.0 Received: by 10.101.62.13 with SMTP id p13mr6362344ank.25.1251217940136; Tue, 25 Aug 2009 09:32:20 -0700 (PDT) In-Reply-To: <53a1e0710908250051k297cff18l25daeb1e27656ac5@mail.gmail.com> References: <5cd4c4cd0908221713y5d396946h5e4000ee11a48e0c@mail.gmail.com> <200908230216.CAA12582@sopwith.solgatos.com> <53a1e0710908222309x78b04000t40e31fbee495355c@mail.gmail.com> <5cd4c4cd0908232210p61f1b56aw660aad2bb4e53fbb@mail.gmail.com> <53a1e0710908242202n1345eb1fj53a7a2bf1d3672f@mail.gmail.com> <5cd4c4cd0908242303q16031125m62d1122f7a024bd2@mail.gmail.com> <53a1e0710908250051k297cff18l25daeb1e27656ac5@mail.gmail.com> Date: Tue, 25 Aug 2009 09:32:19 -0700 Message-ID: <5cd4c4cd0908250932o10abd2d0n32a3425c1e1f5fca@mail.gmail.com> From: Israel Jacques To: Henry Hu Content-Type: text/plain; charset=UTF-8 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 16:32:21 -0000 Hello. Yeah, I'm starting to see that. Well, It's a good thing. At least there is a difference between the volume knob and the keyboard. Maybe usbhidctl isn't what I need since I receive no output. I use Openbox as my WM. Using xev with or without LinEAK still produces no results. I just tried running lineakd and no go. The keyboard is indeed supported by LinEAK, but I get no output. At first, I was getting Xlib errors but after restarting it stopped. This is very odd. I did try: Section "InputDevice" Identifier "Keyboard" Driver "kbd" Option "XkbLayout" "dvorak,us" Option "XkbOptions" "grp:alt_caps_toggle" Option "XkbModel" "pc104" Option "XkbRules" "dellsk8125" Option "CustomKeycodes" "False" EndSection The settings above gets me: (**) Option "CoreKeyboard" (**) Keyboard: always reports core events (**) Option "Protocol" "standard" (**) Keyboard: Protocol: standard (**) Option "AutoRepeat" "500 30" (**) Option "XkbRules" "dellsk8125" (**) Keyboard: XkbRules: "dellsk8125" (**) Option "XkbModel" "pc104" (**) Keyboard: XkbModel: "pc104" (**) Option "XkbLayout" "dvorak,us" (**) Keyboard: XkbLayout: "dvorak,us" (**) Option "XkbOptions" "grp:alt_caps_toggle" (**) Keyboard: XkbOptions: "grp:alt_caps_toggle" (**) Option "CustomKeycodes" "False" (**) Keyboard: CustomKeycodes disabled (II) XINPUT: Adding extended input device "Keyboard" (type: KEYBOARD) (EE) XKB: Couldn't open rules file /usr/local/share/X11/xkb/rules/dellsk812= 5 (EE) XKB: No components provided for device Keyboard (WW) Couldn't load XKB keymap, falling back to pre-XKB keymap Apparently I don't know what device X.org is using. I tried the following (Option "Device" "/dev/foo" after calling ls /dev/*kbd*): /dev/atkbd0 /dev/kbd0 /dev/kbd1 /dev/kbd2 /dev/kbdmux0 /dev/ukbd0 Which none worked. Could the only solution be to use a USB to PS/2 adapter or to simply hack away at the ukbd(4) driver? Since X.org doesn't use any of the devices, what could it be using? On Tue, Aug 25, 2009 at 12:51 AM, Henry Hu wrote: > On Tue, Aug 25, 2009 at 2:03 PM, Israel Jacques wrote: >> Hi Henry. >> >> After about a minute of running: usbhidctl -alrv -f /dev/uhid0 > dump, I= get: >> 00000000 =C2=A052 65 70 6f 72 74 20 64 =C2=A065 73 63 72 69 70 74 6f =C2= =A0|Report descripto| >> 00000010 =C2=A072 3a 0a 54 6f 74 61 6c =C2=A020 20 20 69 6e 70 75 74 =C2= =A0|r:.Total =C2=A0 input| >> 00000020 =C2=A020 73 69 7a 65 20 30 20 =C2=A062 79 74 65 73 0a 54 6f =C2= =A0| size 0 bytes.To| >> 00000030 =C2=A074 61 6c 20 20 6f 75 74 =C2=A070 75 74 20 73 69 7a 65 =C2= =A0|tal =C2=A0output size| >> 00000040 =C2=A020 31 20 62 79 74 65 73 =C2=A00a 54 6f 74 61 6c 20 66 =C2= =A0| 1 bytes.Total f| >> 00000050 =C2=A065 61 74 75 72 65 20 73 =C2=A069 7a 65 20 31 20 62 79 =C2= =A0|eature size 1 by| >> 00000060 =C2=A074 65 73 0a 0a 0a 0a 0a =C2=A00a 0a 0a 0a 0a 0a 0a 0a =C2= =A0|tes.............| >> 00000070 =C2=A00a 0a 0a 0a 0a 0a 0a 0a =C2=A00a 0a 0a 0a 0a 0a 0a 0a =C2= =A0|................| >> * >> 0b675000 >> >> There is an option in the BIOS that allows me to disable BIOS support >> for USB. I'll reboot and report back on whether or not it makes a >> difference. >> >> As with usbhidaction, I'm assuming I would need to be able to get >> output from /dev/uhid0 in order to write a configuration file. >> Correct? > > I'm sorry. After googling more, I find out that most multimedia keys > are sent through the normal keyboard device, it seems like only the > volume control information is sent through other devices. > So if you run xev, and press the multimedia keys, you would see these > keycodes, right? > Which WM are you using? For compiz, you may specify the program to run > in the CCSM. I'm not familiar with metacity, but I know at least you > may specify it in gconf-editor. > >> >> On Mon, Aug 24, 2009 at 10:02 PM, Henry Hu wrote: >>> On Mon, Aug 24, 2009 at 1:10 PM, Israel Jacques wrot= e: >>>> 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= /uhid0 ? >>>> >>>> Thanks for the tip. >>>> >>>> So far, I ran (as root): >>>> >>>> # usbhidctl -anrv -f /dev/uhid0 >>>> Report descriptor: >>>> Total =C2=A0 input size 0 bytes >>>> Total =C2=A0output size 1 bytes >>>> Total feature size 1 bytes >>>> >>>> On Sat, Aug 22, 2009 at 11:09 PM, Henry Hu wrot= e: >>>>> On Sun, Aug 23, 2009 at 10:16 AM, Dieter wrote: >>>>>>> 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? =C2=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@freebs= d.org" >>>>>> >>>>> 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" >>>> >>> >> _______________________________________________ >> freebsd-drivers@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-drivers >> To unsubscribe, send any mail to "freebsd-drivers-unsubscribe@freebsd.or= g" >> > From owner-freebsd-drivers@FreeBSD.ORG Fri Aug 28 07:32:21 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 5174810687F7 for ; Fri, 28 Aug 2009 07:32:21 +0000 (UTC) (envelope-from mrkotfw@gmail.com) Received: from mail-px0-f180.google.com (mail-px0-f180.google.com [209.85.216.180]) by mx1.freebsd.org (Postfix) with ESMTP id 3E74E906D0 for ; Thu, 27 Aug 2009 23:20:35 +0000 (UTC) Received: by pxi10 with SMTP id 10so1533593pxi.28 for ; Thu, 27 Aug 2009 16:20:19 -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=AuUX4ESE5NvKAercgx5kNglsGE2QPbY7YgBJHWsUI00=; b=GTPqEE1XV5wmT65MYXJZfYGqr9Kj7bff+2ys5OCgWG4QpLyO/WdwC+vZxj76o9gaKV 8zASJcEW4rwS4VHSM8Rtmu3JuXUScuPN88CrF8ltZgDXDpDVxh3EciKC4j0szXzXnUal 9e1eV1/2A8ZUWVpPRyNLYTgjJSdBq596c9gI4= 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=pn69NVgEC8L2nb4MDBEBz4Vw/6Z2x6zAjdol5CVNbMTQ9ppFiQee4ZVJ/dLpxMH/Um 8KFCtS95/UDJNaU/cBmYrLqfWJ5jT6mzU/92XgybJSduwA1o7elCbAoN0scxFZd4nnM4 b51jUHvsI4FPoZkXC5SRB4aZBs1k/XG++mDpI= MIME-Version: 1.0 Received: by 10.140.141.17 with SMTP id o17mr262360rvd.155.1251415219060; Thu, 27 Aug 2009 16:20:19 -0700 (PDT) In-Reply-To: <53a1e0710908271101q75f6379fkabec2d3b5776c084@mail.gmail.com> References: <5cd4c4cd0908221713y5d396946h5e4000ee11a48e0c@mail.gmail.com> <200908230216.CAA12582@sopwith.solgatos.com> <53a1e0710908222309x78b04000t40e31fbee495355c@mail.gmail.com> <5cd4c4cd0908232210p61f1b56aw660aad2bb4e53fbb@mail.gmail.com> <53a1e0710908242202n1345eb1fj53a7a2bf1d3672f@mail.gmail.com> <5cd4c4cd0908242303q16031125m62d1122f7a024bd2@mail.gmail.com> <53a1e0710908250051k297cff18l25daeb1e27656ac5@mail.gmail.com> <5cd4c4cd0908250932o10abd2d0n32a3425c1e1f5fca@mail.gmail.com> <53a1e0710908271101q75f6379fkabec2d3b5776c084@mail.gmail.com> Date: Thu, 27 Aug 2009 16:20:19 -0700 Message-ID: <5cd4c4cd0908271620s4339ab3ck1917f3ecba58f253@mail.gmail.com> From: Israel Jacques To: Henry Hu Content-Type: text/plain; charset=UTF-8 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: Fri, 28 Aug 2009 07:32:25 -0000 None whatsoever. It could also be because the ports are legacy USB ports. I'm stumped. What other options do I have? On Thu, Aug 27, 2009 at 11:01 AM, Henry Hu wrote: > Is there any key event when you press the multimedia keys in the xev wind= ow? > > On Wed, Aug 26, 2009 at 12:32 AM, Israel Jacques wrote= : >> Hello. >> Yeah, I'm starting to see that. Well, It's a good thing. At least >> there is a difference between the volume knob and the keyboard. Maybe >> usbhidctl isn't what I need since I receive no output. >> >> I use Openbox as my WM. Using xev with or without LinEAK still >> produces no results. >> >> I just tried running lineakd and no go. The keyboard is indeed >> supported by LinEAK, but I get no output. At first, I was getting Xlib >> errors but after restarting it stopped. >> >> This is very odd. >> >> I did try: >> Section "InputDevice" >> =C2=A0 =C2=A0 =C2=A0 =C2=A0Identifier =C2=A0 "Keyboard" >> =C2=A0 =C2=A0 =C2=A0 =C2=A0Driver =C2=A0 =C2=A0 =C2=A0 "kbd" >> =C2=A0 =C2=A0 =C2=A0 =C2=A0Option =C2=A0 =C2=A0 =C2=A0 "XkbLayout" "dvor= ak,us" >> =C2=A0 =C2=A0 =C2=A0 =C2=A0Option =C2=A0 =C2=A0 =C2=A0 "XkbOptions" "grp= :alt_caps_toggle" >> =C2=A0 =C2=A0 =C2=A0 =C2=A0Option =C2=A0 =C2=A0 =C2=A0 "XkbModel" "pc104= " >> =C2=A0 =C2=A0 =C2=A0 =C2=A0Option =C2=A0 =C2=A0 =C2=A0 "XkbRules" "dells= k8125" >> =C2=A0 =C2=A0 =C2=A0 =C2=A0Option =C2=A0 =C2=A0 =C2=A0 "CustomKeycodes" = "False" >> EndSection >> >> The settings above gets me: >> (**) Option "CoreKeyboard" >> (**) Keyboard: always reports core events >> (**) Option "Protocol" "standard" >> (**) Keyboard: Protocol: standard >> (**) Option "AutoRepeat" "500 30" >> (**) Option "XkbRules" "dellsk8125" >> (**) Keyboard: XkbRules: "dellsk8125" >> (**) Option "XkbModel" "pc104" >> (**) Keyboard: XkbModel: "pc104" >> (**) Option "XkbLayout" "dvorak,us" >> (**) Keyboard: XkbLayout: "dvorak,us" >> (**) Option "XkbOptions" "grp:alt_caps_toggle" >> (**) Keyboard: XkbOptions: "grp:alt_caps_toggle" >> (**) Option "CustomKeycodes" "False" >> (**) Keyboard: CustomKeycodes disabled >> (II) XINPUT: Adding extended input device "Keyboard" (type: KEYBOARD) >> (EE) XKB: Couldn't open rules file /usr/local/share/X11/xkb/rules/dellsk= 8125 >> (EE) XKB: No components provided for device Keyboard >> (WW) Couldn't load XKB keymap, falling back to pre-XKB keymap >> >> Apparently I don't know what device X.org is using. I tried the >> following (Option "Device" "/dev/foo" after calling ls /dev/*kbd*): >> /dev/atkbd0 >> /dev/kbd0 >> /dev/kbd1 >> /dev/kbd2 >> /dev/kbdmux0 >> /dev/ukbd0 >> >> Which none worked. Could the only solution be to use a USB to PS/2 >> adapter or to simply hack away at the ukbd(4) driver? >> >> Since X.org doesn't use any of the devices, what could it be using? >> >> On Tue, Aug 25, 2009 at 12:51 AM, Henry Hu wrote: >>> On Tue, Aug 25, 2009 at 2:03 PM, Israel Jacques wrot= e: >>>> Hi Henry. >>>> >>>> After about a minute of running: usbhidctl -alrv -f /dev/uhid0 > dump,= I get: >>>> 00000000 =C2=A052 65 70 6f 72 74 20 64 =C2=A065 73 63 72 69 70 74 6f = =C2=A0|Report descripto| >>>> 00000010 =C2=A072 3a 0a 54 6f 74 61 6c =C2=A020 20 20 69 6e 70 75 74 = =C2=A0|r:.Total =C2=A0 input| >>>> 00000020 =C2=A020 73 69 7a 65 20 30 20 =C2=A062 79 74 65 73 0a 54 6f = =C2=A0| size 0 bytes.To| >>>> 00000030 =C2=A074 61 6c 20 20 6f 75 74 =C2=A070 75 74 20 73 69 7a 65 = =C2=A0|tal =C2=A0output size| >>>> 00000040 =C2=A020 31 20 62 79 74 65 73 =C2=A00a 54 6f 74 61 6c 20 66 = =C2=A0| 1 bytes.Total f| >>>> 00000050 =C2=A065 61 74 75 72 65 20 73 =C2=A069 7a 65 20 31 20 62 79 = =C2=A0|eature size 1 by| >>>> 00000060 =C2=A074 65 73 0a 0a 0a 0a 0a =C2=A00a 0a 0a 0a 0a 0a 0a 0a = =C2=A0|tes.............| >>>> 00000070 =C2=A00a 0a 0a 0a 0a 0a 0a 0a =C2=A00a 0a 0a 0a 0a 0a 0a 0a = =C2=A0|................| >>>> * >>>> 0b675000 >>>> >>>> There is an option in the BIOS that allows me to disable BIOS support >>>> for USB. I'll reboot and report back on whether or not it makes a >>>> difference. >>>> >>>> As with usbhidaction, I'm assuming I would need to be able to get >>>> output from /dev/uhid0 in order to write a configuration file. >>>> Correct? >>> >>> I'm sorry. After googling more, I find out that most multimedia keys >>> are sent through the normal keyboard device, it seems like only the >>> volume control information is sent through other devices. >>> So if you run xev, and press the multimedia keys, you would see these >>> keycodes, right? >>> Which WM are you using? For compiz, you may specify the program to run >>> in the CCSM. I'm not familiar with metacity, but I know at least you >>> may specify it in gconf-editor. >>> >>>> >>>> On Mon, Aug 24, 2009 at 10:02 PM, Henry Hu wrot= e: >>>>> On Mon, Aug 24, 2009 at 1:10 PM, Israel Jacques wr= ote: >>>>>> 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 /d= ev/uhid0 ? >>>>>> >>>>>> Thanks for the tip. >>>>>> >>>>>> So far, I ran (as root): >>>>>> >>>>>> # usbhidctl -anrv -f /dev/uhid0 >>>>>> Report descriptor: >>>>>> Total =C2=A0 input size 0 bytes >>>>>> Total =C2=A0output size 1 bytes >>>>>> Total feature size 1 bytes >>>>>> >>>>>> On Sat, Aug 22, 2009 at 11:09 PM, Henry Hu wr= ote: >>>>>>> On Sun, Aug 23, 2009 at 10:16 AM, Dieter wrote: >>>>>>>>> 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 ord= er to >>>>>>>>> map them to: >>>>>>>>> XF86Back >>>>>>>> ... >>>>>>>>> XF86AudioRaiseVolume >>>>>>>>> >>>>>>>>> Any suggestions? >>>>>>>> >>>>>>>> Can xmodmap(1) do what you need? =C2=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@free= bsd.org" >>>>>>>> >>>>>>> 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@freebs= d.org" >>>>>> >>>>> >>>> _______________________________________________ >>>> 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" >>>> >>> >> >