A few things, mostly technical notes...

Monday, January 07, 2008

How to use ATI REMOTE Wonder II Remote for MythTv Frontend?

How to use ATI REMOTE Wonder II Remote for MythTv Frontend?


Inspired by their wiki-page, I ended up buying ATI REMOTE WONDER II Remote for my new MythTv Front End system. Here's how I setup
this remote control using xmodmap.


Here's how it works: (1) Launch myth front end with a custom keymap. (2) When we finish and exit myth frontend, reset the keymap to
the normal (sane keymap)


Step 0: Disable gnome-screensaver


I added the following to root's crontab to prevent auto screen lock whenever I pressed the lock button:

* * * * * /usr/bin/killall gnome-screensaver 1>/dev/null 2>/dev/null || :


Step 1: Create default/sane keymap


Fire up a terminal window (xterm/gnome-terminal) and run:

xmodmap -pke > /somedir/sanekeys.txt


Step 2: Create a launcher for myth front end


Let us call it /usr/bin/wmyth. Here would be its content.

#! /bin/bash

/usr/bin/xmodmap /somedir/map.txt | /usr/bin/mythfrontend 2>/dev/null
/usr/bin/xmodmap /somedir/sanekeys.txt


Step 3: Create /somedir/map.txt


Place the following as /somedir/map.txt:

! power
keycode 222 = F1
! scan
keycode 229 = F2
! mute
keycode 160 = F3
! recall
keycode 133 = F4
! stop
keycode 232 = F5
! play
keycode 179 = p
! <<
keycode 152 = Q
! >>
keycode 233 = U
! vol+
keycode 176 = F10
! vol-
keycode 174 = F11
! options
keycode 41 = o
! options1
keycode 136 = o
! options2
keycode 56 = F8
! escape
keycode 232 = Escape
! pause
keycode 110 = p
! ff
keycode 102 = Right
! rew
keycode 100 = Left
! arippa
keycode 158 = Escape
! red
keycode 54 = d
! green
keycode 40 = i
keycode 119 = i
keycode 140 = w
! record
keycode 177 = z



Step 4: Launch wmyth, enjoy.

2 comments:

Anonymous said...

This worked well thanks. Do you know if the "OK" "CH+" and "CH-" buttons work on yours? I can't seem to get those to work.

Anonymous said...

If I remember correctly it is a limitation of the X windows. It doesn't support key codes above 256. The remote uses the higher key codes. There may be a way of having them mapped to a lower keycode, but I do not know how. Maybe evdev?

Followers


Creative Commons License
This work is licensed under a Creative Commons License.