Date: Tue, 15 Sep 2009 01:38:18 +0200 From: Mel Flynn <mel.flynn+fbsd.questions@mailing.thruhere.net> To: freebsd-questions@freebsd.org Cc: Roland Smith <rsmith@xs4all.nl>, Eitan Adler <eitanadlerlist@gmail.com>, Robert Huff <roberthuff@rcn.com>, Polytropon <freebsd@edvax.de> Subject: Re: rebinding keys to functions Message-ID: <200909150138.18798.mel.flynn%2Bfbsd.questions@mailing.thruhere.net> In-Reply-To: <20090914224038.GA77585@slackbox.xs4all.nl> References: <a0777e080909140952r18cc88b3n2b3ff1456c2542c7@mail.gmail.com> <20090914230620.2f7dd3d4.freebsd@edvax.de> <20090914224038.GA77585@slackbox.xs4all.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <roberthuff@rcn.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909150138.18798.mel.flynn%2Bfbsd.questions>