From owner-freebsd-questions@FreeBSD.ORG Tue Sep 15 01:14:36 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 053311065697 for ; Tue, 15 Sep 2009 01:14:36 +0000 (UTC) (envelope-from mel.flynn+fbsd.questions@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id C27068FC19 for ; Tue, 15 Sep 2009 01:14:35 +0000 (UTC) Received: from smoochies.rachie.is-a-geek.net (mailhub.rachie.is-a-geek.net [192.168.2.11]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id 9BD087E821; Mon, 14 Sep 2009 17:14:47 -0800 (AKDT) From: Mel Flynn To: freebsd-questions@freebsd.org Date: Tue, 15 Sep 2009 01:38:18 +0200 User-Agent: KMail/1.12.1 (FreeBSD/8.0-BETA4; KDE/4.3.1; i386; ; ) References: <20090914230620.2f7dd3d4.freebsd@edvax.de> <20090914224038.GA77585@slackbox.xs4all.nl> In-Reply-To: <20090914224038.GA77585@slackbox.xs4all.nl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200909150138.18798.mel.flynn+fbsd.questions@mailing.thruhere.net> Cc: Roland Smith , Eitan Adler , Robert Huff , Polytropon Subject: Re: rebinding keys to functions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Sep 2009 01:14:36 -0000 On Tuesday 15 September 2009 00:40:38 Roland Smith wrote: > On Mon, Sep 14, 2009 at 11:06:20PM +0200, Polytropon wrote: > > On Mon, 14 Sep 2009 14:34:29 -0400, Robert Huff wrote: > > > Roland Smith writes: > > > > > My laptop has a bunch of volume-up/down/mute internet/mail/etc > > > > > keys. How do I map each of them to run a specific shell > > > > > command when pressed? > > > > > > > > That depends on a couple of things (assuming you're running the X > > > > window system, I don't know if it is even possible on the > > > > console). > > > > > > > > First you have to make sure that you actually can see the key > > > > signals. In X you can test that with xev(1). > > > > > > If this is what I think it is, he probably can't. > > > > For most laptop keyboards, there was (as already explained) a > > specific system that handled Fn+PFx outside the OS so it worked > > always. Even my old Toshiba T1600 can do that. > > > > "Modern" laptops do it differently: Fn+PFx key combinations > > have to be picked up by a specific driver that "listens" to > > stange and custom keycodes outside the standard range, and then > > communicate the selected purpose to the OS in order to perform > > the action, e. g. raise the volume. > > Not all of them. My laptop is based on a quite modern cantiga (aka > centrino2) PM45 chipset (from 2008, according to Wikipedia). The function > keys for changing the creen brightness and sound volume work OK with > FreeBSD, even though xev doesn't see them. So that signal seems to go > directly to the hardware. Most likely not entirely. Having acpidump(8)ed a few laptops, I have seen references to multimedia keys in there. However I know not nearly enough about ACPI to know if the OS can intercept/reroute the bindings. A gamble I would take is to let FreeBSD post itself as a windows variant to acpi, by setting hw.acpi.osname="Windows 2001" in /boot/loader.conf. Then recheck xev. -- Mel