{"id":96,"date":"2006-08-05T20:39:01","date_gmt":"2006-08-05T19:39:01","guid":{"rendered":"http:\/\/jerome.harckmans.be\/?p=96"},"modified":"2006-08-05T20:39:01","modified_gmt":"2006-08-05T19:39:01","slug":"new-mouse-in-xorg","status":"publish","type":"post","link":"https:\/\/jerome.harckmans.be\/?p=96","title":{"rendered":"New Mouse in Xorg"},"content":{"rendered":"<p>Last Week I updated my Gentoo box from Xorg 6.x to <a title=\"Gentoo Modular Xorg\" href=\"http:\/\/www.gentoo.org\/news\/20060630-modular-x.xml\">Modular Xorg 7.0<\/a>, which is radically different: Xorg now consists of a bunch of small modules instead of a big package.<\/p>\n<p>I didn&#8217;t encounter many problems during this upgrade, and you shouldn&#8217;t as long as you follow the <a title=\"Gentoo Modular Xorg - Migration Guide\" href=\"http:\/\/www.gentoo.org\/proj\/en\/desktop\/x\/x11\/modular-x-howto.xml\">gentoo migration guide<\/a>.<\/p>\n<p>This week, I bought a new &#8220;gamer&#8221; mouse: the <a title=\"My new mouse\" href=\"http:\/\/www.trust.com\/products\/product.aspx?artnr=14463\">Trust &#8220;Predator&#8221; GM-4200<\/a>.<\/p>\n<p>Of course, I wanted all buttons to be active and usable in X. So here&#8217;s the way I&#8217;ve followed to make it working:<\/p>\n<p>First I had to re-emerge Xorg, but with the evdev module integrated. So I added &#8220;evdev&#8221; into the &#8220;INPUT_DEVICES&#8221; section of <strong>\/etc\/make.conf<\/strong>:<\/p>\n<div class=\"coding\">INPUT_DEVICES=&#8221;keyboard evdev mouse wacom&#8221;<\/div>\n<p>Then I modified the <strong>xorg.conf<\/strong> file:<\/p>\n<div class=\"coding\">Section &#8220;InputDevice&#8221;<br \/>\nIdentifier &#8220;Mouse1&#8221;<br \/>\nDriver &#8220;evdev&#8221;<br \/>\nOption &#8220;Device&#8221; &#8220;\/dev\/input\/event1&#8221;<br \/>\nOption &#8220;Buttons&#8221; &#8220;10&#8221;<br \/>\nOption &#8220;ZAxisMapping&#8221; &#8220;4 5&#8221;<br \/>\nOption &#8220;AlwaysCore&#8221; &#8220;on&#8221;<br \/>\nEndSection<\/div>\n<p>You can see that I defined this mouse with 10 buttons, altough it physically has only 8. In fact, buttons 6 and 7 are automatically assumed as being the left and right wheel tilt (option I don&#8217;t have on my mouse). At that point, all my buttons are recognized, but still not usable.<\/p>\n<p>So, finally, I installed <strong>xvkbd<\/strong> and <strong>xbindkeys<\/strong>, and added the following into my <strong>~\/.xbindkeysrc<\/strong> file:<\/p>\n<div class=\"coding\"># Back using button 8<br \/>\n&#8220;xvkbd -xsendevent -text &#8220;\\[Alt_L]\\[Left]&#8221;&#8221;<br \/>\nb:8<br \/>\n# Forward using button 9<br \/>\n&#8220;xvkbd -xsendevent -text &#8220;\\[Alt_L]\\[Right]&#8221;&#8221;<br \/>\nb:9<br \/>\n# Close TAB using button 10<br \/>\n&#8220;xvkbd -xsendevent -text &#8220;\\[Control_L]\\[w]&#8221;&#8221;<br \/>\nb:10<\/div>\n<p>After launching <strong>xbindkeys<\/strong> (you may want to add it in the automatically started applications), the defined action will be performed after pressing the correspondant mouse button: buttons 8 and 9 navigate backward and forward in Firefox, and button 10 closes active Tab.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last Week I updated my Gentoo box from Xorg 6.x to Modular Xorg 7.0, which is radically different: Xorg now consists of a bunch of small modules instead of a<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,6],"tags":[],"_links":{"self":[{"href":"https:\/\/jerome.harckmans.be\/index.php?rest_route=\/wp\/v2\/posts\/96"}],"collection":[{"href":"https:\/\/jerome.harckmans.be\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jerome.harckmans.be\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jerome.harckmans.be\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/jerome.harckmans.be\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=96"}],"version-history":[{"count":0,"href":"https:\/\/jerome.harckmans.be\/index.php?rest_route=\/wp\/v2\/posts\/96\/revisions"}],"wp:attachment":[{"href":"https:\/\/jerome.harckmans.be\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=96"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jerome.harckmans.be\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=96"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jerome.harckmans.be\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=96"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}