Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Mar 2011 23:04:59 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Alokat <mailing@alokat.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Sound with FN Button
Message-ID:  <20110324230459.3f5f56c6.freebsd@edvax.de>
In-Reply-To: <4D8BBD03.4010909@alokat.org>
References:  <4D8BA955.3090506@alokat.org> <20110324215257.4da534c4.freebsd@edvax.de> <4D8BBD03.4010909@alokat.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 24 Mar 2011 22:52:03 +0100, Alokat <mailing@alokat.org> wrote:
> On 03/24/11 21:52, Polytropon wrote:
> > On Thu, 24 Mar 2011 21:28:05 +0100, Alokat<mailing@alokat.org>  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
> >
> 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

You need to look for those events:

KeyPress event, serial 27, synthetic NO, window 0x2000001,
    root 0x73, subw 0x0, time 3923776537, (162,2), root:(271,490),
    state 0x10, keycode 154 (keysym 0xffd4, F23), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 27, synthetic NO, window 0x2000001,
    root 0x73, subw 0x0, time 3923776635, (162,2), root:(271,490),
    state 0x10, keycode 154 (keysym 0xffd4, F23), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

The 2nd line, the information in the middle is important:
"keycode 154 (keysym 0xffd4, F23)": It indicates that the
keycode generated has been identified with the code 154,
and this code is already mapped to the symbol F23. This
is (just for completeness) the "Cut" key of the 2x5 field
to the left.

Erm... just a side question... you're refering to pressing
the Fn key with a function key (e. g. Fn+F1) for volume
control, or are there other special keys for volume? I'm
asking this as in the past, volume control was managed by
the BIOS (I think), but NOT by the operating system or
application programs. This means it was possible to change
the volume INDEPENDENTLY from any driver. I'm not sure if
this is still the case. Maybe - just MAYBE - you need a
hardware and software (!) specific driver to do those
basic things... history teaches that all the "simple things"
that worked in the past are a high mountain to climb today...
thanks to YOU, hardware manufacturers! :-)

Please understand the paragraph as follows: MAYBE (!!!) it's
not even possible to do what you're intending.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110324230459.3f5f56c6.freebsd>