Brightness control in FreeBSD 10.1-RELEASE

Polytropon freebsd at edvax.de
Thu May 21 12:37:38 UTC 2015


On Thu, 21 May 2015 17:58:49 +0530, Avinash Sonawane wrote:
> On Thu, May 21, 2015 at 5:31 PM, Polytropon <freebsd at edvax.de> wrote:
> 
> > I could imagine that somehow, when the OS and the GUI is loaded,
> > the keys designed to adjust brightness emit a "normal" key code
> > that the GUI (here: X's keyboard input machanism) picks up and
> > does something stupid with it. You can easily check for that
> > possibility: install the "xev" (X event viewer) port and press
> > those keys. Look for "KeyPress" entries. What happens?
> 
> My "decrease brightness" key is Fn+F(4) where "Fn" is a separate key.
> When I press the combination to decrease the brightness i.e. Fn+F(4)
> on terminal xev produces an infinitely long output which I abort by
> pressing the "Esc" key.

Terminating xev is usually done by Ctrl+C. :-)

This is the relevant output:

KeyPress event, serial 37, synthetic NO, window 0x1e00001,
    root 0x2b9, subw 0x0, time 2427018, (165,-10), root:(759,313),
    state 0x10, keycode 133 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False
 
KeyRelease event, serial 37, synthetic NO, window 0x1e00001,
    root 0x2b9, subw 0x0, time 2427068, (165,-10), root:(759,313),
    state 0x10, keycode 133 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

An "endless loop of keypresses" is being generated when you
hit Fn+F4 only once? This looks wrong. It should only be one
of each events per keypress.

Interesting detail: The key issues an individual code (133)
and it's _not_ assigned to a symbol, so X and the window
manager (or desktop environment) should ignore it.

This is only for one of the keys (code 133), what about the
other one?

If you find a way to modify screen brightness using a command,
you can use xmodmap and xbindkeys to connect that command to
a keypress of that key.


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


More information about the freebsd-questions mailing list