Using the official mythtv wiki I managed to get my ATI remote working without lirc on one of my boxes running Ubuntu 11.10. Unfortunately the trick, for some reason, didn’t work on 12.04.
I found a solution on the mythtvtalk forum, using evdev.conf file instead of a statement in xorg.conf
We need to install a patched evdev-driver that will understand keys greater than 255 by giving access to the “event_key_remap option”.
First the evdev package has to be build. For that reason download the following packages:
sudo apt-get install evtest git-core build-essential xserver-xorg-dev xutils-dev libtool autoconf checkinstall
Download the evdev source:
git clone git://www.thenautilus.net/xf86-input-evdev
git pull git://www.thenautilus.net/xf86-input-evdev code-remap-x.x.x
NB. check the latest code-remap version. Latest as of this writing is 2.8.0
And build the driver:
Or build a debian package out of it using the checkinstall-command (apt-get install checkinstall)
NB. I got some errors during the “autogen” part. I had to install some additional packages:
sudo apt-get install build-essential libx11-dev libxi-dev x11proto-input-dev xserver-xorg-dev libxrandr-dev libncurses5-dev autoconf libtool libudev-dev
Backup old evdev driver
mv evdev_drv.so evdev_drv.so.backup
Copy new driver
sudo cp /usr/local/lib/xorg/modules/input/evdev_drv.so /usr/lib/xorg/modules/input/evdev_drv.so
Instead of backing-up, renaming and copying you could simple add this line to the “Files” section of the xorg.conf (If you have any):
Restart X (Restart the computer, or log-out and in again)
Determine your device/keycodes.
You’ll now see a list of evdev devices numbered 0-? find one that looks like the device you want to reconfigure and enter it’s number. Now press buttons on your device to ensure you have the right one. It should tell you what buttons you press. Take note of the keycodes of the buttons you want to change. For example, when I press the power button on my remote, I see:
Event: time XXXXXXXXXX.XXXXXX, type 1 (Key), code 116 (Power), value 1
So this means I want to change code 116 to a different keycode. Do this with all the buttons you want to change.
Also, now that you know you have the right device, take note of it’s name. For example, for my ATI Remote Wonder, I saw the following list when i ran “sudo evtest”:
/dev/input/event0: Power Button
/dev/input/event1: Power Button
/dev/input/event2: AT Translated Set 2 keyboard
/dev/input/event3: X10 Wireless Technology Inc USB Receiver
Mine was event 3, so I would make note of “X10….Receiver”
Press CTRL-C to exit evtest.
Okay, we have the device name and the keycodes we want to change FROM.
Now for the keycodes we want to change TO, you can run “sudo evtest” using your keyboard’s event# and pressing the keys to find their keycodes, or download Xmodmap, which contains a list.
Edit your evdev.conf file
Section "InputClass" Identifier "ATI Remote" # Or whatever you want to call it MatchProduct "X10 Wireless Technology Inc USB Receiver" # Replace this with your #device name. MatchDevicePath "/dev/input/event*" Driver "evdev" Option "event_key_remap" "18=26 113=75 115=95 119=33 116=9 128=9 132=25 139=58 156=31 159=102 168=100 207=36 277=156 352=36 389=157 402=98 403=104" EndSection#
ev RC xmod mythtv
#18 E 26 Edit
#113 mute 75 F9
#116 Power 9 Escape
#119 Pause 33 p
#128 Stop 9 Escape
#139 Menu 58 m
#132 scale 25 w
#114 vol- 76 F10
#115 vol+ 95 F11
#156 book 31 I Guide
#159 FF 102 Right
#168 RW 100 Left
#207 play 36 Return
#277 TV 156
#352 OK 36 Return
#389 DVD 157
#402 ch+ 98 Up
#403 ch- 104 Down
sudo restart lightdm
or restart your computer.Source: http://www.mythtvtalk.com/how-i-got-my-ati-remote-work-ubuntu-11-10-a-15257