4

Possible Duplicate:
How to change the shortcut to adjust brightness?

The brightness keys on my laptop are not recognized by Ubuntu, which is a common problem for a variety of laptops, is there a way to set an arbitrary key shortcut to change brightness in Ubuntu 12.04? I looked in the Keyboard settings app under the shortcut tab, and I couldn't find one.

I am able to set brightness in the Brightness and Lock settings app, but it would be much more convenient if I could just assign a key shortcut, like Ctrl+F2 and Ctrl+F3.

17

This is a generic way to set arbitrary brightness up/down keys on Ubuntu 12.04 using the Keyboard settings app.

sudo apt-get install xdotool

Open "Keyboard" settings app, go to Shortcut tab, click Custom Shortcut, then the little + button to add a shortcut.

name: Brightness Up
command: xdotool key XF86MonBrightnessUp

and another:

name: Brightness Down
command: xdotool key XF86MonBrightnessDown

Click where it says "Disabled" and then hit the key-combo you want, I ended up using F2 and F3.

In Ubuntu 16.04 use --clearmodifiers with the command, i.e.,

name: Brightness Up command: xdotool key --clearmodifiers XF86MonBrightnessUp

and

name: Brightness Down command: xdotool key --clearmodifiers XF86MonBrightnessDown

| improve this answer | |
  • 1
    Doesn't appear to work for an Acer Aspire S3 on 12.04 with Fn+leftarrow/rightarrow. – bright-star Dec 9 '13 at 20:56
  • Doesn't appear to work for an out-of-box Toshiba Satellite S55-A5375 – Meredith Apr 27 '14 at 7:20
  • Worked for me on a Toshiba Satellite L305 laptop (which is 7 years old) – dreme Aug 26 '15 at 7:54
  • In Ubuntu 15.10 this only works if adding --clearmodifiers. I.e. the commands are: "xdotool key --clearmodifiers XF86MonBrightnessUp" and "xdotool key --clearmodifiers XF86MonBrightnessDown" – Kristofer Nov 28 '15 at 12:43
  • Worked on Acer C720 Chromebook booting with OpenSUSE – chaseadamsio Jun 7 '16 at 3:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.