Difference between revisions of "Configure your multimedia keys"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
Line 1: Line 1:
 +
Many keyboards have multimedia keys. Those keys typically allow you to increase/decrease, mute and unmute sound on your PC, but many more exist. Using these keys can make you more productive - instead of [[opening a console]] and typing [[command]], you just type a key and the associated application pops up.
 +
 +
As an example, I have a key on my keyboard that pictures a calculator. First let's find out the name of this key:
 +
 
Start xev. Move your mouse pointer to the rectangle in it. Type a key. You get an output like this:
 
Start xev. Move your mouse pointer to the rectangle in it. Type a key. You get an output like this:
  
 
<pre>
 
<pre>
KeyPress event, serial 34, synthetic NO, window 0x2c00001,
+
KeyPress event, serial 44, synthetic NO, window 0x4200001,
     root 0x15d, subw 0x2c00002, time 229472, (55,47), root:(1315,731),
+
     root 0x2b0, subw 0x4200002, time 47123941, (36,44), root:(38,67),
     state 0x0, keycode 121 (keysym 0x1008ff12, '''''XF86AudioMute'''''), same_screen YES,
+
     state 0x10, keycode 148 (keysym 0x1008ff1d, '''''XF86Calculator'''''), same_screen YES,
 
     XLookupString gives 0 bytes:  
 
     XLookupString gives 0 bytes:  
    XmbLookupString gives 0 bytes:
 
 
     XFilterEvent returns: False
 
     XFilterEvent returns: False
 +
</pre>
  
KeyRelease event, serial 34, synthetic NO, window 0x2c00001,
+
So this key is named ''XF86Calculator''.
    root 0x15d, subw 0x2c00002, time 229558, (55,47), root:(1315,731),
 
    state 0x0, keycode 121 (keysym 0x1008ff12, '''''XF86AudioMute'''''), same_screen YES,
 
    XLookupString gives 0 bytes:
 
    XFilterEvent returns: False
 
</pre>
 
  
 
Then [[open a console]] and run the [[command]]
 
Then [[open a console]] and run the [[command]]
 
  systemsettings
 
  systemsettings
 
Select "Shortcuts and Gestures" -> Custom Shortcuts -> Edit -> New -> Global Shortcut -> Command/URL
 
Select "Shortcuts and Gestures" -> Custom Shortcuts -> Edit -> New -> Global Shortcut -> Command/URL
 +
As trigger, press this key, as "Action" enter kcalc
 +
 +
= See also =
 +
* http://www.linux-club.de/viewtopic.php?f=24&t=116414

Revision as of 10:53, 29 March 2013

Many keyboards have multimedia keys. Those keys typically allow you to increase/decrease, mute and unmute sound on your PC, but many more exist. Using these keys can make you more productive - instead of opening a console and typing command, you just type a key and the associated application pops up.

As an example, I have a key on my keyboard that pictures a calculator. First let's find out the name of this key:

Start xev. Move your mouse pointer to the rectangle in it. Type a key. You get an output like this:

KeyPress event, serial 44, synthetic NO, window 0x4200001,
    root 0x2b0, subw 0x4200002, time 47123941, (36,44), root:(38,67),
    state 0x10, keycode 148 (keysym 0x1008ff1d, '''''XF86Calculator'''''), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

So this key is named XF86Calculator.

Then open a console and run the command

systemsettings

Select "Shortcuts and Gestures" -> Custom Shortcuts -> Edit -> New -> Global Shortcut -> Command/URL As trigger, press this key, as "Action" enter kcalc

See also