I have an Asus laptop that has a special key that can be configured to launch any software (at least on Windows).The general question is: how can I detect any key press (globally)?Then, how can I detect when the user press this key?
How to detect global key presses
keyboard shortcuts;keyboard;x server
I typically will use xev to determine the key's scancode and then map it to whatever action I want using either xdotool or XBindKeys.xev$ xev | grep -A2 --line-buffered '^KeyRelease' \    | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'After running the above xev command you'll get a little white window that'll pop up. You'll want to put the mouse over this window and then press the problem key. The name of the key should be showing up in the terminal as you press the various keys.Screenshot                   mapping the key to something usefulYou can create shortcut key combinations that will launch commands using xbindkeys, for example. I've successfully been using XBindKeys on GNOME 3.8.4 for this very purpose.My use has been modest but I like to create keyboard shortcuts for Nautilus to launch with certain directories opened.ExampleYou'll need to first make sure the packages xbindkeys is installed.Then you'll need to run the following command, one time only, to create a template xbindkeys configuration file.$ xbindkeys --defaults > /home/saml/.xbindkeysrcWith the file created you can open it in a text editor and add a rule like this:nautilus --browser /home/saml/projects/path/to/some/dir  Mod4+shift + qWith the above change made we need to kill xbindkeys if it's already running and then restart it.$ killall xbindkeys$ xbindkeysNow with this running any time I type Mod+Shift+Q Nautilus will open with the corresponding folder opened.Using GNOME's Keyboard AppletIf you go through the settings (System Settings Keyboard, select Shortcuts tab and add a new custom shortcut for your browser.   Using the steps 1-5 as in the diagram you could map a command to your special key as well.