<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0048)http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys -->
<HTML><HEAD><TITLE>HOWTO Use Multimedia Keys - Gentoo Linux Wiki</TITLE>
<META http-equiv=Content-Type content="text/html; charset=UTF-8">
<META content="HOWTO Use Multimedia Keys,HOWTO Use Multimedia Keys,Kernel,X,Raw scancode,HOWTO">
<STYLE type=text/css>@import url( /skins/monobook/main.css?9 );
</STYLE>
<!--[if lt IE 5.5000]><style type="text/css">@import "/skins/monobook/IE50Fixes.css";</style><![endif]--><!--[if IE 5.5000]><style type="text/css">@import "/skins/monobook/IE55Fixes.css";</style><![endif]--><!--[if IE 6]>
<STYLE type=text/css>@import url( /skins/monobook/IE60Fixes.css );
</STYLE>
<![endif]--><!--[if IE 7]><style type="text/css">@import "/skins/monobook/IE70Fixes.css?1";</style><![endif]--><!--[if lt IE 7]>
<SCRIPT src="HOWTO Use Multimedia Keys - Gentoo Linux Wiki_archivos/IEFixes.js" 
type=text/javascript></SCRIPT>

<META http-equiv=imagetoolbar content=no><![endif]-->






<STYLE type=text/css>@import url( /index.php?title=MediaWiki:Common.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000 );
@import url( /index.php?title=MediaWiki:Monobook.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000 );
@import url( /index.php?title=-&action=raw&gen=css&maxage=18000 );
</STYLE>
<!-- Head Scripts -->




<META content="MSHTML 6.00.2900.2838"></HEAD>
<BODY>
<DIV id=globalWrapper>
<DIV id=column-content>
<DIV style="PADDING-RIGHT: 0px; MARGIN-TOP: 35px; PADDING-LEFT: 0px; RIGHT: 0px; FLOAT: right; PADDING-BOTTOM: 0px; WIDTH: 160px; PADDING-TOP: 0px; HEIGHT: 1px; positon: absolute">



</DIV>
<DIV id=content style="MARGIN-RIGHT: 163px"><A id=top name=top></A>
<H1 class=firstHeading>HOWTO Use Multimedia Keys</H1>
<DIV id=bodyContent>
<H3 id=siteSub>From Gentoo Linux Wiki</H3>
<DIV id=contentSub></DIV>
<DIV id=jump-to-nav>Jump to: <A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#column-one">navigation</A>, 
<A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#searchInput">search</A></DIV><!-- start content -->
<TABLE style="MARGIN-TOP: 0px; BORDER-LEFT-WIDTH: 0px; MARGIN-BOTTOM: 1px; WIDTH: 100%; BORDER-RIGHT-WIDTH: 0px" cellspacing=0 cellpadding=3>
  <TBODY>
  <TR>
    <TD style="BACKGROUND: #efefef">
      <CENTER><SMALL>This article is part of the <B><A title=Index:HOWTO href="http://gentoo-wiki.com/Index:HOWTO">HOWTO</A></B> 
      series.</SMALL></CENTER></TD></TR>
  <TR>
    <TD align=middle><A title=Index:HOWTO href="http://gentoo-wiki.com/Index:HOWTO#Installation_Methods">Installation</A> 
      <B>•</B> <A title=Index:HOWTO href="http://gentoo-wiki.com/Index:HOWTO#Kernel_.26_Hardware">Kernel &amp; 
      Hardware</A> <B>•</B> <A title=Index:HOWTO href="http://gentoo-wiki.com/Index:HOWTO#Networks_.26_Services">Networks</A> 
      <B>•</B> <A title=Index:HOWTO href="http://gentoo-wiki.com/Index:HOWTO#Portage">Portage</A> <B>•</B> <A title=Index:HOWTO href="http://gentoo-wiki.com/Index:HOWTO#Software">Software</A> <B>•</B> 
      <A title=Index:HOWTO href="http://gentoo-wiki.com/Index:HOWTO#System_Related">System</A> 
      <B>•</B> <A title=Index:HOWTO href="http://gentoo-wiki.com/Index:HOWTO#X_Server">X Server</A> <B>•</B> 
      <A title=Index:HOWTO href="http://gentoo-wiki.com/Index:HOWTO#Gaming">Gaming</A> <B>•</B> <A title=Index:HOWTO href="http://gentoo-wiki.com/Index:HOWTO#Specific_to_non-x86_architecture">Non-x86</A> 
      <B>•</B> <A title=Index:HOWTO href="http://gentoo-wiki.com/Index:HOWTO#Emulators">Emulators</A> <B>•</B> 
      <A title=Index:HOWTO href="http://gentoo-wiki.com/Index:HOWTO#Miscellaneous">Misc</A> 
  </TD></TR></TBODY></TABLE>
<TABLE class=toc id=toc>
  <TBODY>
  <TR>
    <TD>
      <DIV id=toctitle>
      <H2>Contents</H2></DIV>
      <UL>
        <LI class=toclevel-1><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#Introduction"><SPAN class=tocnumber>1</SPAN> <SPAN class=toctext>Introduction</SPAN></A> 
        <LI class=toclevel-1><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#Determine_the_keycodes"><SPAN class=tocnumber>2</SPAN> <SPAN class=toctext>Determine the 
        keycodes</SPAN></A> 
        <LI class=toclevel-1><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#Setting_up_xmodmap"><SPAN class=tocnumber>3</SPAN> <SPAN class=toctext>Setting up 
        xmodmap</SPAN></A> 
        <LI class=toclevel-1><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#Assigning_keys_to_special_functions"><SPAN class=tocnumber>4</SPAN> <SPAN class=toctext>Assigning keys to special 
        functions</SPAN></A> 
        <UL>
          <LI class=toclevel-2><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#Non_window_manager_specific_-_xbindkeys"><SPAN class=tocnumber>4.1</SPAN> <SPAN class=toctext>Non window manager 
          specific - xbindkeys</SPAN></A> 
          <LI class=toclevel-2><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#Blackbox"><SPAN class=tocnumber>4.2</SPAN> <SPAN class=toctext>Blackbox</SPAN></A> 
          <LI class=toclevel-2><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#Fluxbox"><SPAN class=tocnumber>4.3</SPAN> <SPAN class=toctext>Fluxbox</SPAN></A> 
          <LI class=toclevel-2><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#Openbox"><SPAN class=tocnumber>4.4</SPAN> <SPAN class=toctext>Openbox</SPAN></A> 
          <LI class=toclevel-2><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#XFCE"><SPAN class=tocnumber>4.5</SPAN> <SPAN class=toctext>XFCE</SPAN></A> 
          <LI class=toclevel-2><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#KDE"><SPAN class=tocnumber>4.6</SPAN> <SPAN class=toctext>KDE</SPAN></A> 
          <LI class=toclevel-2><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#GNOME"><SPAN class=tocnumber>4.7</SPAN> <SPAN class=toctext>GNOME</SPAN></A> 
          <LI class=toclevel-2><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#Window_Maker"><SPAN class=tocnumber>4.8</SPAN> <SPAN class=toctext>Window Maker</SPAN></A> 

          <LI class=toclevel-2><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#Enlightenment_DR16"><SPAN class=tocnumber>4.9</SPAN> <SPAN class=toctext>Enlightenment 
          DR16</SPAN></A> 
          <LI class=toclevel-2><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#Ion_3"><SPAN class=tocnumber>4.10</SPAN> <SPAN class=toctext>Ion 3</SPAN></A> 
          <LI class=toclevel-2><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#FVWM_and_FVWM-Crystal"><SPAN class=tocnumber>4.11</SPAN> <SPAN class=toctext>FVWM and 
          FVWM-Crystal</SPAN></A> </LI></UL>
        <LI class=toclevel-1><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#Alternative:_lineakd_or_keyTouch"><SPAN class=tocnumber>5</SPAN> <SPAN class=toctext>Alternative: lineakd or 
        keyTouch</SPAN></A> 
        <LI class=toclevel-1><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#Sample:_eMachines_m68xx"><SPAN class=tocnumber>6</SPAN> <SPAN class=toctext>Sample: eMachines 
        m68xx</SPAN></A> 
        <LI class=toclevel-1><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#Getting_bizzare_keyboards_working"><SPAN class=tocnumber>7</SPAN> <SPAN class=toctext>Getting bizzare keyboards 
        working</SPAN></A> 
        <LI class=toclevel-1><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#Command_Line_Functions_to_Control_Common_Applications"><SPAN class=tocnumber>8</SPAN> <SPAN class=toctext>Command Line Functions to 
        Control Common Applications</SPAN></A> 
        <UL>
          <LI class=toclevel-2><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#xmms"><SPAN class=tocnumber>8.1</SPAN> <SPAN class=toctext>xmms</SPAN></A> 
          <LI class=toclevel-2><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#Rhythmbox"><SPAN class=tocnumber>8.2</SPAN> <SPAN class=toctext>Rhythmbox</SPAN></A> 
          <LI class=toclevel-2><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#amarok"><SPAN class=tocnumber>8.3</SPAN> <SPAN class=toctext>amarok</SPAN></A> 
          <LI class=toclevel-2><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#Quod_Libet"><SPAN class=tocnumber>8.4</SPAN> <SPAN class=toctext>Quod Libet</SPAN></A> 
          <LI class=toclevel-2><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#MPD.2FMPC"><SPAN class=tocnumber>8.5</SPAN> <SPAN class=toctext>MPD/MPC</SPAN></A> 
          <LI class=toclevel-2><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#ALSA"><SPAN class=tocnumber>8.6</SPAN> <SPAN class=toctext>ALSA</SPAN></A> 
          <LI class=toclevel-2><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#Banshee_player"><SPAN class=tocnumber>8.7</SPAN> <SPAN class=toctext>Banshee 
          player</SPAN></A> </LI></UL></LI></UL></TD></TR></TBODY></TABLE>


<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: Introduction" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=1">edit</A>]</DIV><A name=Introduction></A>
<H2>Introduction </H2>
<P>Most modern keyboards are equipped with a number of multimedia keys. This 
simple HOWTO explains what you have to do in order to use these keys. </P>
<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: Determine the keycodes" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=2">edit</A>]</DIV><A name=Determine_the_keycodes></A>
<H2>Determine the keycodes </H2>
<P>Whenever you hit a key on your keyboard the <A title=Kernel href="http://gentoo-wiki.com/Kernel">kernel</A> generates a <A class=new title="Raw scancode" href="http://gentoo-wiki.com/index.php?title=Raw_scancode&amp;action=edit">raw 
scancode</A>, which can be mapped to a keycode. Whilst this is what happens at 
kernel level, <A title=X href="http://gentoo-wiki.com/X">X</A> has a different 
way of mapping keys. It reads the kernel keycode table at startup, then maps the 
keycode to its own keycode table . Each keycode can be mapped to a keysym, which 
is a string that represents a key. </P>
<P>Determining the keycodes for your multimedia keys is very easy. Simply run 
the following command in an X terminal: </P><PRE>xev
</PRE>
<P>Now press every multimedia key on your keyboard and note the generated 
keycodes. They can be found in the output of xev, which looks similar to this: 
</P>
<P><BR></P>
<TABLE style="BORDER-RIGHT: #bfffbf 1px solid; BORDER-TOP: #bfffbf 1px solid; BORDER-LEFT: #bfffbf 1px solid; BORDER-BOTTOM: #bfffbf 1px solid; BACKGROUND-COLOR: #f2fff2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-RIGHT: #a0ffa0 1px solid; BORDER-TOP: #a0ffa0 1px solid; BORDER-LEFT: #a0ffa0 1px solid; BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #c1ffc1"><FONT size=-1><B>Code:</B> Output of xev</FONT> </TD></TR>
  <TR>
    <TD><PRE>KeyRelease event, serial 31, synthetic NO, window 0x2800001,
root 0x7d, subw 0x0, time 2792224, (-22,86), root:(565,101),
state 0x10, keycode 160, same_screen YES,
XLookupString gives 0 bytes:
</PRE></TD></TR></TBODY></TABLE>
<P>The "keycode" value is what we are concerned with. In this example it is 
"160." Make note of each of each keycode value in respect to each extended 
key.<BR></P>
<P>The following script can help you find the keycodes in the output of xev: 
</P>
<P><BR></P>
<TABLE style="BORDER-RIGHT: #bfffbf 1px solid; BORDER-TOP: #bfffbf 1px solid; BORDER-LEFT: #bfffbf 1px solid; BORDER-BOTTOM: #bfffbf 1px solid; BACKGROUND-COLOR: #f2fff2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-RIGHT: #a0ffa0 1px solid; BORDER-TOP: #a0ffa0 1px solid; BORDER-LEFT: #a0ffa0 1px solid; BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #c1ffc1"><FONT size=-1><B>Code:</B> xev and filter to run on its output</FONT> </TD></TR>
  <TR>
    <TD><PRE>xev | grep keycode | \
sed s/"^.*keycode *\([0-9]\+\).*$"/"keycode \1 = "/ |  uniq
</PRE></TD></TR></TBODY></TABLE>
<P>Run this instead of plain xev. Press all multimedia keys in order. Then close 
the xev window. The filtered output appears only <B>after</B> closing the 
window. Output example: </P><PRE>keycode 36 =
keycode 144 =
keycode 162 =
keycode 164 =
</PRE>
<P>Most likely, like in this example, you will have a first line in the output 
which is NOT a multimedia key. Simply delete it. </P>
<P>A single key can be identified without ending xev by: </P><PRE>xev | sed -n '/keycode/!d;s/^.*keycode *\([0-9]\+\).*$/keycode \1 = /;p'
</PRE>
<P><BR></P>
<P><BR>If pressing each key prodeces output from xev then you can jump ahead to 
<A title="HOWTO Use Multimedia Keys" href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#Setting_up_xmodmap">Setting 
up xmodmap</A>. If pressing a key doesn't do anything at all (ie, xev produeces 
no output), run the following command in an X terminal: </P><PRE>dmesg
</PRE>
<P>You will probably see some lines like these: </P>
<P><BR></P>
<TABLE style="BORDER-RIGHT: #bfffbf 1px solid; BORDER-TOP: #bfffbf 1px solid; BORDER-LEFT: #bfffbf 1px solid; BORDER-BOTTOM: #bfffbf 1px solid; BACKGROUND-COLOR: #f2fff2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-RIGHT: #a0ffa0 1px solid; BORDER-TOP: #a0ffa0 1px solid; BORDER-LEFT: #a0ffa0 1px solid; BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #c1ffc1"><FONT size=-1><B>Code:</B> Output of dmesg</FONT> </TD></TR>
  <TR>
    <TD><PRE>atkbd.c: Unknown key released (translated set 2, code 0x96 on isa0060/serio0).
atkbd.c: Use 'setkeycodes e016 &lt;keycode&gt;' to make it known.
</PRE></TD></TR></TBODY></TABLE>
<P>This means that the kernel doesn't have keycodes mapped to your keyboard's 
scancodes. You will have to add one line in <FONT style="FONT-FAMILY: monospace" color=green>/etc/conf.d/local.start</FONT> for each missing key as follows: </P>
<P><BR></P>
<TABLE style="BORDER-RIGHT: #ffbfbf 1px solid; BORDER-TOP: #ffbfbf 1px solid; BORDER-LEFT: #ffbfbf 1px solid; BORDER-BOTTOM: #ffbfbf 1px solid; BACKGROUND-COLOR: #fff2f2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #ffafaf"><FONT size=-1><B>File:</B> /etc/conf.d/local.start</FONT> </TD></TR>
  <TR>
    <TD>
      <DIV class=scroll><PRE>setkeycodes e008 136
setkeycodes e016 150
... And so on ...
</PRE></DIV></TD></TR></TBODY></TABLE>
<DL>
  <DD>Where the first number (e008) is what you see in dmesg, and the second 
  number (136) is an unused keycode in your kernel. In general you can find a 
  good keycode by taking the last 2 digits of this first number, converting it 
  from hex (base-16) to decimal (base-10) and adding 128. </DD></DL>
<DL>
  <DD>This will set up the proper scancode - keycode mapping every boot. To set 
  them up without rebooting, run the following as root: </DD></DL>
<DL>
  <DD>sh /etc/conf.d/local.start </DD></DL>
<DL>
  <DD>After you have the proper mappings setup, restart X and try running xev 
  again, to ensure that a keycode is displayed for each multimedia key you want 
  to use. </DD></DL>
<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: Setting up xmodmap" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=3">edit</A>]</DIV><A name=Setting_up_xmodmap></A>
<H2>Setting up xmodmap </H2>
<P>All you need to do now is to create a file containing mappings for keycodes 
to keysyms. Create a file called <FONT style="FONT-FAMILY: monospace" color=green>.Xmodmap</FONT> in your $HOME directory. </P>
<P><BR></P>
<TABLE style="BORDER-RIGHT: #ffbfbf 1px solid; BORDER-TOP: #ffbfbf 1px solid; BORDER-LEFT: #ffbfbf 1px solid; BORDER-BOTTOM: #ffbfbf 1px solid; BACKGROUND-COLOR: #fff2f2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #ffafaf"><FONT size=-1><B>File:</B> .Xmodmap Example</FONT> </TD></TR>
  <TR>
    <TD>
      <DIV class=scroll><PRE>! This works with Trust Silverline Direct Access keyboard
! Use&nbsp;! for comments

keycode 222 = XF86PowerOff
keycode 223 = XF86Sleep
keycode 236 = XF86Mail
keycode 229 = XF86Search
keycode 230 = XF86Favorites
keycode 178 = XF86WWW

keycode 162 = XF86AudioPlay
keycode 164 = XF86AudioStop
keycode 160 = XF86AudioMute
keycode 144 = XF86AudioPrev
keycode 153 = XF86AudioNext
keycode 176 = XF86AudioRaiseVolume
keycode 174 = XF86AudioLowerVolume
</PRE></DIV></TD></TR></TBODY></TABLE>
<P>A list of possible keysyms can be found in <FONT style="FONT-FAMILY: monospace" color=green>/usr/lib/X11/XKeysymDB</FONT> or 
<FONT style="FONT-FAMILY: monospace" color=green>/usr/share/X11/XKeysymDB</FONT> 
(the location of XKeysymDB may differ across distributions). The following is a 
list of the more commonly used keysyms as found in XKeysymDB. </P>
<P><BR></P>
<TABLE style="BORDER-RIGHT: #ffbfbf 1px solid; BORDER-TOP: #ffbfbf 1px solid; BORDER-LEFT: #ffbfbf 1px solid; BORDER-BOTTOM: #ffbfbf 1px solid; BACKGROUND-COLOR: #fff2f2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #ffafaf"><FONT size=-1><B>File:</B> /usr/lib/X11/XKeysymDB</FONT> </TD></TR>
  <TR>
    <TD>
      <DIV class=scroll><PRE>XF86ModeLock           &nbsp;:1008FF01
XF86Standby            &nbsp;:1008FF10
XF86AudioLowerVolume   &nbsp;:1008FF11
XF86AudioMute          &nbsp;:1008FF12
XF86AudioRaiseVolume   &nbsp;:1008FF13
XF86AudioPlay          &nbsp;:1008FF14
XF86AudioStop          &nbsp;:1008FF15
XF86AudioPrev          &nbsp;:1008FF16
XF86AudioNext          &nbsp;:1008FF17
</PRE>
      <P>... </P><PRE>XF86HomePage           &nbsp;:1008FF18
XF86Mail               &nbsp;:1008FF19
XF86Start              &nbsp;:1008FF1A
XF86SplitScreen        &nbsp;:1008FF7D
XF86Support            &nbsp;:1008FF7E
XF86Away               &nbsp;:1008FF8D
XF86Messenger          &nbsp;:1008FF8E
XF86WebCam             &nbsp;:1008FF8F
XF86MailForward        &nbsp;:1008FF90
XF86Pictures           &nbsp;:1008FF91
XF86Music              &nbsp;:1008FF92
</PRE></DIV></TD></TR></TBODY></TABLE>
<P><BR></P>
<P>All you have to do now is to call xmodmap whenever your X session starts. 
Usually a good place to do this is your $HOME/.xsession file. </P>
<P><BR></P>
<TABLE style="BORDER-RIGHT: #ffbfbf 1px solid; BORDER-TOP: #ffbfbf 1px solid; BORDER-LEFT: #ffbfbf 1px solid; BORDER-BOTTOM: #ffbfbf 1px solid; BACKGROUND-COLOR: #fff2f2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #ffafaf"><FONT size=-1><B>File:</B> $HOME/.xsession</FONT> </TD></TR>
  <TR>
    <TD>
      <DIV class=scroll><PRE>/usr/bin/xmodmap $HOME/.Xmodmap
</PRE></DIV></TD></TR></TBODY></TABLE>
<P>Remember to substitute $HOME for the full path for your home directory. </P>
<P><B>GDM setup</B><BR>If you are using GDM you can use the file 
/etc/X11/Xmodmap as a system wide Xmodmap. You can also change the location to 
another Xmodmap file if you wish. Simply change sysmodmap=/etc/X11/Xmodmap in 
the file /etc/X11/gdm/Init/Default to whatever you would like. </P>
<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: Assigning keys to special functions" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=4">edit</A>]</DIV><A name=Assigning_keys_to_special_functions></A>
<H2>Assigning keys to special functions </H2>
<P>Now that your multimedia keys have a keysym mapping, you can bind them to 
whatever function you want or your window manager allows you to respectivly. 
</P>
<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: Non window manager specific - xbindkeys" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=5">edit</A>]</DIV><A name=Non_window_manager_specific_-_xbindkeys></A>
<H3>Non window manager specific - xbindkeys </H3>
<P>If your window manager doesn't have a facility for keyboard shortcuts, or 
indeed if you want to switch between multiple window managers/desktop 
environments and keep the same keyboard shortcuts throughout, then xbindkeys may 
be the solution for you. </P>
<P>To install, a simple <FONT style="FONT-FAMILY: monospace" color=green>emerge 
xbindkeys</FONT> will do the trick. </P>
<P>After installation you must edit the config file <FONT style="FONT-FAMILY: monospace" color=green>~/.xbindkeysrc</FONT>. If you don't 
have the file (you won't), you'll get it by running xbindkeys and reading). The 
file is well commented with examples, but for completeness I will give an 
example here. To use the key XF86WWW to open your webbrowser (Firefox in this 
case), place the following code snippet into the config file: </P>
<TABLE style="BORDER-RIGHT: #ffbfbf 1px solid; BORDER-TOP: #ffbfbf 1px solid; BORDER-LEFT: #ffbfbf 1px solid; BORDER-BOTTOM: #ffbfbf 1px solid; BACKGROUND-COLOR: #fff2f2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #ffafaf"><FONT size=-1><B>File:</B> ~/.xbindkeysrc </FONT></TD></TR>
  <TR>
    <TD>
      <DIV class=scroll><PRE>"firefox"
XF86WWW
</PRE><PRE>#General format being:
"command to execute"
key combination
</PRE></DIV></TD></TR></TBODY></TABLE>
<P>You can use various modifiers (alt, shift, ctrl) to add additional shortcuts. 
For example, to launch a urxvt terminal with the key combination Ctrl-n, place 
the following code snippet in your config file: </P>
<TABLE style="BORDER-RIGHT: #ffbfbf 1px solid; BORDER-TOP: #ffbfbf 1px solid; BORDER-LEFT: #ffbfbf 1px solid; BORDER-BOTTOM: #ffbfbf 1px solid; BACKGROUND-COLOR: #fff2f2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #ffafaf"><FONT size=-1><B>File:</B> ~/.xbindkeysrc </FONT></TD></TR>
  <TR>
    <TD>
      <DIV class=scroll><PRE>"urxvt"
Control + n
</PRE></DIV></TD></TR></TBODY></TABLE>
<P>When finished with your config file, simply run the command <FONT style="FONT-FAMILY: monospace" color=green>xbindkeys</FONT> (or 'xbindkeys -n' 
if you do not want xbindkeys to run as a daemon). </P>
<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: Blackbox" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=6">edit</A>]</DIV><A name=Blackbox></A>
<H3>Blackbox </H3>
<P>You will need to emerge bbkeys. Once bbkeys is installed, make sure bbkeys is 
ran whenever you start X. Example xinitrc: </P>
<P><BR></P>
<TABLE style="BORDER-RIGHT: #ffbfbf 1px solid; BORDER-TOP: #ffbfbf 1px solid; BORDER-LEFT: #ffbfbf 1px solid; BORDER-BOTTOM: #ffbfbf 1px solid; BACKGROUND-COLOR: #fff2f2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #ffafaf"><FONT size=-1><B>File:</B> ~/.xinitrc </FONT></TD></TR>
  <TR>
    <TD>
      <DIV class=scroll><PRE>bbkeys &amp;
exec blackbox
</PRE></DIV></TD></TR></TBODY></TABLE>
<P><BR>Now you will need to configure bbkeys. You can either use the global 
configuration file (usually /usr/share/bbkeys/bbkeysrc) or copy it to 
~/.bbkeysrc and edit that instead. You can start from scratch but I recommend 
just adding to the already existing (and quite nice) defaults. Example: </P>
<P><BR></P>
<TABLE style="BORDER-RIGHT: #ffbfbf 1px solid; BORDER-TOP: #ffbfbf 1px solid; BORDER-LEFT: #ffbfbf 1px solid; BORDER-BOTTOM: #ffbfbf 1px solid; BACKGROUND-COLOR: #fff2f2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #ffafaf"><FONT size=-1><B>File:</B> ~/.bbkeysrc </FONT></TD></TR>
  <TR>
    <TD>
      <DIV class=scroll><PRE>[begin] (bbkeys configuration file)
 # * CUT DEFAULTS *
 [keybindings] (begin keybindings)
 # * CUT DEFAULTS *
 [Execute]   (XF86Mail)      {thunderbird}
 [Execute]   (XF86AudioPlay) {xmms --play-pause}
 [Execute]   (XF86AudioStop) {xmms --stop}
 [Execute]   (XF86AudioNext) {xmms --fwd}
 [Execute]   (XF86AudioPrev) {xmms --rew}
 [Execute]   (XF86AudioLowerVolume)  {amixer -q set PCM 2- unmute}
 [Execute]   (XF86AudioRaiseVolume)  {amixer -q set PCM 2+ unmute}
 [end] (end keybindings)
[end] (end bbkeys configuration)
</PRE></DIV></TD></TR></TBODY></TABLE>
<P><BR>That's all there is to it. </P>
<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: Fluxbox" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=7">edit</A>]</DIV><A name=Fluxbox></A>
<H3>Fluxbox </H3>
<P>Open up your <FONT style="FONT-FAMILY: monospace" color=green>~/.fluxbox/keys</FONT> with your favourite editor. To control for 
example the basic XMMS functionality you append my example to your file: </P>
<P><BR></P>
<TABLE style="BORDER-RIGHT: #ffbfbf 1px solid; BORDER-TOP: #ffbfbf 1px solid; BORDER-LEFT: #ffbfbf 1px solid; BORDER-BOTTOM: #ffbfbf 1px solid; BACKGROUND-COLOR: #fff2f2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #ffafaf"><FONT size=-1><B>File:</B> ~/.fluxbox/keys </FONT></TD></TR>
  <TR>
    <TD>
      <DIV class=scroll><PRE>None XF86AudioPlay&nbsp;:ExecCommand /usr/bin/xmms --play-pause
None XF86AudioStop&nbsp;:ExecCommand /usr/bin/xmms --stop
None XF86AudioPrev&nbsp;:ExecCommand /usr/bin/xmms --rew
None XF86AudioNext&nbsp;:ExecCommand /usr/bin/xmms --fwd
None XF86AudioLowerVolume&nbsp;:ExecCommand amixer -q set PCM 2- unmute
None XF86AudioMute&nbsp;:ExecCommand amixer -q set Master toggle
None XF86AudioRaiseVolume&nbsp;:ExecCommand amixer -q set PCM 2+ unmute
</PRE></DIV></TD></TR></TBODY></TABLE>
<P><BR>For certain cards it might work if for mute you put PCM, instead of 
Master. It might give designed effect (volume up button when pressed will unmute 
the card): </P>
<P><BR></P>
<TABLE style="BORDER-RIGHT: #ffbfbf 1px solid; BORDER-TOP: #ffbfbf 1px solid; BORDER-LEFT: #ffbfbf 1px solid; BORDER-BOTTOM: #ffbfbf 1px solid; BACKGROUND-COLOR: #fff2f2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #ffafaf"><FONT size=-1><B>File:</B> ~/.fluxbox/keys </FONT></TD></TR>
  <TR>
    <TD>
      <DIV class=scroll><PRE>None XF86AudioMute&nbsp;:ExecCommand amixer -q set PCM toggle
</PRE></DIV></TD></TR></TBODY></TABLE>
<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: Openbox" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=8">edit</A>]</DIV><A name=Openbox></A>
<H3>Openbox </H3>
<P>Open your <FONT style="FONT-FAMILY: monospace" color=green>~/.config/openbox/rc.xml</FONT> file, search for section keyboard 
and, following the examples add in the end of session: </P>
<P><BR></P>
<TABLE style="BORDER-RIGHT: #ffbfbf 1px solid; BORDER-TOP: #ffbfbf 1px solid; BORDER-LEFT: #ffbfbf 1px solid; BORDER-BOTTOM: #ffbfbf 1px solid; BACKGROUND-COLOR: #fff2f2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #ffafaf"><FONT size=-1><B>File:</B> ~/.config/openbox/rc.xml </FONT></TD></TR>
  <TR>
    <TD>
      <DIV class=scroll><PRE>&lt;keybind key="XF86AudioPlay"&gt;
 &lt;action name="Execute"&gt;&lt;execute&gt;/usr/bin/xmms --play-pause&lt;/execute&gt;&lt;/action&gt;
&lt;/keybind&gt;
&lt;keybind key="XF86AudioStop"&gt;
 &lt;action name="Execute"&gt;&lt;execute&gt;/usr/bin/xmms --stop&lt;/execute&gt;&lt;/action&gt;
&lt;/keybind&gt;</PRE></DIV></TD></TR></TBODY></TABLE>
<P>For more information see documentation of openbox about keybind in <A title=http://icculus.org/openbox/docs.php?page=details.html#keybindings href="http://icculus.org/openbox/docs.php?page=details.html#keybindings">http://icculus.org/openbox/docs.php?page=details.html#keybindings</A>. 
</P>
<P>See about actions in the same page also. </P>
<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: XFCE" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=9">edit</A>]</DIV><A name=XFCE></A>
<H3>XFCE </H3>
<P><B>Note: In xfce &gt; 4.2.3.2 (SVN) the shortcut settings are under <FONT style="COLOR: #000000; BACKGROUND-COLOR: #f2f2ff"><STRONG>Settings &gt; Keyboard 
Settings</STRONG></FONT></B> </P>
<P>Open the Settings Manager, click on "Window Manager" and select the 
"Keyboard" tab. To define our own key bindings we have to create a new theme. 
Click "Add" to create it (note that all key bindings from the default theme are 
copied into the new theme). In the "Command Shortcuts" section doubleclick on an 
empty slot, enter the command you would like to bind and press the according 
key. The keysym from your <FONT style="FONT-FAMILY: monospace" color=green>.Xmodmap</FONT> should appear next to the command if everything 
works as expected. Done. </P>
<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: KDE" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=10">edit</A>]</DIV><A name=KDE></A>
<H3>KDE </H3>
<P>With KDE you can set almost all settings through the Control Center if you 
have a supported keyboard. Go to Control Center -&gt; Regional &amp; 
Accessibility -&gt; Keyboard Layout and choose your Keyboard model (I have a 
Logitech iTouch). </P>
<P>If Keyboard Layout is missing: </P><PRE>$ emerge -av kde-base/kxkb
</PRE>
<P>After you have set your model, use KHotKeys to map the keys to actions. I 
usually use simple DCOP calls to talk to Amarok. </P>
<P>If your keyboard is not supported you can try the following: </P>
<P>If you use kdm as your login manager, kdm will source the file <FONT style="FONT-FAMILY: monospace" color=green>~/.xprofile</FONT> on each login. 
</P>
<P><B>Note:</B> If you use Debian, your Xsession file will be located in <FONT style="FONT-FAMILY: monospace" color=green>/etc/kde[version]/kdm/</FONT> 
(substitute [version] with your KDE version) </P>
<P>Simply create the file <FONT style="FONT-FAMILY: monospace" color=green>~/.Xmodmap</FONT> as mentioned above, then have a line in <FONT style="FONT-FAMILY: monospace" color=green>~/.xprofile</FONT> that has xmodmap 
use it. </P>
<P><BR></P>
<TABLE style="BORDER-RIGHT: #ffbfbf 1px solid; BORDER-TOP: #ffbfbf 1px solid; BORDER-LEFT: #ffbfbf 1px solid; BORDER-BOTTOM: #ffbfbf 1px solid; BACKGROUND-COLOR: #fff2f2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #ffafaf"><FONT size=-1><B>File:</B> ~/.xprofile </FONT></TD></TR>
  <TR>
    <TD>
      <DIV class=scroll><PRE>/usr/bin/xmodmap $HOME/.Xmodmap
</PRE></DIV></TD></TR></TBODY></TABLE>
<P><B>Note:</B> If everything is configured but nothing happens, try to install 
kde-base/kmilo: </P><PRE>$ emerge -av kde-base/kmilo
</PRE>
<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: GNOME" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=11">edit</A>]</DIV><A name=GNOME></A>
<H3>GNOME </H3>
<P>Gnome-2.10: </P>
<P>Go to Desktop &gt; Preferences &gt; Keyboard Shortcuts, or run 
gnome-keyboard-bindings, whichever suits your fancy. Make sure the Sound 
category in the Actions column is expanded, then click on the desired action. 
The entry in the Shortcut column will change to "New accelerator...." Press the 
desired key for the binding, and the shortcut is made. A proper entry should 
look similar to </P>
<TABLE>
  <TBODY>
  <TR>
    <TD><B>Action</B></TD>
    <TD style="WIDTH: 20px"></TD>
    <TD><B>Shortcut</B> </TD></TR>
  <TR>
    <TD>Volume mute</TD>
    <TD></TD>
    <TD>XF86AudioMute </TD></TR></TBODY></TABLE>
<P>If you feel more comfortable with (or are just that more adventurous), open 
up Gnome's Configuration Editor, either through the menus, or through the 
command gconf-editor, then navigate to Apps &gt; gnome_settings_daemon &gt; 
keybindings. For the even-more-adventurous, use your favorite editor (such as 
vim), and open <FONT style="FONT-FAMILY: monospace" color=green>~/.gconf/apps/gnome_settings_daemon/keybindings/%gconf.xml</FONT> 
</P>
<P>A decent set to work with is: </P>
<TABLE style="BORDER-RIGHT: #ffbfbf 1px solid; BORDER-TOP: #ffbfbf 1px solid; BORDER-LEFT: #ffbfbf 1px solid; BORDER-BOTTOM: #ffbfbf 1px solid; BACKGROUND-COLOR: #fff2f2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #ffafaf"><FONT size=-1><B>File:</B> 
      ~/.gconf/apps/gnome_settings_daemon/keybindings/%gconf.xml</FONT> </TD></TR>
  <TR>
    <TD>
      <DIV class=scroll><PRE>&lt;?xml version="1.0"?&gt;
&lt;gconf&gt;
        &lt;entry name="www" mtime="1115511556" type="string"&gt;
                &lt;stringvalue&gt;XF86HomePage&lt;/stringvalue&gt;
        &lt;/entry&gt;
        &lt;entry name="email" mtime="1115511554" type="string"&gt;
                &lt;stringvalue&gt;XF86Mail&lt;/stringvalue&gt;
        &lt;/entry&gt;
        &lt;entry name="next" mtime="1115511504" type="string"&gt;
                &lt;stringvalue&gt;XF86AudioNext&lt;/stringvalue&gt;
        &lt;/entry&gt;
        &lt;entry name="previous" mtime="1115511503" type="string"&gt;
                &lt;stringvalue&gt;XF86AudioPrev&lt;/stringvalue&gt;
        &lt;/entry&gt;
        &lt;entry name="stop" mtime="1115511498" type="string"&gt;
                &lt;stringvalue&gt;XF86AudioStop&lt;/stringvalue&gt;
        &lt;/entry&gt;
        &lt;entry name="play" mtime="1115511489" type="string"&gt;
                &lt;stringvalue&gt;XF86AudioPlay&lt;/stringvalue&gt;
        &lt;/entry&gt;
        &lt;entry name="volume_up" mtime="1116696662" type="string"&gt;
                &lt;stringvalue&gt;XF86AudioRaiseVolume&lt;/stringvalue&gt;
        &lt;/entry&gt;
        &lt;entry name="volume_down" mtime="1115511485" type="string"&gt;
                &lt;stringvalue&gt;XF86AudioLowerVolume&lt;/stringvalue&gt;
        &lt;/entry&gt;
        &lt;entry name="volume_mute" mtime="1116697540" type="string"&gt;
                &lt;stringvalue&gt;XF86AudioMute&lt;/stringvalue&gt;
        &lt;/entry&gt;
&lt;/gconf&gt;</PRE></DIV></TD></TR></TBODY></TABLE>
<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: Window Maker" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=12">edit</A>]</DIV><A name=Window_Maker></A>
<H3>Window Maker </H3>
<P>Adding shortcuts to Window Maker is simple using the Window Maker Preferences 
Utility: WPrefs. By default WPrefs is the third icon down in the dock. If WPrefs 
is no longer in the dock, you can access it on most distros by running the 
following command in an X terminal: </P><PRE>$ /usr/lib/GNUstep/Applications/WPrefs.app/WPrefs
</PRE>
<P>You can go to the keyboard section of WPrefs to bind the extended keys to 
some predefined internal Window Maker commands. </P>
<P>Simply scroll right until the keyboard icon is visible and click on it. </P>
<P>You will see a list of internal commands that you can higlight. Select the 
command you want to bind and then click the "capture" button. Now simply hit the 
key and any modifiers (ctrl, alt, shift etc.) you want to bind to this function. 
</P>
<P>While binding internal Window Maker commands is useful, more useful is 
binding external commands to keystrokes. The only way to do this is to add them 
to the main Window Maker menu, the same menu you can access from right clicking 
on the root window or hitting F12 by default. </P>
<P>In WPrefs you can click on the menu icon: the one next to the keyboard icon 
to access the menu.<BR>An editable version of the menu will pop up outside of 
the main WPref window. You can drag any of the sample elements from the main 
WPrefs window to the editable menu to create a new element of that 
type.<BR>Double-click on an element in the editable menu to change its name. Be 
sure to press Enter after completing the name change or else it will revert. 
</P>
<P>Adding a shortcut to a program entry will result in the shortcut keysym 
showing up in the menu; It will not show up in the editable version of the menu. 
Because the keysyms are a bit ugly you can tidy up the menu by sticking the 
programs in a submenu. </P>
<P>You can add a shortcut to a "Run Program" element by selecting it in the 
dummy menu and clicking the "Capture" button then pressing the key/keystroke you 
want to bind to that program. </P>
<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: Enlightenment DR16" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=13">edit</A>]</DIV><A name=Enlightenment_DR16></A>
<H3>Enlightenment DR16 </H3>
<P>Emerge the e16keyedit package. Then run 'e16keyedit' inside of enlightenment. 
Create a new keybinding, and press the 'Change' button to record a keystroke. 
Just press your new multimedia key and bind it to whatever action you'd like 
(use the 'Run' action to bind it to a command like aumix). Remember to press the 
'Save' button when you're done. </P>
<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: Ion 3" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=14">edit</A>]</DIV><A name=Ion_3></A>
<H3>Ion 3 </H3>
<P>Copy <FONT style="FONT-FAMILY: monospace" color=green>/etc/X11/ion3/cfg_bindings.lua</FONT> to <FONT style="FONT-FAMILY: monospace" color=green>~/.ion3/cfg_bindings.lua</FONT> (if 
you did not do this already) and edit it. By using <I>kpress(KEY, ACTION)</I> 
you can bind actions to multimedia keys: </P>
<TABLE style="BORDER-RIGHT: #ffbfbf 1px solid; BORDER-TOP: #ffbfbf 1px solid; BORDER-LEFT: #ffbfbf 1px solid; BORDER-BOTTOM: #ffbfbf 1px solid; BACKGROUND-COLOR: #fff2f2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #ffafaf"><FONT size=-1><B>File:</B> ~/.ion3/cfg_bindings.lua</FONT> </TD></TR>
  <TR>
    <TD>
      <DIV class=scroll><PRE>   (...)
   bdoc("Mute/Unmute Sound."),
   kpress("AnyModifier+XF86AudioMute", "ioncore.exec_on(_, 'amixer sset Master toggle')"),
   bdoc("Increase Volume."),
   kpress("AnyModifier+XF86AudioRaiseVolume", "ioncore.exec_on(_, 'amixer sset Master 3%+')"),
   bdoc("Decrease Volume."),
   kpress("AnyModifier+XF86AudioLowerVolume", "ioncore.exec_on(_, 'amixer sset Master 3%-')"),
   (...)
</PRE></DIV></TD></TR></TBODY></TABLE>
<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: FVWM and FVWM-Crystal" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=15">edit</A>]</DIV><A name=FVWM_and_FVWM-Crystal></A>
<H3>FVWM and FVWM-Crystal </H3>
<P>Add a binding in your configuration. FVWM-Crystal users can find a 
description of the modifiers used by Crystal in <FONT style="FONT-FAMILY: monospace" color=green>/usr/share/fvwm-crystal/fvwm/components/functions/Keyboard-Modifiers</FONT> 
</P>
<P>Example for Crystal, I use the Aumix mixer here. For a system wide 
configuration, modify the file <FONT style="FONT-FAMILY: monospace" color=green>/usr/share/fvwm-crystal/fvwm/components/functions/Mixer-aumix</FONT>, 
otherwise copy it in <FONT style="FONT-FAMILY: monospace" color=green>~/.fvwm-crystal/components/functions</FONT> and add: </P>
<TABLE style="BORDER-RIGHT: #ffbfbf 1px solid; BORDER-TOP: #ffbfbf 1px solid; BORDER-LEFT: #ffbfbf 1px solid; BORDER-BOTTOM: #ffbfbf 1px solid; BACKGROUND-COLOR: #fff2f2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #ffafaf"><FONT size=-1><B>File:</B> 
      ~/.fvwm-crystal/components/functions/Mixer-aumix</FONT> </TD></TR>
  <TR>
    <TD>
      <DIV class=scroll><PRE>   (...)
   Key XF86AudioLowerVolume A $[Mod0] Mixer-Volume-Down
   Key XF86AudioRaiseVolume A $[Mod0] Mixer-Volume-Up
   (...)
</PRE></DIV></TD></TR></TBODY></TABLE>
<P>Another example with FVWM functions, parameters, external command and key 
modifiers: </P>
<TABLE style="BORDER-RIGHT: #ffbfbf 1px solid; BORDER-TOP: #ffbfbf 1px solid; BORDER-LEFT: #ffbfbf 1px solid; BORDER-BOTTOM: #ffbfbf 1px solid; BACKGROUND-COLOR: #fff2f2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #ffafaf"><FONT size=-1><B>File:</B> 
      ~/.fvwm-crystal/components/functions/Music-myplayer</FONT> </TD></TR>
  <TR>
    <TD>
      <DIV class=scroll><PRE>   (...)
   # Same key with modifiers and call to an external program
   Key XF86AudioMute A $[Mod0] Exec exec alsaplayer --volume 0
   key XF86AudioMute A C Exec exec alsaplayer --volume 1
   (...)
   # Another key with modifiers
   # + FVWM function
   key XF86AudioPlay A $[Mod0] Music-PlayPause
   key XF86AudioPlay A C Music-Pause
   # + FVWM function with parameter
   key XF86AudioPlay A $[Mod1] Music-Speed normal
   (...)
</PRE></DIV></TD></TR></TBODY></TABLE>
<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: Alternative: lineakd or keyTouch" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=16">edit</A>]</DIV><A name=Alternative:_lineakd_or_keyTouch></A>
<H2>Alternative: lineakd or keyTouch</H2>
<P>If you're looking for a possibly easier way to bring your multimedia keys to 
life, you might want to look at "lineakd" or keyTouch (<A title=http://keytouch.sf.net href="http://keytouch.sf.net/">http://keytouch.sf.net/</A>). Lineak is available via portage (see 
<A title=http://lineak.sourceforge.net href="http://lineak.sourceforge.net/">http://lineak.sourceforge.net/</A> for details). </P>
<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: Sample: eMachines m68xx" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=17">edit</A>]</DIV><A name=Sample:_eMachines_m68xx></A>
<H2>Sample: eMachines m68xx </H2>
<P>If you own an eMachines m68xx notebook and want to jump right to using the 
keys, you can use the following to setup the keys. NB: These were created on an 
m6809, but I assume they're the same for the other m68xx models, if you have 
access to one of the other models and can confirm/deny this, please update this 
page. </P>
<P>First, we update the the keysyms. On an x86_64 system the file we want is 
<FONT style="FONT-FAMILY: monospace" color=green>/usr/lib64/X11/xkb/symbols/inet</FONT>. Insert the following code: 
</P>
<TABLE style="BORDER-RIGHT: #ffbfbf 1px solid; BORDER-TOP: #ffbfbf 1px solid; BORDER-LEFT: #ffbfbf 1px solid; BORDER-BOTTOM: #ffbfbf 1px solid; BACKGROUND-COLOR: #fff2f2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #ffafaf"><FONT size=-1><B>File:</B> /usr/lib64/X11/xkb/symbols/inet </FONT></TD></TR>
  <TR>
    <TD>
      <DIV class=scroll><PRE> // eMachines

 partial alphanumeric_keys
 xkb_symbols "emachines" {
     name[Group1]= "Laptop/notebook eMachines m68xx";

     key &lt;I2E&gt; {       [ XF86AudioLowerVolume  ]       };
     key &lt;I6D&gt; {       [ XF86AudioMedia        ]       };
     key &lt;I30&gt; {       [ XF86AudioRaiseVolume  ]       };
     key &lt;I20&gt; {       [ XF86AudioMute ]       };
     key &lt;I6C&gt; {       [ XF86Mail      ]       };
     key &lt;I32&gt; {       [ XF86iTouch    ]       };
     key &lt;I65&gt; {       [ XF86Search    ]       };
     key &lt;I5F&gt; {       [ XF86Sleep     ]       };
     key &lt;I22&gt; {       [ XF86AudioPlay, XF86AudioPause ]       };
     key &lt;I24&gt; {       [ XF86AudioStop ]       };
     key &lt;I10&gt; {       [ XF86AudioPrev ]       };
     key &lt;I19&gt; {       [ XF86AudioNext ]       };
     key &lt;KP0&gt; {       [ KP_0  ]       };
     key &lt;KP1&gt; {       [ KP_1  ]       };
     key &lt;KP2&gt; {       [ KP_2  ]       };
     key &lt;KP3&gt; {       [ KP_3  ]       };
     key &lt;KP4&gt; {       [ KP_4  ]       };
     key &lt;KP5&gt; {       [ KP_5  ]       };
     key &lt;KP6&gt; {       [ KP_6  ]       };
     key &lt;KP7&gt; {       [ KP_7  ]       };
     key &lt;KP8&gt; {       [ KP_8  ]       };
     key &lt;KP9&gt; {       [ KP_9  ]       };
     key &lt;KPDL&gt;        {       [ KP_Decimal    ]       };
     key &lt;KPAD&gt;        {       [ KP_Add        ]       };
     key &lt;KPSU&gt;        {       [ KP_Subtract   ]       };
     key &lt;KPMU&gt;        {       [ KP_Multiply   ]       };
     key &lt;KPDV&gt;        {       [ KP_Divide     ]       };
 };
 
</PRE></DIV></TD></TR></TBODY></TABLE>
<P>Now, we add the required references to this keyboard layout to <FONT style="FONT-FAMILY: monospace" color=green>X11/kxb/rules/(xorg</FONT> </P>
<P>In the xorg file we add it to the list of <I>$inetkbds</I> like so: </P>
<P><BR></P>
<TABLE style="BORDER-RIGHT: #ffbfbf 1px solid; BORDER-TOP: #ffbfbf 1px solid; BORDER-LEFT: #ffbfbf 1px solid; BORDER-BOTTOM: #ffbfbf 1px solid; BACKGROUND-COLOR: #fff2f2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #ffafaf"><FONT size=-1><B>File:</B> /usr/lib64/X11/xkb/rules/xorg </FONT></TD></TR>
  <TR>
    <TD>
      <DIV class=scroll><PRE> ! $inetkbds = airkey acpi scorpius azonaRF2300 \
              brother \
              btc5113rf btc5126t btc9000 btc9000a btc9001ah btc5090\
              cherryblue cherrybluea cherryblueb \
              chicony chicony9885 \
              compaqeak8 compaqik7 compaqik13 compaqik18 armada presario ipaq \
              dell inspiron dtk2000 \
              dexxa diamond genius geniuscomfy2 \
              emachines ennyah_dkb1008 \
              hpi6 hp2501 hp2505 hp5181 hpxe3gc hpxe3gf hpxe4xxx hpzt11xx \
              hp500fa hp5xx hp5185 \
              honeywell_euroboard \
              rapidaccess rapidaccess2 rapidaccess2a \
              ltcd logiaccess logicdp logicdpa logicink logiciink \
              logiinkse logiinkseusb logiik itouch \
              mx1998 mx2500 mx2750 \
              microsoftinet microsoftpro microsoftprooem microsoftprose \
              microsoftoffice microsoftmult \
              oretec \
              propeller \
              qtronix \
              samsung4500 samsung4510 \
              sk1300 sk2500 sk6200 sk7100 \
              sven symplon toshiba_s3000 trust trustda yahoo
 
</PRE></DIV></TD></TR></TBODY></TABLE>
<P>In <FONT style="FONT-FAMILY: monospace" color=green>xorg.lst</FONT> we add 
one line among the large list of models. </P>
<P><BR></P>
<TABLE style="BORDER-RIGHT: #ffbfbf 1px solid; BORDER-TOP: #ffbfbf 1px solid; BORDER-LEFT: #ffbfbf 1px solid; BORDER-BOTTOM: #ffbfbf 1px solid; BACKGROUND-COLOR: #fff2f2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #ffafaf"><FONT size=-1><B>File:</B> /usr/lib64/X11/xkb/rules/xorg.lst </FONT></TD></TR>
  <TR>
    <TD>
      <DIV class=scroll><PRE> ...
 emachines     Laptop/notebook eMachines m68xx
 ...
 
</PRE></DIV></TD></TR></TBODY></TABLE>
<P>And finally in <FONT style="FONT-FAMILY: monospace" color=green>xorg.xml</FONT> we give it a description, which can be localized. 
</P>
<P><BR></P>
<TABLE style="BORDER-RIGHT: #ffbfbf 1px solid; BORDER-TOP: #ffbfbf 1px solid; BORDER-LEFT: #ffbfbf 1px solid; BORDER-BOTTOM: #ffbfbf 1px solid; BACKGROUND-COLOR: #fff2f2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #ffafaf"><FONT size=-1><B>File:</B> /usr/lib64/X11/xkb/rules/xorg.xml </FONT></TD></TR>
  <TR>
    <TD>
      <DIV class=scroll><PRE>    ...
    &lt;model&gt;
      &lt;configItem&gt;
        &lt;name&gt;emachines&lt;/name&gt;
        &lt;description&gt;Laptop/notebook eMachines m68xx&lt;/description&gt;
      &lt;/configItem&gt;
    &lt;/model&gt;
    ...
 
</PRE></DIV></TD></TR></TBODY></TABLE>
<P>Now, after all that, restart your X server and there's a fresh new m68xx 
keyboard waiting to be selected. In KDE this can be selected easily by opening 
the Keyboard Layout Control Module and choosing the newly added "Laptop/notebook 
eMachines m68xx" from the Keyboard Model list. Any of the specials keys can then 
be bound as shortcuts the way you configure any other shortcut. </P>
<P>Since this is at the X server level, and system wide, it should be accessible 
to all users in any window manager. </P>
<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: Getting bizzare keyboards working" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=18">edit</A>]</DIV><A name=Getting_bizzare_keyboards_working></A>
<H2>Getting bizzare keyboards working</H2>
<P>I have an HP keyboard that has a volume wheel. Unfortunately, this and half 
of the other buttons don't generate X keyboard events, so I wrote a perl script 
to take care of those keys. It's a bit of a pain to use, but it will get ANY 
keys or buttons that the keyboard sends working, by going to the low level evdev 
interface. </P>
<P>In the kernel, enable the "Event interface" driver (evdev module) to get 
kernel support. </P>
<P>Then, grab the photkeys script (Description: <A title=http://thequux.com/modules/zmagazine/article.php?articleid=2 href="http://thequux.com/modules/zmagazine/article.php?articleid=2">http://thequux.com/modules/zmagazine/article.php?articleid=2</A> 
Download: <A title=http://thequux.com/modules/wmpdownloads/ href="http://thequux.com/modules/wmpdownloads/">http://thequux.com/modules/wmpdownloads/</A>), and follow the 
instructions there to set it up. </P>
<P><BR></P>
<TABLE style="BORDER-RIGHT: #bfffbf 1px solid; BORDER-TOP: #bfffbf 1px solid; BORDER-LEFT: #bfffbf 1px solid; BORDER-BOTTOM: #bfffbf 1px solid; BACKGROUND-COLOR: #f2fff2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-RIGHT: #a0ffa0 1px solid; BORDER-TOP: #a0ffa0 1px solid; BORDER-LEFT: #a0ffa0 1px solid; BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #c1ffc1"><FONT size=-1><B>Code:</B> You should run this script like this</FONT> </TD></TR>
  <TR>
    <TD><PRE>gus alexg # photkeys /dev/input/event1
Unrecognized event: '4:4:28'. Define it in /usr/bin/photkeys
...
Unrecognized event: '4:4:139'. Define it in /usr/bin/photkeys
</PRE></TD></TR></TBODY></TABLE>
<P>For me when I press buttons something appears in /dev/input/event1, may be in 
your system device file would be different. </P>
<P>... Or check one of this alternatives: </P>
<UL>
  <LI>Input Event Manager <A title=http://powerman.asdfgroup.com/Projects/input_event/ href="http://powerman.asdfgroup.com/Projects/input_event/">http://powerman.asdfgroup.com/Projects/input_event/</A> I hope it 
  much more flexible, stable and "less pain to use".&nbsp;:-) 
  <LI>EvRouter (<A title=http://www.bedroomlan.org/~alexios/coding_evrouter.html href="http://www.bedroomlan.org/~alexios/coding_evrouter.html">http://www.bedroomlan.org/~alexios/coding_evrouter.html</A>) 
</LI></UL>
<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: Command Line Functions to Control Common Applications" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=19">edit</A>]</DIV><A name=Command_Line_Functions_to_Control_Common_Applications></A>
<H2>Command Line Functions to Control Common Applications </H2>
<P>Many applications have methods to control them from command line. These are 
perfect for creating shortcuts to use with multimedia keys. </P>
<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: xmms" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=20">edit</A>]</DIV><A name=xmms></A>
<H3>xmms </H3>
<P>xmms has some straightforward command line switches. You can see more by 
executing this command in a terminal: </P><PRE>$ man xmms
</PRE>
<P><BR></P>
<TABLE style="BORDER-RIGHT: #bfffbf 1px solid; BORDER-TOP: #bfffbf 1px solid; BORDER-LEFT: #bfffbf 1px solid; BORDER-BOTTOM: #bfffbf 1px solid; BACKGROUND-COLOR: #f2fff2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-RIGHT: #a0ffa0 1px solid; BORDER-TOP: #a0ffa0 1px solid; BORDER-LEFT: #a0ffa0 1px solid; BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #c1ffc1"><FONT size=-1><B>Code:</B> xmms command line switches from the xmms 
      manpage</FONT> </TD></TR>
  <TR>
    <TD><PRE>xmms --rew        # Skip backwards in playlist.
xmms --stop       # Stop current song.
xmms --play-pause # Pause if playing, play otherwise.
xmms --fwd        # Skip forward in playlist.
</PRE></TD></TR></TBODY></TABLE>
<P>Also, xmms has a plugin in portage called&nbsp;: xmms-itouch. It allows you 
to configure your media keys with ease. </P>
<DIV style="BORDER-RIGHT: #a0ffa0 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: #a0ffa0 1px solid; PADDING-LEFT: 2px; PADDING-BOTTOM: 1px; BORDER-LEFT: #a0ffa0 1px solid; PADDING-TOP: 1px; BORDER-BOTTOM: #a0ffa0 1px solid; BACKGROUND-COLOR: #c1ffc1"><B>Note:</B> 
Sometimes itouch incorrectly detects keys (or the keyboard reports them wrongly. 
In my case it set the backspace key (22) to start calc so i couldn't then use 
backspace while xmms is running. All the media keys should have relatively high 
values ~120+. </DIV>
<P><BR></P>
<DIV style="BORDER-RIGHT: #a0ffa0 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: #a0ffa0 1px solid; PADDING-LEFT: 2px; PADDING-BOTTOM: 1px; BORDER-LEFT: #a0ffa0 1px solid; PADDING-TOP: 1px; BORDER-BOTTOM: #a0ffa0 1px solid; BACKGROUND-COLOR: #c1ffc1"><B>Note:</B> 
This works the same for Audacious. Just replace any 'xmms' with 'audacious'. 
</DIV>
<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: Rhythmbox" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=21">edit</A>]</DIV><A name=Rhythmbox></A>
<H3>Rhythmbox </H3>
<P>Like xmms, Rhythmbox can be controlled using the command line: </P>
<TABLE style="BORDER-RIGHT: #bfffbf 1px solid; BORDER-TOP: #bfffbf 1px solid; BORDER-LEFT: #bfffbf 1px solid; BORDER-BOTTOM: #bfffbf 1px solid; BACKGROUND-COLOR: #f2fff2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-RIGHT: #a0ffa0 1px solid; BORDER-TOP: #a0ffa0 1px solid; BORDER-LEFT: #a0ffa0 1px solid; BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #c1ffc1"><FONT size=-1><B>Code:</B> rhythmbox-client command line switches</FONT> </TD></TR>
  <TR>
    <TD><PRE>rhythmbox-client --previous   # Skip backwards in playlist
rhythmbox-client --next       # Skip forward in playlist
rhythmbox-client --play-pause # Pause if playing, play otherwise
rhythmbox-client --pause      # Pause
</PRE></TD></TR></TBODY></TABLE>
<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: amarok" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=22">edit</A>]</DIV><A name=amarok></A>
<H3>amarok </H3>
<TABLE style="BORDER-RIGHT: #bfffbf 1px solid; BORDER-TOP: #bfffbf 1px solid; BORDER-LEFT: #bfffbf 1px solid; BORDER-BOTTOM: #bfffbf 1px solid; BACKGROUND-COLOR: #f2fff2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-RIGHT: #a0ffa0 1px solid; BORDER-TOP: #a0ffa0 1px solid; BORDER-LEFT: #a0ffa0 1px solid; BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #c1ffc1"><FONT size=-1><B>Code:</B> amarok command line switches from "dcop amarok 
      player" (v. 1.4.4)</FONT> </TD></TR>
  <TR>
    <TD><PRE>QCStringList interfaces()
QCStringList functions()
QString version()
bool dynamicModeStatus()
bool equalizerEnabled()
bool osdEnabled()
bool isPlaying()
bool randomModeStatus()
bool repeatPlaylistStatus()
bool repeatTrackStatus()
int getVolume()
int sampleRate()
int score()
int rating()
int status()
int trackCurrentTime()
int trackCurrentTimeMs()
int trackPlayCounter()
int trackTotalTime()
QString album()
QString artist()
QString bitrate()
QString comment()
QString coverImage()
QString currentTime()
QString encodedURL()
QString engine()
QString genre()
QString lyrics()
QString lyricsByPath(QString path)
QString lastfmStation()
QString nowPlaying()
QString path()
QString setContextStyle(QString)
QString title()
QString totalTime()
QString track()
QString type()
QString year()
void configEqualizer()
void enableOSD(bool enable)
void enableRandomMode(bool enable)
void enableRepeatPlaylist(bool enable)
void enableRepeatTrack(bool enable)
void mediaDeviceMount()
void mediaDeviceUmount()
void mute()
void next()
void pause()
void play()
void playPause()
void prev()
void queueForTransfer(KURL url)
void seek(int s)
void seekRelative(int s)
void setEqualizer(int,int,int,int,int,int,int,int,int,int,int)
void setEqualizerEnabled(bool active)
void setEqualizerPreset(QString name)
void setLyricsByPath(QString url,QString lyrics)
void setBpm(float bpm)
void setBpmByPath(QString url,float bpm)
void setScore(int score)
void setScoreByPath(QString url,int score)
void setRating(int rating)
void setRatingByPath(QString url,int rating)
void setVolume(int volume)
void setVolumeRelative(int ticks)
void showBrowser(QString browser)
void showOSD()
void stop()
void transferDeviceFiles()
void volumeDown()
void volumeUp()
void transferCliArgs(QStringList args)
</PRE></TD></TR></TBODY></TABLE>
<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: Quod Libet" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=23">edit</A>]</DIV><A name=Quod_Libet></A>
<H3>Quod Libet </H3>
<TABLE style="BORDER-RIGHT: #bfffbf 1px solid; BORDER-TOP: #bfffbf 1px solid; BORDER-LEFT: #bfffbf 1px solid; BORDER-BOTTOM: #bfffbf 1px solid; BACKGROUND-COLOR: #f2fff2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-RIGHT: #a0ffa0 1px solid; BORDER-TOP: #a0ffa0 1px solid; BORDER-LEFT: #a0ffa0 1px solid; BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #c1ffc1"><FONT size=-1><B>Code:</B> Quod Libet command line switches from "quodlibet 
      --help"</FONT> </TD></TR>
  <TR>
    <TD><PRE> quodlibet --previous   # Skip backwards in playlist
 quodlibet --play       # Start playing current playlist
 quodlibet --play-pause # Play if stopped, pause if playing
 quodlibet --pause      # Pause playback
 quodlibet --next       # Skip forwards in playlis
</PRE></TD></TR></TBODY></TABLE>
<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: MPD/MPC" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=24">edit</A>]</DIV><A name=MPD.2FMPC></A>
<H3>MPD/MPC </H3>
<P>If you use MPD your client may already support some keysyms. For instance 
gmpc correctly recognises XF86AudioNext, XF86AudioPrev, XF86AudioStop, and 
XF86AudioPlay. </P>
<P>If you do not use gmpc, or do not want to leave gmpc running then you may 
want to bind these keys to short cuts to the command line MPD client, mpc. first 
you must install mpc by executing: </P><PRE>$ emerge mpc
</PRE>
<P>The mpc command line switches are: </P>
<P><BR></P>
<TABLE style="BORDER-RIGHT: #bfffbf 1px solid; BORDER-TOP: #bfffbf 1px solid; BORDER-LEFT: #bfffbf 1px solid; BORDER-BOTTOM: #bfffbf 1px solid; BACKGROUND-COLOR: #f2fff2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-RIGHT: #a0ffa0 1px solid; BORDER-TOP: #a0ffa0 1px solid; BORDER-LEFT: #a0ffa0 1px solid; BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #c1ffc1"><FONT size=-1><B>Code:</B> mpc switches from "mpc --help"</FONT> </TD></TR>
  <TR>
    <TD><PRE>mpc next     # Play the next song in the current playlist
mpc prev     # Play the previous song in the current playlist
mpc toggle   # Toggles Play/Pause, plays if stopped
mpc stop     # Stop the currently playing playlists
</PRE></TD></TR></TBODY></TABLE>
<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: ALSA" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=25">edit</A>]</DIV><A name=ALSA></A>
<H3>ALSA </H3>
<P>alsa can be controlled using amixer. The following commands will adjust the 
PCM levels of your ALSA soundcard. </P>
<P><BR></P>
<TABLE style="BORDER-RIGHT: #bfffbf 1px solid; BORDER-TOP: #bfffbf 1px solid; BORDER-LEFT: #bfffbf 1px solid; BORDER-BOTTOM: #bfffbf 1px solid; BACKGROUND-COLOR: #f2fff2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-RIGHT: #a0ffa0 1px solid; BORDER-TOP: #a0ffa0 1px solid; BORDER-LEFT: #a0ffa0 1px solid; BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #c1ffc1"><FONT size=-1><B>Code:</B> Controling PCM levels with amixer</FONT> </TD></TR>
  <TR>
    <TD><PRE>amixer sset PCM 2+       # This will increase the PCM hardware volume value by 2
amixer sset PCM 2-       # This will decrease the PCM hardware volume value by 2
amixer sset PCM toggle   # This will toggle the PCM between muted and unmuted states
</PRE></TD></TR></TBODY></TABLE>
<DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px">[<A title="Edit section: Banshee player" href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit&amp;section=26">edit</A>]</DIV><A name=Banshee_player></A>
<H3>Banshee player </H3>
<TABLE style="BORDER-RIGHT: #bfffbf 1px solid; BORDER-TOP: #bfffbf 1px solid; BORDER-LEFT: #bfffbf 1px solid; BORDER-BOTTOM: #bfffbf 1px solid; BACKGROUND-COLOR: #f2fff2" cellspacing=0 cellpadding=0 width="75%">
  <TBODY>
  <TR>
    <TD style="BORDER-RIGHT: #a0ffa0 1px solid; BORDER-TOP: #a0ffa0 1px solid; BORDER-LEFT: #a0ffa0 1px solid; BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #c1ffc1"><FONT size=-1><B>Code:</B> Banshee command line switches from "banshee 
      --help"</FONT> </TD></TR>
  <TR>
    <TD><PRE>Usage: banshee [ options ... ]
       where options include:
...
  --show              Show window
  --hide              Hide window
  --next              Play next song
  --previous          Play previous song
  --toggle-playing    Toggle playing of current song
  --play              Play current song
  --pause             Pause current song
  --shutdown          Shutdown Banshee
...
</PRE></TD></TR></TBODY></TABLE><!-- 
Pre-expand include size: 16000 bytes
Post-expand include size: 15341 bytes
Template argument size: 4938 bytes
Maximum: 2097152 bytes
--><!-- Saved in parser cache with key wiki:pcache:idhash:2758-0!1!0!!en!2 and timestamp 20070309200434 -->
<DIV class=printfooter>Retrieved from "<A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys">http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys</A>"</DIV><!-- end content -->
<DIV class=visualClear></DIV></DIV></DIV></DIV>
<DIV id=column-one>
<DIV class=portlet id=p-cactions>
<H5>Views</H5>
<UL>
  <LI class=selected id=ca-nstab-main><A href="http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys">Article</A> 
  <LI id=ca-talk><A href="http://gentoo-wiki.com/Talk:HOWTO_Use_Multimedia_Keys">Discussion and 
  Bugs</A> 
  <LI id=ca-edit><A href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=edit">Edit 
  This Page</A> 
  <LI id=ca-history><A href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;action=history">History</A> 
  </LI></UL></DIV>
<DIV class=portlet id=p-personal>
<H5>Personal tools</H5>
<DIV class=pBody>
<UL>
  <LI id=pt-login><A href="http://gentoo-wiki.com/index.php?title=Special:Userlogin&amp;returnto=HOWTO_Use_Multimedia_Keys">Log 
  in / create account</A> </LI></UL></DIV></DIV>
<DIV class=portlet id=p-logo><A title="Main Page" style="BACKGROUND-IMAGE: url-filtered(/images/wiki.png)" href="http://gentoo-wiki.com/Main_Page"></A></DIV>


<DIV class=portlet id=p-navigation>
<H5>Navigation</H5>
<DIV class=pBody>
<UL>
  <LI id=n-mainpage><A href="http://gentoo-wiki.com/Main_Page">Main Page</A> 
  <LI id=n-currentevents><A href="http://gentoo-wiki.com/News">Wiki News</A> 
  <LI id=n-recentchanges><A href="http://gentoo-wiki.com/Special:Recentchanges">Recent changes</A> 
  <LI id=n-randompage><A href="http://gentoo-wiki.com/Special:Random">Random 
  page</A> 
  <LI id=n-help><A href="http://gentoo-wiki.com/Help:Contents">Help</A> 
</LI></UL></DIV></DIV>
<DIV class=portlet id=p-search>
<H5>Search</H5>
<DIV class=pBody id=searchBody>
<FORM id=searchform action=/Special:Search>
<DIV><INPUT id=searchInput name=search> <INPUT class=searchButton id=searchGoButton type=submit value=Go name=go>&nbsp; <INPUT class=searchButton type=submit value=Search name=fulltext> 
</DIV></FORM></DIV></DIV>
<DIV class=portlet id=p-ib>
<H5>Indexes</H5>
<DIV class=pBody>
<UL>
  <LI><A title=Index:HOWTO href="http://gentoo-wiki.com/Index:HOWTO">HOWTO 
  Index</A> 
  <LI><A title=Index:TIP href="http://gentoo-wiki.com/Index:TIP">Tips &amp; 
  Tricks</A> 
  <LI><A title=Index:MAN href="http://gentoo-wiki.com/Index:MAN">MAN Pages</A> 
  <LI><A title=Index:Hardware href="http://gentoo-wiki.com/Index:Hardware">Hardware</A> 
  <LI><A title=Index:Security href="http://gentoo-wiki.com/Index:Security">Security</A> 
  <LI><A title=Index:FAQ href="http://gentoo-wiki.com/Index:FAQ">FAQ</A> 
  <LI><A title=Index:Screenshots href="http://gentoo-wiki.com/Index:Screenshots">Screenshots</A> 
  <LI><A title=Index:Misc href="http://gentoo-wiki.com/Index:Misc">Misc</A> 
  <LI><A title=Index:Index href="http://gentoo-wiki.com/Index:Index">Other 
  Indexes</A> </LI></UL>
<HR>

<UL>
  <LI><A title=Help:Contents href="http://gentoo-wiki.com/Help:Contents">Wiki 
  Pages</A> 
  <LI><A title=Wanted href="http://gentoo-wiki.com/Wanted">Wanted Articles</A> 
  <LI><A title=Special:Categories href="http://gentoo-wiki.com/Special:Categories">Categories</A> 
</LI></UL></DIV></DIV>
<DIV class=portlet id=p-tb>
<H5>Toolbox</H5>
<DIV class=pBody>
<UL>
  <LI id=t-whatlinkshere><A href="http://gentoo-wiki.com/index.php?title=Special:Whatlinkshere&amp;target=HOWTO_Use_Multimedia_Keys">What 
  links here</A> 
  <LI id=t-recentchangeslinked><A href="http://gentoo-wiki.com/index.php?title=Special:Recentchangeslinked&amp;target=HOWTO_Use_Multimedia_Keys">Related 
  changes</A> 
  <LI id=t-upload><A href="http://gentoo-wiki.com/Special:Upload">Upload 
  file</A> 
  <LI id=t-specialpages><A href="http://gentoo-wiki.com/Special:Specialpages">Special pages</A> 
  <LI id=t-print><A href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;printable=yes">Printable 
  version</A> 
  <LI id=t-permalink><A href="http://gentoo-wiki.com/index.php?title=HOWTO_Use_Multimedia_Keys&amp;oldid=98594">Permanent 
  link</A> </LI></UL></DIV></DIV>
<DIV class=portlet id=p-lang>
<H5>In other languages</H5>
<DIV class=pBody>
<UL>
  <LI class=interwiki-ru><A href="http://ru.gentoo-wiki.com/HOWTO_Мультимедийные_кнопки_(клавиши)">Русский</A> 
  </LI></UL></DIV></DIV></DIV><!-- end of the left (by default at least) column -->
<DIV class=visualClear></DIV>
<DIV id=footer>
<DIV id=f-poweredbyico><A href="http://www.mediawiki.org/"><IMG alt=MediaWiki></A></DIV>
<UL id=f-list>
  <LI id=lastmod>This page was last modified 20:16, 4 February 2007. 
  <LI id=viewcount>This page has been accessed 41,297 times. 
  <LI id=privacy><A title="Gentoo Linux Wiki:Privacy policy" href="http://gentoo-wiki.com/Gentoo_Linux_Wiki:Privacy_policy">Privacy 
  policy</A> 
  <LI id=about><A title="Gentoo Linux Wiki:About" href="http://gentoo-wiki.com/Gentoo_Linux_Wiki:About">About Gentoo Linux 
  Wiki</A> 
  <LI id=disclaimer><A title="Gentoo Linux Wiki:General disclaimer" href="http://gentoo-wiki.com/Gentoo_Linux_Wiki:General_disclaimer">Disclaimers</A> 
  </LI></UL></DIV>

</DIV><!-- Served by gentoo-wiki.com in 0.252 secs. --></BODY></HTML>