From owner-freebsd-questions@FreeBSD.ORG Thu May 21 12:37:38 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5E05B1E for ; Thu, 21 May 2015 12:37:38 +0000 (UTC) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 659A4165E for ; Thu, 21 May 2015 12:37:37 +0000 (UTC) Received: from r56.edvax.de (port-92-195-181-19.dynamic.qsc.de [92.195.181.19]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id 42A0F27703; Thu, 21 May 2015 14:37:34 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id t4LCbYGb003293; Thu, 21 May 2015 14:37:34 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Thu, 21 May 2015 14:37:34 +0200 From: Polytropon To: Avinash Sonawane Cc: FreeBSD Questions Subject: Re: Brightness control in FreeBSD 10.1-RELEASE Message-Id: <20150521143734.91ac3a30.freebsd@edvax.de> In-Reply-To: References: <20150521140123.a18aadc2.freebsd@edvax.de> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 12:37:38 -0000 On Thu, 21 May 2015 17:58:49 +0530, Avinash Sonawane wrote: > On Thu, May 21, 2015 at 5:31 PM, Polytropon 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, ...