From owner-freebsd-questions@FreeBSD.ORG Thu Mar 24 21:52:23 2011 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 5103B106566B for ; Thu, 24 Mar 2011 21:52:23 +0000 (UTC) (envelope-from mailing@alokat.org) Received: from smtp.alokat.org (smtp.alokat.org [46.4.186.11]) by mx1.freebsd.org (Postfix) with ESMTP id D6AB68FC13 for ; Thu, 24 Mar 2011 21:52:22 +0000 (UTC) Received: from smtp.alokat.org (localhost.localdomain [127.0.0.1]) by smtp.alokat.org (Postfix) with ESMTP id F2359112500A0 for ; Thu, 24 Mar 2011 22:52:21 +0100 (CET) Received: from Mugin.fritz.box (188-192-38-254-dynip.superkabel.de [188.192.38.254]) by smtp.alokat.org (Postfix) with ESMTPSA id D0F8011250079 for ; Thu, 24 Mar 2011 22:52:21 +0100 (CET) Message-ID: <4D8BBD03.4010909@alokat.org> Date: Thu, 24 Mar 2011 22:52:03 +0100 From: Alokat User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110324 Thunderbird/3.1.9 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <4D8BA955.3090506@alokat.org> <20110324215257.4da534c4.freebsd@edvax.de> In-Reply-To: <20110324215257.4da534c4.freebsd@edvax.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AV-Checked: ClamAV using ClamSMTP Subject: Re: Sound with FN Button 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: Thu, 24 Mar 2011 21:52:23 -0000 On 03/24/11 21:52, Polytropon wrote: > On Thu, 24 Mar 2011 21:28:05 +0100, Alokat wrote: >> Hi, >> >> how can I use the FN Buttons to regular the sound? >> I'm using fluxbox. > Use the "xev" program to check which keysymbols (or at > least codes) are output by those keys. For example, on > my Sun keyboard I have those for audio: > > 141 > 142 > 143 > > Then write a file ~/.xmodmaprc to assign names to those > keys, for example: > > ! Sound off > keycode 141 = F24 > ! Lower volume > keycode 142 = F25 > ! Raise volume > keycode 143 = F26 > > You can also use > > SunAudioMute > SunAudioLowerVolume > SunAudioRaiseVolume > > or > > XF86AudioMute > XF86AudioLowerVolume > XF86AudioRaiseVolume > > I decided to continue the enumeration as function keys for > all the extra keys on my keyboard. :-) > > Incorporate the settings upon X startup, using ~/.xinitrc > or maybe ~/.xsession: > > xmodmap ~/.xmodmaprc > > Then use the keyboard action configuration of Fluxbox. As I > don't use it anymore, I can't tell you where it is, but there > should be a configuration file which selects which action to > be taken when a specific key is pressed. > > I'm using WindowMaker's configuration utility for that. I did > add menu entries and set a custom key for them. For example, > I made the following settings: > > F24 -> mixer 0 > F25 -> mixer vol -5 > F26 -> mixer vol +5 > > You should be able to find a similar approach in FLuxbox. > > I'm sure you got the idea: You identify what the keys DO and > then connect them to a keyname. This keyname is then connected > to a specific program call, "mixer" with the intended parameters > in case of volume control. > > > > I get an output like this: FocusOut event, serial 31, synthetic NO, window 0x1800001, mode NotifyGrab, detail NotifyAncestor FocusIn event, serial 31, synthetic NO, window 0x1800001, mode NotifyUngrab, detail NotifyAncestor KeymapNotify event, serial 31, synthetic NO, window 0x0, keys: 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 FocusOut event, serial 31, synthetic NO, window 0x1800001, mode NotifyGrab, detail NotifyAncestor FocusIn event, serial 31, synthetic NO, window 0x1800001, mode NotifyUngrab, detail NotifyAncestor KeymapNotify event, serial 31, synthetic NO, window 0x0, keys: 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0