<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.linuxmce.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Loopback59</id>
	<title>LinuxMCE - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.linuxmce.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Loopback59"/>
	<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php/Special:Contributions/Loopback59"/>
	<updated>2026-07-22T03:16:21Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Use_Additional_Mouse_Buttons&amp;diff=8869</id>
		<title>Use Additional Mouse Buttons</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Use_Additional_Mouse_Buttons&amp;diff=8869"/>
		<updated>2008-02-13T15:41:07Z</updated>

		<summary type="html">&lt;p&gt;Loopback59: /* How it works */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
  | __TOC__&lt;br /&gt;
  |}&lt;br /&gt;
[[Category: Input]]&lt;br /&gt;
[[Category: Tutorials]]&lt;br /&gt;
&#039;&#039;&#039;Abstract&#039;&#039;&#039;&lt;br /&gt;
This is an article, explaining how to use additional mousebuttons as substitude to F6, F7, F8.&lt;br /&gt;
&lt;br /&gt;
This way, LinuxMCE can be controlled with a (wireless) mouse only, without the need to have a keyboard nearby...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Prerequisits ==&lt;br /&gt;
First of all, we need the packets xautomation (which should be installed allready) and xbindkeys.&lt;br /&gt;
&lt;br /&gt;
Before installing them, wen need to append &amp;quot;deb &amp;lt;nowiki&amp;gt;http://archive.ubuntu.com/ubuntu/&amp;lt;/nowiki&amp;gt; feisty universe&amp;quot; to /etc/apt/sources.list temporarely and resync the repository (see [[Editing_Text]]).&lt;br /&gt;
&amp;lt;pre&amp;gt;#get a console:&lt;br /&gt;
sudo nano -w /etc/apt/sources.list&lt;br /&gt;
#add the following:&lt;br /&gt;
deb http://archive.ubuntu.com/ubuntu/ feisty universe&lt;br /&gt;
#CTRL+X and Y to exit and save&lt;br /&gt;
#update the repository&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
#Remember to remove the line afterwards and do an update again&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we need to install those 2 packets:&lt;br /&gt;
&amp;lt;pre&amp;gt;#get a console:&lt;br /&gt;
sudo apt-get install xbindkeys&lt;br /&gt;
sudo apt-get install xautomation&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
We use &#039;&#039;&#039;xautomation (xte)&#039;&#039;&#039; to simulate the key-presses:&lt;br /&gt;
If you want to send a keypress of F8 to the X-Server, the command &amp;quot;xte &#039;key F8&#039;&amp;quot; will do the trick.&lt;br /&gt;
If you only want to send that the key was pressed, call &amp;quot;xte &#039;keydown F8&amp;quot;.&lt;br /&gt;
additionally you can event move the mouse or do clicks with it. For more information have a look at &amp;quot;man xte&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To catch the keypresses on the mouse, we use &#039;&#039;&#039;xbindkeys&#039;&#039;&#039;. The syntax of the config-file is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;xterm&amp;quot;&lt;br /&gt;
   control+shift + q&amp;lt;/pre&amp;gt;&lt;br /&gt;
so within the &amp;quot;&amp;quot; is the command to call and below is the key to bind the command to.&lt;br /&gt;
possible keys are control, shift, alt, ... and for mouse-buttons b:1, b:2, b:3, ...&lt;br /&gt;
&lt;br /&gt;
== Configuring it ==&lt;br /&gt;
Combining those two, we derive the following configfile, which i saved at /etc/xbindkeysrc:&lt;br /&gt;
&amp;lt;pre&amp;gt;#get a console&lt;br /&gt;
sudo nano -w /etc/xbindkeysrc&lt;br /&gt;
#Add the following&lt;br /&gt;
&amp;quot;xte &#039;keydown F6&#039; &amp;amp;&amp;quot;&lt;br /&gt;
  b:8&lt;br /&gt;
&amp;quot;xte &#039;keyup F6&#039; &amp;amp;&amp;quot;&lt;br /&gt;
  b:8+release&lt;br /&gt;
&lt;br /&gt;
&amp;quot;xte &#039;keydown F7&#039; &amp;amp;&amp;quot;&lt;br /&gt;
  b:2&lt;br /&gt;
&amp;quot;xte &#039;keyup F7&#039; &amp;amp;&amp;quot;&lt;br /&gt;
  b:2+release&lt;br /&gt;
&lt;br /&gt;
&amp;quot;xte &#039;keydown F8&#039; &amp;amp;&amp;quot;&lt;br /&gt;
  b:9&lt;br /&gt;
&amp;quot;xte &#039;keyup F8&#039; &amp;amp;&amp;quot;&lt;br /&gt;
  b:9+release&lt;br /&gt;
#Close it with CTRL+X and Save with Y&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we still have to start xbindkeys within the X-Server... As I do not know LinuxMCE too well, I just looked for some good spot and /usr/pluto/bin/lmce_launch_manager.sh seemed to be one. Now it looks like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;#get a console&lt;br /&gt;
sudo nano -w /usr/pluto/bin/lmce_launch_manager.sh&lt;br /&gt;
#add the line with xbindkeysrc&lt;br /&gt;
...&lt;br /&gt;
xbindkeys -f /etc/xbindkeysrc      #&amp;lt;--- the added stuff&lt;br /&gt;
&lt;br /&gt;
KDE_DEBUG=1&lt;br /&gt;
LM_BINARY=/usr/pluto/bin/lmce_launch_manager&lt;br /&gt;
LM_EXIT_CODE=-1&lt;br /&gt;
...&lt;br /&gt;
#CTRL+X to exit and Y to save&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Result ==&lt;br /&gt;
After a reboot, the mouse-buttons 8, 2 and 9 should act as F6, F7 and F9 even passing when a key is held pressed, which was the right setup for me.&lt;br /&gt;
If you want something different, just change b:9 for b:6 for example.&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t know the numbers of your mousebuttons, start the &amp;quot;application&amp;quot; xev. Click into the small black box and look at the console for the output &amp;quot;ButtonPress event, .... button X&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
In case you do not get all the buttons of your mouse, e.g. 8 and 9 report as being 1 and 2 (that was the case with my mouse), try replacing the following in /etc/X11/xorg.conf&lt;br /&gt;
 Option          &amp;quot;Protocol&amp;quot;              &amp;quot;ImPS/2&amp;quot;&lt;br /&gt;
with&lt;br /&gt;
 Option          &amp;quot;Protocol&amp;quot;              &amp;quot;ExplorerPS/2&amp;quot;&lt;/div&gt;</summary>
		<author><name>Loopback59</name></author>
	</entry>
</feed>