If you go to System ▸ Preferences ▸ Keyboard Shortcuts, you should be able to add your command and set the keybinding.
Alternate Way - make it into a script
First, open up a Terminal (Ctrl + Alt + T)
sudo touch /bin/anyName
sudo chmod +x /bin/anyName
sudo gedit /bin/anyName
Place this in the anyName file:
#!/bin/bash
xdotool key XF86MonBrightnessDown
Open your Keyboard Shortcuts application.
Create a new custom shortcut.
Set the command to "anyName", and pick the key combo (This can be done by pressing the key and Ubuntu will recognize which key you pressed. You don't have to worry about the scancode or keycode; just type what key combination you want to activate the command).
Hope this helps.
A related question on AskUbuntu.
A question on UbuntuForums.
Keyboard
. When it opens, click the next tab (Shortcuts), then hit the+
Sign at the bottom of the Keyboard application. Type in a name and your command. – sameetandpotatoes Aug 07 '13 at 15:28