rebinding keys to functions

Roland Smith rsmith at
Mon Sep 14 17:34:22 UTC 2009

On Mon, Sep 14, 2009 at 04:52:56PM +0000, Eitan Adler wrote:
> 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).

How you can bind keypresses to commands in X depends on the window manager or
desktop environment you are using. See the revelant documentation.

On my laptop (centrino 2 platform, PM 45 chipset), using Fn combination works
to change speaker volume and screen brightness, but this is done outside the
OS. The X server doesn't even 'see' those keypresses.

[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list