<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d23884446\x26blogName\x3dJust+Another+Tech+Blog\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dSILVER\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttp://justanothertechblog.blogspot.com/search\x26blogLocale\x3den_US\x26v\x3d2\x26homepageUrl\x3dhttp://justanothertechblog.blogspot.com/\x26vt\x3d-8342903261382138056', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Just Another Tech Blog

Anything and everything having to do with technology, computers, science, and most of all... Linux! The documentation of my Linux endeavor.



Enabling Media Keys on the Saitek Eclipse II Keyboard (Ubuntu 8.04 and most other Linux distros)

Monday, June 23, 2008

IMAGE BY TECHGAGE!One of the few problems I experienced in my recent fresh install of Ubuntu 8.04 (Hardy Heron) was the non-functionality of the media keys on my Saitek Eclipse II keyboard. This problem came as quite the odd surprise, seeing as the keys worked great in 7.04 and 7.10. It has always been puzzling to me that a new release can actually take a step backwards in terms of device compatibility... but what do I know? I don't code it, so it must be harder than it looks.
Either way, I soon set out to find a solution for this irksome issue I had on my hands. Who would have guessed that salvation came in the form of a Gentoo wiki page? Nice eh? Well, if you have explored that link a bit, you may note that it is quite lengthy and perhaps just a tad confusing for the Linux newbie. So... I bring you my simplified version! I have taken only the essential steps that were required to get the media keys on my Saitek Eclipse II keyboard working. I am sure that the guide works for other keyboards as well.

The first step of this process is find the raw scancodes that the kernel spits out and X interprets when a key is pressed. To do this in a nice, simple fasion, issue the following command and press the keys you would like to configure in an order that you can remember:

xev | sed -n s/"^.*keycode *\([0-9]\+\).*$"/"keycode \1 = "/p | uniq
Close the window when you are done. There should be an out put left that looks somewhat like so:

keycode 36 =
keycode 144 =
keycode 162 =
keycode 164 =

The first line isn't actually a media key, so just ignore/ delete it.

Now, we must set up xmodmap to recognize the keys and assign them their proper keysyms. In your home directory, create a file named .Xmodmap. In this file, you will enter the appropriate keysysm to match the media key. My file ended up looking like this:

keycode 162 = XF86AudioPlay
keycode 164 = XF86AudioStop
keycode 144 = XF86AudioPrev
keycode 153 = XF86AudioNext

You can find all possible keysyms listed in the following file on Ubuntu: /usr/share/X11/XKeysymDB.
This should now all be automatically loaded at startup. If it doesn't... try:

/usr/bin/xmodmap $HOME/.Xmodmap

Now that we have the keys properly identified and configured, we can assign them to the actions of our choice. I like to have my keys set up in Amarok, so I set the to their respective functions under Settings > Configure Global Shortcuts. You can also set the keys through gnome by going to System > Preferences > Keyboard Shortcuts. However, in the past, I have noted that this can cause conflict with Amarok, so I usually just leave the keys disabled in the Keyboard Shortcuts dialog (Amarok will handle them just fine that way).

If all went well, that should get you full support for you mutlimedia keys in Ubuntu and Amarok. If it doesn't work, then take a look around the wiki page... maybe you will find something that fixs the issue or (even better) inspires you to come up with your own hacks and workarounds :D

Have fun!

Note from the Nerd: Many thanks to the people who contributed to the Gentoo wiki page I have so extensively referenced in this post!
posted by linnerd40, Monday, June 23, 2008


3 Comments:

This blog provides various information related to seo india, seo optmization, seo blog, seo search engine optimization, seo resources and cheap seo services.
For more info:seo india

commented by Blogger Shobhit, 1:00 AM  

The Spanish blog is systematically organized into a menu and comes across as a user-friendly and easy to browse site. No surprises that the blog has more than 950 readers and encourages readers to actively participate in the enrichment of the blog by participating in the forums and submitting any latest stories up their sleeves.IE AntiVirus

情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,按摩棒,跳蛋,充氣娃娃,情境坊歡愉用品,情趣用品,情人節禮物,情惑用品性易購,A片,視訊聊天室

免費A片,AV女優,美女視訊,情色交友,免費AV,色情網站,辣妹視訊,美女交友,色情影片,成人影片,成人網站,A片,H漫,18成人,成人圖片,成人漫畫,情色網,日本A片,免費A片下載,性愛

A片,色情,成人,做愛,情色文學,A片下載,色情遊戲,色情影片,色情聊天室,情色電影,免費視訊,免費視訊聊天,免費視訊聊天室,一葉情貼圖片區,情色,情色視訊,免費成人影片,視訊交友,視訊聊天,視訊聊天室,言情小說,愛情小說,AIO,AV片,A漫,av dvd,聊天室,自拍,情色論壇,視訊美女,AV成人網,色情A片,SEX

情趣用品,A片,免費A片,AV女優,美女視訊,情色交友,色情網站,免費AV,辣妹視訊,美女交友,色情影片,成人網站,H漫,18成人,成人圖片,成人漫畫,成人影片,情色網


情趣用品,A片,免費A片,日本A片,A片下載,線上A片,成人電影,嘟嘟成人網,成人,成人貼圖,成人交友,成人圖片,18成人,成人小說,成人圖片區,微風成人區,成人文章,成人影城,情色,情色貼圖,色情聊天室,情色視訊,情色文學,色情小說,情色小說,臺灣情色網,色情,情色電影,色情遊戲,嘟嘟情人色網,麗的色遊戲,情色論壇,色情網站,一葉情貼圖片區,做愛,性愛,美女視訊,辣妹視訊,視訊聊天室,視訊交友網,免費視訊聊天,美女交友,做愛影片

av,情趣用品,a片,成人電影,微風成人,嘟嘟成人網,成人,成人貼圖,成人交友,成人圖片,18成人,成人小說,成人圖片區,成人文章,成人影城,愛情公寓,情色,情色貼圖,色情聊天室,情色視訊,情色文學,色情小說,情色小說,色情,寄情築園小遊戲,情色電影,aio,av女優,AV,免費A片,日本a片,美女視訊,辣妹視訊,聊天室,美女交友,成人光碟

情趣用品.A片,情色,情色貼圖,色情聊天室,情色視訊,情色文學,色情小說,情色小說,色情,寄情築園小遊戲,情色電影,色情遊戲,色情網站,聊天室,ut聊天室,豆豆聊天室,美女視訊,辣妹視訊,視訊聊天室,視訊交友網,免費視訊聊天,免費A片,日本a片,a片下載,線上a片,av女優,av,成人電影,成人,成人貼圖,成人交友,成人圖片,18成人,成人小說,成人圖片區,成人文章,成人影城,成人網站,自拍,尋夢園聊天室

commented by Blogger sexy, 2:31 AM  

Add a comment