As I mentioned in the last post, I picked up a Microsoft Remote Keyboard at the Rochester Hamfest. It’s a neat little device — it was designed by Microsoft for their Media Center computers, so it has all of the buttons for a regular remote control, as well as a keyboard and a pointing device similar to a Trackpoint. Essentially, it replaces a keyboard, a mouse, and a remote with a single unit.
Since I already have a Microsoft remote control on my MythTV box, and the Remote Keyboard uses the same infrared receiver, I assumed that adding the keyboard would just be a matter of aiming it at the receiver. Oh, boy, was I wrong.
After Googling around for a while, though, I finally managed to find some useful information on Ubuntu Forums. Specifically, this walkthrough by North_Pole. I’m reproducing the information here, in case the forum post gets deleted at some point. The only additional information that I will provide is that it also works with Ubuntu 8.10 (which is what I am using), as well as 9.04.
—begin clip—
1. Install some required modules with
$ sudo apt-get install lirc lirc-modules-source module-assistant
2. and then run the following command
$ sudo dpkg-reconfigure lirc-modules-source
3. Open the the hardware.conf file with this command
$ sudo gedit /etc/lirc/hardware.conf
4. Change two of the lines so they look like this:
REMOTE_MODULES="lirc_mod_mce" LOAD_MODULES="true"
Save and exit.
5. Run the following commands
$ sudo m-a update,prepare $ sudo m-a clean lirc $ sudo m-a a-i -f lirc (if this one fails, choose "skip and continue with the next operation") $ sudo depmod -a
6. Download and unpack the attached files “lircd.conf” and “lircrc”. Put them in /etc/lirc. (Note from matt: these are the standard LIRC MCE remote files, available from mythtv.org or lirc.org.)
7. Now download the lirc_mod_mce v.0.1.5 file from http://sourceforge.net/project/showf…kage_id=203215, but be sure to download version 0.1.5 and NOT the v0.2.0. The later one has the famous “keypress repeats forever”-bug and should be avoided. Unpack the archive on e.g. your desktop.
8. Replace the “lirc_dev.h” file with the one located in “/usr/src/%YOUR_LIRC_VERSION%/drivers/lirc_dev”
9. In the file named “lirc_mod_mce.c”, you have to change one of the lines:
input_dev->cdev.dev = &dev->dev; to input_dev->dev.parent = &dev->dev;
Save and exit.
10. Now, execute
$ sudo make
11. Create a new directory in “/lib/modules/%YOUR_CURRENT_KERNEL%” and name it “misc”.
12. Some extra files have been created in the “lirc_mod_mce” directory.
One of them is “lirc_mod_mce.ko”. Copy it to the new directory you just created.
13. Run
sudo depmod -a modprobe lirc_mod_mce
14. At last we have to blacklist the “lirc_mceusb2” module. Otherwise it will
interfere with the “lirc_mod_mce” one and make all of our work useless. Execute:
$ sudo gedit /etc/modprobe.d/blacklist.conf
and add the line
blacklist lirc_mceusb2
15. Reboot
16. And VOILA! Your MCE Keyboard should be working!
—end clipping—
Gee, I can’t believe that people think Linux isn’t ready for typical users. This all seems so simple, right?