At long last I've done it... and here is how
First install the ati_remote.c and configure it as below:
Quote:
{KIND_FILTERED, 0x3d, 0x78, EV_KEY, KEY_ENTER, 1}, /* left ati_remote button */
//{KIND_LITERAL, 0x3e, 0x79, EV_KEY, BTN_LEFT, 0},
{KIND_FILTERED, 0x41, 0x7c, EV_KEY, KEY_ESC, 1}, /* right ati_remote button */
//{KIND_LITERAL, 0x42, 0x7d, EV_KEY, BTN_RIGHT, 0},
/* ati_remote */
{KIND_FILTERED, 0x35, 0x70, EV_KEY, KEY_LEFT, 1}, /* left */
{KIND_FILTERED, 0x36, 0x71, EV_KEY, KEY_RIGHT, 1}, /* right */
{KIND_FILTERED, 0x37, 0x72, EV_KEY, KEY_UP, 1}, /* up */
{KIND_FILTERED, 0x38, 0x73, EV_KEY, KEY_DOWN, 1}, /* down */
{KIND_LU, 0x39, 0x74, EV_REL, 0, 0}, /* left up */
{KIND_RU, 0x3a, 0x75, EV_REL, 0, 0}, /* right up */
{KIND_LD, 0x3c, 0x77, EV_REL, 0, 0}, /* left down */
{KIND_RD, 0x3b, 0x76, EV_REL, 0, 0}, /* right down */
/* keyboard.. */
{KIND_FILTERED, 0xe2, 0x1d, EV_KEY, KEY_LEFT, 1}, /* key left */
{KIND_FILTERED, 0xe4, 0x1f, EV_KEY, KEY_RIGHT, 1}, /* key right */
{KIND_FILTERED, 0xe7, 0x22, EV_KEY, KEY_DOWN, 1}, /* key down */
{KIND_FILTERED, 0xdf, 0x1a, EV_KEY, KEY_UP, 1}, /* key left */
{KIND_FILTERED, 0xe3, 0x1e, EV_KEY, KEY_ENTER, 1}, /* key enter */
{KIND_FILTERED, 0xd2, 0x0d, EV_KEY, KEY_1, 1},
{KIND_FILTERED, 0xd3, 0x0e, EV_KEY, KEY_2, 1},
{KIND_FILTERED, 0xd4, 0x0f, EV_KEY, KEY_3, 1},
{KIND_FILTERED, 0xd5, 0x10, EV_KEY, KEY_4, 1},
{KIND_FILTERED, 0xd6, 0x11, EV_KEY, KEY_5, 1},
{KIND_FILTERED, 0xd7, 0x12, EV_KEY, KEY_6, 1},
{KIND_FILTERED, 0xd9, 0x14, EV_KEY, KEY_8, 1},
{KIND_FILTERED, 0xda, 0x15, EV_KEY, KEY_9, 1},
{KIND_FILTERED, 0xdc, 0x17, EV_KEY, KEY_0, 1},
{KIND_FILTERED, 0xdd, 0x18, EV_KEY, KEY_D, 1}, /* key "checkbox" */
{KIND_FILTERED, 0xc5, 0x00, EV_KEY, KEY_F8, 1},
{KIND_FILTERED, 0xc6, 0x01, EV_KEY, KEY_PROG3, 1},
{KIND_FILTERED, 0xde, 0x19, EV_KEY, KEY_HOME, 1},
{KIND_FILTERED, 0xe0, 0x1b, EV_KEY, KEY_END, 1},
{KIND_FILTERED, 0xe6, 0x21, EV_KEY, KEY_I, 1},
{KIND_FILTERED, 0xe8, 0x23, EV_KEY, KEY_O, 1},
{KIND_FILTERED, 0xdb, 0x16, EV_KEY, KEY_M, 1}, /* key menu */
{KIND_FILTERED, 0xc7, 0x02, EV_KEY, KEY_ESC, 1}, /* key power */
{KIND_FILTERED, 0xc8, 0x03, EV_KEY, KEY_PROG1, 1}, /* key TV */
{KIND_FILTERED, 0xc9, 0x04, EV_KEY, KEY_PROG2, 1}, /* key DVD */
{KIND_FILTERED, 0xca, 0x05, EV_KEY, KEY_WWW, 1}, /* key Web */
{KIND_FILTERED, 0xcb, 0x06, EV_KEY, KEY_Z, 1}, /* key "open book" */
{KIND_FILTERED, 0xcc, 0x07, EV_KEY, KEY_C, 1}, /* key "hand" */
{KIND_FILTERED, 0xe1, 0x1c, EV_KEY, KEY_ESC, 1}, /* key "timer" */
{KIND_FILTERED, 0xce, 0x09, EV_KEY, KEY_F10, 1}, //COL DOWN
{KIND_FILTERED, 0xcd, 0x08, EV_KEY, KEY_F11, 1}, //VOL UP
{KIND_FILTERED, 0xcf, 0x0a, EV_KEY, KEY_F9, 1}, //MUTE
{KIND_FILTERED, 0xd1, 0x0c, EV_KEY, KEY_DOWN, 1}, /* next channel*/
{KIND_FILTERED, 0xd0, 0x0b, EV_KEY, KEY_UP, 1}, /* prev channel */
{KIND_FILTERED, 0xec, 0x27, EV_KEY, KEY_R, 1}, //RECORD
{KIND_FILTERED, 0xea, 0x25, EV_KEY, KEY_P, 1}, /* PLAY */
{KIND_FILTERED, 0xe9, 0x24, EV_KEY, KEY_PAGEUP, 1}, //REWIND
{KIND_FILTERED, 0xeb, 0x26, EV_KEY, KEY_PAGEDOWN, 1}, //FASTFORWARD
{KIND_FILTERED, 0xed, 0x28, EV_KEY, KEY_ESC, 1}, //STOP
{KIND_FILTERED, 0xee, 0x29, EV_KEY, KEY_P, 1}, //PAUSE
{KIND_FILTERED, 0xe5, 0x20, EV_KEY, KEY_ENTER, 1}, /* maximize */
{KIND_END, 0x00, 0x00, EV_MAX+1, 0, 0} /* END */
then download and installed the packages:
Quote:
libxosd2_2.2.7-1_i386.deb
hotkeys_0.5.7.1.1_i386.deb
create your own keyboard costom config. Here is mine:
/usr/share/hotkeys/ati_remote.def
Quote:
<?xml version="1.0"?>
<definition>
<config model="ATI Remote">
<WebBrowser keycode="178"/> <!-- My Home -->
<userdef keycode="171" command="xterm -rv">Terminal </userdef>
<userdef keycode="153" command="mythfrontend">TV</userdef>
<userdef keycode="144" command="ogle">DVD</userdef>
</config>
<contributor>
<name>Gnarl</name>
</contributor>
</definition>
It is very easy to modify the def file to suit your needs. Here is a list of what I believe to be the default keycodes. I found this online so if they are wrong, don't blame me.
Quote:
a 38
b 56
power 222
tv 153
dvd 144
web 178
book 230
hand 126
mouse left
mouse right
volume - 165
volume + 158
mute 166
channel - 99
channel + 105
1 10
2 11
3 12
4 13
5 14
6 15
7 16
8 17
9 18
list 176
0 19
validation 108
c 54
d 40
? 146
left 100
up 98
ok 36
down 104
right 102
fullscreen 106
e 26
f 41
rewind 152
play 168
forward 233
rec 177
stop 232
pause 110
Note: When adding a user defined key to the .def file you also change that mapping on your keyboard (A, B...F keys). It is a good idea to change those values in the ati_remote.c file to something else. You can find valid keys in the input.h file. To map these keycodes use xev. and make the keycode additions/changes to the ati_remote.def
Edit the line /etc/hotkeys.conf to make your ati_remote the default keyboard so you don't need to specify the default keyboard on hotkeys startup
I added hotkeys to my /home/mythtv/.fvwm/.fvwm2rc file to start with fvwm