Difference between revisions of "ATI Remote Wonder II"

From MythTV Official Wiki
Jump to: navigation, search
(section reorg; added content to applications, overview, wiring, types; added refs, began hotlinking)
m (Appendix E - ati_remote2 keycode configuration)
 
(9 intermediate revisions by 7 users not shown)
Line 1: Line 1:
This article describes how to extend IR reception using [[do-it-yourself|do-it-yourself (DIY)]] parts, a [[Hauppauge PVR-350|Hauppauge PVR-350]] (or similar) TV tuner with IR remote control, retail products and commercial equipment.
+
One common remote used for controlling MythTV is the ATI Remote Wonder IIHighly popular for Windows and MacOS machines, the RWII is also supported under linux by the ati_remote2 kernel module or by using the [http://www.lirc.org LIRC project].  Here is a short guide for getting it configured with MythTV.
 
{{tip box|An [[RF Remote]] can be used instead of an IR remote removing the need to extend an [[IR receiver]] in the first place (eg., the [[ATI Remote Wonder]])}}
 
 
 
[[Image:hauppauge1.jpg|450px|right|Early Hauppauge remote with receiver]]
 
   
 
==Applications for extending an IR receiver==
 
Moving a MythTV (or any media center machine for that matter) to a location other than that of the display can often be the most affordable solution to the stubborn problem of noise. Space constraints or aestetics may prevent a machine from residing near the display. Power-users often centralize their equipment to a machine room in the basement such as this  [http://ultimatemythtv.wordpress.com/ fellow] has.
 
  
Ultimately, if the machine that needs to be controlled is not within [[line-of-sight|line-of-sight (LOS)]] of the remote control or outside of it's nominal range, an IR receiver mounted in the viewing room can be wired to the remotely installed frontend. A classic example is the common practice of moving the machine to a cupboard or room [under the stairs] because space isn't available in a small apartment.
+
== MythTV, ATI Remote Wonder II and Kernel Keymap Modification ==
  
[[Image:Hauppauge2.jpg|thumb|90px|right|IR receiver dongle]]
+
Starting with Linux 2.6.28 the ati_remote2 v0.3 kernel module supports kernel scancode-to-keycode mapping modification. This functionality allows the keycodes generated by the ati_remote2 kernel module for a given button on the remote control to be modified. This is useful because by default a number of the keycodes generated by the ati_remote2 kernel module have values greater than 255, which when combined with the limitation of the X windows system being unable to handle keycodes with such values, results in the offending buttons on the remote being unusable within MythTV.
  
Another popular practice with the advent of the wall mounted flat-panel display is to hide all of the existing home theatre equipment in a rack or enclosure flush to a wall or hiding them behind a panel or in a nearby closet, thus creating a streamlined or minimalist decor.
+
Modifying the kernel scancode-to-keycode mapping for any buttons with keycode values greater than 255 to give them values less than 255 makes these buttons usable within X and consequently within MythTV.
  
In this scenario each piece of equipment would also need to have it's respective IR signal forwarded or "repeated". An [[IR - control system|IR control system]] would be used to collect, concentrate and then deliver the signals from any remote control to the proper piece of equipment (eg. HT receiver, sat/cable box, DVD).
+
The simplest way to modify the kernel scancode-to-keycode mapping is to use the "setkeycodes" program. This program accepts pairs of command line parameters consisting of a scancode, in hexadecimal, and a keycode, in decimal. The scancode is the code generated by the hardware, the keycode is the code generated in software by the kernel module in response and sent to the rest of the system. A table of scancodes for the ATI Remote Wonder II can be obtained from [[#Appendix C - ati_remote2 scancodes|Appendix C]]. A table of keycodes can be obtained from [[#Appendix D - keycodes < 255| Appendix D]].
  
Regardless of the control system used to forward the IR signals, the room where a user will control the equipment must have some form of IR receiver which should be mounted in a location where the user's remote control will maintain maximum LOS. In most cases the IR receiver cable supplied with many tuner cards (often called a "[[dongle]]") isn't long enough to reach the remotely located machine.  
+
The ATI Remote Wonder II can operate in one of five modes, AUX1, AUX2, AUX3, AUX4, and PC. Each button generates a different scancode for each of the five modes. Therefore, each button can be configured to generate a different keycode for each of the five modes if so desired. The scancodes consist of two bytes, the upper byte is the index of the mode, the lower byte is the button's code.
  
These receivers use a small IR diode encased in plastic leading to a short three-conductor cord which terminates in a connector, typically a 2.5mm stereo phone plug or DB-9 serial port connector.
+
So, for example, if we wished to map the "OK" button (0x5C) in PC mode (0x04), which has a default keycode of KEY_OK (352), to be KEY_ENTER (28) we would use:
  
{{Warning box|small|
+
<pre><nowiki>
msg=IR receivers that connect using a USB port such as the [[MCE Remote|MCE remote]] cannot be extended using the methods below. [[Other]] methods can be used with these types of IR dongles. Cutting the cord of an IR receiver that does not follow the electrical specifications listed below ''may be damaged or destroyed''.}}
+
setkeycodes 0x045C 28
 +
</nowiki></pre>
  
Additionally, the methods used in this article extend to the use of [[home-built IR receiver]]s, ready-built [[do-it-yourself|do-it-yourself (DIY)]], retail and commercial offerings. Furthermore, a remote computer running [[lirc] can be used as a powerful IR control system as [http://www.gossamer-threads.com/lists/mythtv/users/296900#296900 described] by Mike Dean at the [[mythtv-users-l]]. Many of the prebuilt and retail solutions also include an [[IR blaster]] making them a [[transceiver]]. Lirc can be configured to use an emitter, blaster or direct wiring to control external components such as set top boxes for cable or sat, your TV and even your A/V receiver. With some scripting finesse, a complete automation system can be designed around Lirc.
+
If we didn't want to worry about which mode (AUX1 (0x00), AUX2 (0x01), AUX3 (0x02), AUX4 (0x03), or PC (0x04)) the remote was in when we used it, we could use:
  
==Overview of IR recievers==
+
<pre><nowiki>
An IR receiver at a minimum consists of an IR detecting diode such as the Vishay TSOP 17xx series ([http://www.vishay.com/docs/82030/82030.pdf datasheet, PDF]) which detects the IR energy pulses and converts them to an electrical signal. The diode requires voltage to operate, a signal line to transmit the signal, and a ground. A diode is often used to provide rudimentary over-voltage protection and a voltage regulator can be used to provide more exacting regulation. Here is a schematic from Trimbitas Sorin's [http://stuff.nekhbet.ro/2006/07/10/make-an-infrared-remote-control-for-pc.html#comment-47105 excellent blogpost] which details the typical application of an IR detecting diode.
+
setkeycodes 0x005C 28 0x015C 28 0x025C 28 0x035C 28 0x045C 28
+
</nowiki></pre>
[Image:.jpg|100px|center]
 
 
The detection device usually requires +5V but can often be packaged with a voltage regulator expecting higher voltages. Many [[#Extending IR using commercial products|commercial]] receivers require +12V and have additional capabilities such as talkback LED's to indicate when a button is being pressed. Always refer to the supplied documentation for proper usage.
 
  
An IR receiver also requires decoding circuitry which is generally found on the tuner card or device. In the case of a USB connected device, the decoding circuitry is located alongside the detector
+
== MythTV, ATI Remote Wonder II and xmodmap ==
  
==Wiring==
+
Update 23rd Jan 2007: By way of the module ati_remote2 the ATI Remote Wonder is now natively supported under newer linux kernels (I'm using 2.6.17). So by using modprobe ati_remote2 and then using the command xev and xmodmap LIRC is no longer needed in order to use the RWII.
Nearly any type of low voltage cable can be used to carry IR signals. V<sub>CC</sub> is generally 5-12V and the signal is usually ~3-4V. With that in mind, it becomes obvious that a 4-conductor, 12-gauge speaker cable is not an ideal choice as any considerable length will introduce excessive resistance to the circuit. Common cable types used to carry IR signals are:
 
* Category 5 (Unshielded Twisted Pair, solid 26ga, 8 conductor in 4 pairs)
 
* Security cable (Unshielded, solid 22ga, 4 conductor)
 
* Audio cable (Shielded Twisted Pair, 22ga, 2 conductor)
 
* Coaxial cable using [#Over coaxial cable|baluns or transceivers (RG/59 or RG/6, typical)
 
<!-- more needed here -->
 
 
==Types of IR detectors==
 
===Dongles bundled with tuner cards===
 
{{Incomplete}}
 
The following is a listing of IR capable tuner cards. Most will ship with a remote and the IR dongle but some OEM cards may ship with the jack and associated receiver circuitry.
 
*Hauppauge
 
**[[Hauppauge PVR-350|PVR-350]]
 
**[[Hauppauge WinTV Nova-T PCI|WinTV Nova-T PCI]]
 
**[[Hauppauge WinTV Nova-T USB2|WinTV Nova-T USB2]]
 
**[[Hauppauge WinTV Nova-T 500 PCI|WinTV Nova-T 500 PCI]]
 
*[[Twinhan DVT Alpha]]
 
<!--
 
<gallery>
 
Image:hauppauge1.jpg|Early Hauppauge remote with receiver
 
Image:hauppauge2.jpg|Hauppauge PVR Infrared receiver cable
 
Image:hauppauge4.jpg|Closeup of an IR diode on a dongle
 
</gallery>
 
-->
 
===Readybuilt -- Retail===
 
For the less adventerous, prebuilt receivers can be purchased. Some of the original vendors have since closed doors but are included here for completeness and because some sites are still up and contain useful information.
 
<!-- Needs to be fleshed out something like:
 
*[http://link.to.site. Company or Site Name Here] Description of product(s)  
 
*[http://link.to.site2. Company2 or Site2 Name Here] Description of product(s)
 
*<s>[http://link.to.site. Company3 or Site3 Name Here] Description of product(s)</s> Notation that vendor is out of business and approx date when
 
-->
 
* [http://www.irblaster.info/index.html IR Blaster.info] has separate serial IR receivers and blasters for sale <!-- must check on this part:, as well as IR repeaters for people with equipment in various locations around the house/apartment.-->
 
* [http://iguanaworks.net IguanaWorks] makes a very tidy little kit which has an exceptionally high-powered transmitter that you can buy from them unassembled or assembled (slightly more) for around $30USD.
 
* [[USB-UIRT]] makes a USB infrared transceiver which works well with LIRC.
 
* [http://www.commandir.com/ CommandIR Mini] combines multiple IR blasters with a built-in universal remote receiver.  It's a Linux-only device so a bit pricier but you get a guarantee it will work with devices like set-top boxes, Linux tech support, and setup that doesn't require multiple LIRC instances.
 
<!--
 
<gallery>
 
Image:.jpg|[http://iguanaworks.net/ Iguanaworks serial IR transciever]
 
Image:.jpg|[http://www.commandir.com/ Linux-friendly IR transciever]
 
</gallery>
 
-->
 
===DIY -- Homebrew===
 
* [http://www.lirc.org/receivers.html/ Lirc's] own page for do-it-yourselfers
 
* [http://stuff.nekhbet.ro/2006/07/10/make-an-infrared-remote-control-for-pc.html  Trimbitas Soren]'s excellent blog write-up with diagrams and detailed photographs with tools]
 
* [http://lnx.manoweb.com/lirc/?partType=section&partName=introduction The Manoweb Site] also has excellent documentation and photgraphs of how to build your own serial port receiever (the proprietor originally sold them over the internet but indicates on the site that as of 2007 Jul, pre-built receivers will no longer be shipped)
 
<!--
 
<gallery>
 
Image:.jpg|[http://www.lirc.org/receivers.html/ Lirc's own page for do-it-yourselfers]
 
Image:.jpg|[http://lnx.manoweb.com/lirc/?partType=section&partName=introduction Manoweb's comprehensive guide to building your own serial receiver]
 
Image:.jpg|[http://stuff.nekhbet.ro/2006/07/10/make-an-infrared-remote-control-for-pc.html Trimbitas Soren's excellent blog write-up with diagrams]
 
Image:.jpg|[http://www.irBlaster.com/ IR Blaster ]
 
</gallery>
 
-->
 
===Commercial===
 
<gallery>
 
Image:.jpg|Xantech
 
Image:.jpg|Channelvision
 
Image:.jpg|Russound
 
Image:.jpg|Leviton
 
</gallery>
 
  
==Extending an IR dongle==
+
Refer [http://evuraan.blogspot.com/2008/01/how-to-use-ati-remote-wonder-ii-remote.html this page] for help to configure  ATI Remote Wonder II to watch MythTV Frontend using xmodmap.  
IR dongles are, in effect, the tail end of the full receiver circuit which resides on the tuner card or module (with the notable exception of USB connected IR receivers). The rest of the circuitry resides on the tuner card or device and all that is needed to make the cable longer is some length of suitable cable, some tools and a way to connect it all back together again.
 
  
===Preparing the plug end===
+
== LIRC, MythTV, and the ATI Remote Wonder II ==
<!-- more needed here -->
 
====Cut and prepare the receiver cable====
 
<!-- more needed here -->
 
<gallery>
 
Image:tp_stripper01.jpg|1. Cut the cable 8-10" (15-20cm) from the jack
 
Image:tp_stripper02.jpg|2. Strip outer jacket using TP strip tool
 
Image:lineman snips 01.jpg|3. Strip insulation from inner conductors
 
</gallery>
 
====Identify the cable conductors====
 
<!-- more needed here -->
 
<gallery>
 
Image:DMM_01.jpg|Digital Multimeter testing the tip, ring and shiled of the receiver's jack
 
</gallery>
 
==== Prepare and solder Category 5 to jack end of cable====
 
<!-- more needed here -->
 
<gallery>
 
Image:tp_stripper_03.jpg|1. Prepare the Category 5 cable
 
Image:soldering_01.jpg|2. Bringing the soldering iron up to temperature
 
Image:soldering_02.jpg|3. Completed solder joint
 
Image:crimp_01.jpg|4. Preparing to place a crimp over the connection
 
Image:crimp_02.jpg|An all-weather low voltage crimp encased with PIC
 
Image:crimp_03.jpg|5. Securing the cables with friction tape allowing for service loop
 
</gallery>
 
====Punching down to the telephone connecting block====
 
<!-- more needed here -->
 
<gallery>
 
Image:66block_01.jpg|1. Identify the pairs or conductors needed
 
Image:66block_02.jpg|2. Punch down green pairs
 
Image:66block_03.jpg|3. Splice and crimp the white/brown conductor
 
Image:hauppauge_04.jpg|4. Connect stereo plug to capture card
 
</gallery>
 
 
===Preparing the receiver end===
 
<!-- more needed here -->
 
====Connecting receiver cable to RJ-45 modular connector====
 
<!-- more needed here -->
 
<gallery>
 
Image:tp_stripper02.jpg|1. Prepare the receiver end of the cable
 
Image:.jpg|2. Cut conductors to length for connector insertion
 
Image:mod_crimp_01.jpg|3. Complete the crimp using a modular plug crimp tool
 
</gallery>
 
====Connecting Category 5 cable to RJ45 keystone====
 
<!-- more needed here -->
 
<gallery>
 
Image:tp_stripper_03.jpg|1. Prepare Category 5 cable
 
Image:110punch_01.jpg|2. Punching down keystone jack
 
Image:wallplate_quadkey.jpg|3. Attaching to wallplate
 
Image:irext.jpg|4. Installing receiver cable
 
</gallery>
 
  
<!-- the following sections will be fleshed out
+
[[Image:atiremotewonder2.jpg|right]]
====Testing the results====
+
Please note that this is not highly-detailed, may contain mistakes, and assumes little knowledge of your particular linux distro. The differences should be minor, if any, but for frame of reference I am using Slack10. If you spot mistakes or think you can make this guide more clear, please feel free to edit it.
==Extending IR using commercial products==
 
===Over twisted pair===
 
===Over coaxial cable===
 
===Mixed-use transceivers===
 
==IR Interference==
 
-->
 
 
==References==
 
[http://www.vishay.com/docs/80073/general.pdf General Overview of IR Transmission in Free Space], Vishay Corp.
 
  
[http://www.vishay.com/docs/80072/disturan.pdf Disturbance Sources for IR Receiver Modules], Vishay Corp.
+
Note: I have found the RWII receiver to be somewhat temperamental. If you plug it in after the computer has booted and then push a button, the internal LED ceases to flash and receive input. Unplug and re-plug it in, push buttons on your remote again, and the LED should flash normally. If the receiver is plugged in at boot it doesn't seem to be a problem.
==See Also==
 
<!-- more needed here -->
 
  
[[Category:Wiring]]
+
Before we even install lirc, we're going to get a config file for MythTV to use your remote properly.  This will aid you later if you need to generate a new configuration file. See '''Appendix A''' for a configuration file based on the one available [http://www.litwiller.net/lircrc.txt here].  Feel free to modify it to suit your needs once it's working.  The text goes in <code><nowiki>~/.mythtv/lircrc</nowiki></code>, with ~ being the home directory of the user that starts mythfrontend (probably your user or the mythtv user). If you have a different remote then you might want to see if there are any /[[Lircrc Files]] for it.
 +
 
 +
Note: The buttons are set up as I thought they make sense.  If you would like to change it, find the button you want next to a "button" line, and change the key under "config" below.  Another note, the mouse on it (big circular direction pad) can be finnicky.  If it is too slow, or too fast, adjust the "repeat" setting under the locations "mouse_cursor_left", "mouse_cursor_right", and so on.  A higher repeat will cause lirc to ignore more repeats, and a lower repeat number will let more repeats through (lirc will pass on one key press per however many repeats are specified).
 +
 
 +
Next, you'll need to install LIRC.  The latest official release of LIRC as of this writing is 0.70 and I don't believe it will work properly with all models of the RWII.  If there is a later official release, get it, or get the latest from CVS.  You can do this via [http://lirc.sourceforge.net/software/snapshots/ CVS snapshots] or [http://www.lirc.org/cvs.html straight from CVS].
 +
 
 +
Follow the instructions in the INSTALL document, which should be something like
 +
 
 +
<pre><nowiki>
 +
./configure
 +
make
 +
sudo make install
 +
</nowiki></pre>
 +
 
 +
You may wish to do <code><nowiki>./configure --help</nowiki></code> first to see what options are available.  The defaults should be ok.  After it's installed, modprobe the ATI driver to load it with <code><nowiki>modprobe lirc_atiusb</nowiki></code> (remember you'll need to be root).  You can make sure LIRC detected the USB receiver by searching <code><nowiki>dmesg</nowiki></code> for lines similar to (<code><nowiki>dmesg | grep lirc</nowiki></code>):
 +
 
 +
<pre><nowiki>
 +
lirc_dev: IR Remote Control driver registered, at major 61
 +
 
 +
lirc_atiusb: USB remote driver for LIRC v0.4
 +
lirc_atiusb: Paul Miller <pmiller9@users.sourceforge.net>
 +
usb.c: registered new driver lirc_atiusb
 +
lirc_dev: lirc_register_plugin:sample_rate: 0
 +
lirc_atiusb[5]:  on usb2:5
 +
</nowiki></pre>
 +
 
 +
Next, do <code><nowiki>ls -l /dev/ | grep lirc</nowiki></code> and see if the devices have been created.  If nothing displays or <code><nowiki>dmesg</nowiki></code> doesn't indicate LIRC loaded, try rebooting.  If /dev/lirc displays (among others) but /dev/lirc0 does not, I recommend you create a link called lirc0 to lirc as I seemed to have problems before doing this.  However, I could be off-base on that one.  You can create the link with <code><nowiki>ln -s /dev/lirc /dev/lirc0</nowiki></code> .
 +
 
 +
Next, you can either try using the RWII LIRC config files that come with LIRC, use the one provided below, or create your own.  The one below should work, and can save you the trouble of naming all your buttons.  I had to create my own but your milage may vary.  To find out if we need to create one, do the following:
 +
 
 +
Start the LIRC daemon by issuing the following command (as root):
 +
 
 +
<pre><nowiki>
 +
lircd -d /dev/lirc0 /path/to/config.conf
 +
</nowiki></pre>
 +
 
 +
Optionally you may pass --debug after the config file path if it doesn't seem to be starting right.  Normal output will be:
 +
 
 +
<pre><nowiki>
 +
lircd 0.7.1-CVS: started server socket
 +
lircd 0.7.1-CVS: parsing remote
 +
lircd 0.7.1-CVS: parsing /root/ati2_full.conf remote
 +
lircd 0.7.1-CVS: config file read
 +
</nowiki></pre>
 +
 
 +
Note the "parsing ..." line will output the name of the read configuration name, not the physical file path!  Also, if the daemon has an error reading your configuration file, it will start anyway and you'll need to kill it before you can restart it with a correct config file.
 +
 
 +
Now run <code><nowiki>irw</nowiki></code> and start pushing buttons.  If nothing displays, you'll need to generate a new configuration file.  If you get an error about being unable to connect to socket, your daemon didn't start or isn't started properly (possibly an invalid device or configuration path).
 +
 
 +
Note if you use the config files below, make sure the button names are the same in both files.
 +
 
 +
== Creating a New Configuration File ==
 +
 
 +
To create a new configuration file, you'll probably want to kill the daemon first although I don't think it's required.  As root, <code><nowiki>killall lircd</nowiki></code> .  Then run irrecord with a path to the new configuration file as the parameter, like:
 +
 
 +
<pre><nowiki>
 +
irrecord /path/to/config.conf
 +
</nowiki></pre>
 +
 
 +
Follow the instructions and note that when naming the control buttons, you'll want to name them to match up with what MythTV needs to process.  These button names are located in the <code><nowiki>~/.mythtv/lircrc</nowiki></code> file we created at the very beginning.  For each "begin...end" entry, the "button" line is what MythTV is looking for from LIRC.  For example, name your stop button "stop", channel up/down "ch+" and "ch-".  You can always edit either of the config files to match, so don't feel pressure to get it exact right now.  In fact, irrecord will time-out if you don't give it input in 10 seconds, so it's best to get the config file created first and then match up button names later.
 +
 
 +
Now that your new configuration file is created load the daemon again as you did above, this time with the config path pointing to the new one.  Load irw and push buttons.  You should see output now.  If you don't see output here, go back and try to find the problem as continuing through this guide will not help you.  See '''For Additional Help''' if you get stuck.
 +
 
 +
== Building LIRC Support into MythTV ==
 +
 
 +
If that's working well, only one more step is required for full MythTV integration.  If you didn't already compile MythTV will LIRC support, you'll need to do so now.
 +
 
 +
== For Additional Help ==
 +
 
 +
For additional help, check the MythTV documentation, the LIRC documentation, the #mythtv-users IRC channel on irc.freenode.net, and the LIRC dev mailing list.
 +
 
 +
== Starting LIRC Daemon on Boot ==
 +
 
 +
Optionally, to start the LIRC daemon on boot, I have the following line in my rc.local file:
 +
 
 +
<pre><nowiki>
 +
/usr/local/sbin/lircd -d /dev/lirc0 /etc/ati2_full.conf ;
 +
</nowiki></pre>
 +
 
 +
That's it!  Good luck!
 +
 
 +
=== Appendix A - MythTV lircrc ===
 +
 
 +
<pre><nowiki>
 +
# config file for
 +
# the ATI-Wonder Remote
 +
# using lirc_atiusb driver
 +
#
 +
 
 +
begin
 +
prog = mythtv
 +
button = a
 +
config = E
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = b
 +
config = O
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = tv
 +
config = Key Alt-T [[Current Window]]
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = stop
 +
config = Esc
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = fastforward
 +
config = Right
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = rewind
 +
config = Left
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = pip
 +
config = V
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = pause
 +
config = P
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = play
 +
config = P
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = mute
 +
config = |
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = vol_down
 +
config = F10
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = vol_up
 +
config = F11
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = f
 +
config = [[Pg Down]]
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = d
 +
config = [[Pg Up]]
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = c
 +
config = F4
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = e
 +
config = Esc
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = arrow_right
 +
config = Right
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = mouse_cursor_right
 +
config = Right
 +
repeat = 10
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = arrow_left
 +
config = Left
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = mouse_cursor_left
 +
config = Left
 +
repeat = 10
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = arrow_up
 +
config = Up
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = mouse_cursor_up
 +
config = Up
 +
repeat = 10
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = arrow_down
 +
config = Down
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = mouse_cursor_down
 +
config = Down
 +
repeat = 10
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = ch_up
 +
config = Up
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = ch_down
 +
config = Down
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = rewind
 +
config = Left
 +
repeat = 5
 +
end
 +
 
 +
 
 +
begin
 +
prog = mythtv
 +
button = ok
 +
config = Return
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = 1
 +
config = 1
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = 2
 +
config = 2
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = 3
 +
config = 3
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = 4
 +
config = 4
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = 5
 +
config = 5
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = 6
 +
config = 6
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = 7
 +
config = 7
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = 8
 +
config = 8
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = 9
 +
config = 9
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = 0
 +
config = 0
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = info
 +
config = I
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = rec
 +
config = R
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = check
 +
config = Enter
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = mouse_left_btn
 +
config = Enter
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = mouse_right_btn
 +
config = Esc
 +
repeat = 5
 +
end
 +
 
 +
 
 +
begin
 +
prog = mythtv
 +
button = list
 +
config = M
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = info
 +
config = I
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = power
 +
config = Esc
 +
repeat = 5
 +
end
 +
 
 +
begin
 +
prog = mythtv
 +
button = resize
 +
config = W
 +
repeat = 5
 +
end
 +
 
 +
 
 +
</nowiki></pre>
 +
 
 +
=== Appendix B - A Sample remote configuration file. /etc/lircd.conf ===
 +
<pre><nowiki>
 +
# this config file was automatically generated
 +
# using lirc-0.7.0(atiusb) on Sat Feb 12 13:22:29 2005
 +
#
 +
# contributed by Steffen
 +
#
 +
# brand: ATI Sapphire Remote Bob II USB
 +
# model no. of remote control: 5000024400
 +
# devices being controlled by this remote: MythTV
 +
#
 +
 
 +
begin remote
 +
 
 +
name      5000024400
 +
bits      16
 +
eps        30
 +
aeps      100
 +
 
 +
one            0 0
 +
zero          0 0
 +
pre_data_bits  8
 +
pre_data      0x0
 +
post_data_bits 16
 +
post_data      0x0
 +
gap            299851
 +
toggle_bit    0
 +
 
 +
 
 +
begin codes
 +
aux1                0x023F
 +
aux2                0x023F
 +
aux3                0x023F
 +
aux4                0x023F
 +
mouse_left_btn      0x02A9
 +
mouse_right_btn    0x02AA
 +
a                  0x0278
 +
b                  0x0279
 +
power              0x020C
 +
dvd                0x0238
 +
tv                  0x0239
 +
help                0x02BE
 +
pc                  0x023F
 +
resize              0x02D5
 +
hand                0x02D0
 +
ati                0x028E
 +
vol_up              0x0210
 +
vol_down            0x0211
 +
mute                0x020D
 +
ch_up              0x0220
 +
ch_down            0x0221
 +
mouse_cursor_up          0x01FF
 +
mouse_cursor_down        0x02FF
 +
mouse_cursor_left        0x20FF
 +
mouse_cursor_right      0x10FF
 +
mouse_cursor_upleft      0x21FF
 +
mouse_cursor_upright    0x11FF
 +
mouse_cursor_downleft    0x22FF
 +
mouse_cursor_downright  0x12FF
 +
1                  0x0201
 +
2                  0x0202
 +
3                  0x0203
 +
4                  0x0204
 +
5                  0x0205
 +
6                  0x0206
 +
7                  0x0207
 +
8                  0x0208
 +
9                  0x0209
 +
0                  0x0200
 +
list                0x0254
 +
check              0x0282
 +
info                0x02F9
 +
timer              0x0296
 +
arrow_up            0x0258
 +
arrow_left          0x025A
 +
arrow_right        0x025B
 +
arrow_down          0x0259
 +
ok                  0x025C
 +
c                  0x027A
 +
d                  0x027B
 +
play                0x022C
 +
e                  0x027C
 +
f                  0x027D
 +
rewind              0x0229
 +
rec                0x0237
 +
stop                0x0231
 +
pause              0x0230
 +
ffwd                0x0228
 +
end codes
 +
 
 +
end remote
 +
</nowiki></pre>
 +
 
 +
=== Appendix C - ati_remote2 scancodes ===
 +
 
 +
From Linux kernel sources "drivers/input/misc/ati_remote2.c"
 +
 
 +
{| border=1 cellspacing=0 cellpadding=5
 +
| Scancode upper byte
 +
| Remote mode
 +
|-
 +
| 0x00 || AUX1
 +
|-
 +
| 0x01 || AUX2
 +
|-
 +
| 0x02 || AUX3
 +
|-
 +
| 0x03 || AUX4
 +
|-
 +
| 0x04 || PC
 +
|}
 +
<br>
 +
{| border=1 cellspacing=0 cellpadding=5
 +
| Scancode lower byte
 +
| Keycode (decimal value)
 +
|-
 +
| 0x00 || KEY_0 (11)
 +
|-
 +
| 0x01 || KEY_1 (2)
 +
|-
 +
| 0x02 || KEY_2 (3)
 +
|-
 +
| 0x03 || KEY_3 (4)
 +
|-
 +
| 0x04 || KEY_4 (5)
 +
|-
 +
| 0x05 || KEY_5 (6)
 +
|-
 +
| 0x06 || KEY_6 (7)
 +
|-
 +
| 0x07 || KEY_7 (8)
 +
|-
 +
| 0x08 || KEY_8 (9)
 +
|-
 +
| 0x09 || KEY_9 (10)
 +
|-
 +
| 0x0c || KEY_POWER (116)
 +
|-
 +
| 0x0d || KEY_MUTE (113)
 +
|-
 +
| 0x10 || KEY_VOLUMEUP (115)
 +
|-
 +
| 0x11 || KEY_VOLUMEDOWN (114)
 +
|-
 +
| 0x20 || <font color="Red"> KEY_CHANNELUP (402) </font>
 +
|-
 +
| 0x21 || <font color="Red"> KEY_CHANNELDOWN (403) </font>
 +
|-
 +
| 0x28 || KEY_FORWARD (159)
 +
|-
 +
| 0x29 || KEY_REWIND (168)
 +
|-
 +
| 0x2c || KEY_PLAY (207)
 +
|-
 +
| 0x30 || KEY_PAUSE (119)
 +
|-
 +
| 0x31 || KEY_STOP (128)
 +
|-
 +
| 0x37 || KEY_RECORD (167)
 +
|-
 +
| 0x38 || <font color="Red"> KEY_DVD (389) </font>
 +
|-
 +
| 0x39 || <font color="Red"> KEY_TV (377) </font>
 +
|-
 +
| 0x3f || KEY_PROG1 (148)
 +
|-
 +
| 0x3f || KEY_PROG2 (149)
 +
|-
 +
| 0x3f || KEY_PROG3 (202)
 +
|-
 +
| 0x3f || KEY_PROG4 (203)
 +
|-
 +
| 0x3f || <font color="Red"> KEY_PC (376) </font>
 +
|-
 +
| 0x54 || KEY_MENU (139)
 +
|-
 +
| 0x58 || KEY_UP (103)
 +
|-
 +
| 0x59 || KEY_DOWN (108)
 +
|-
 +
| 0x5a || KEY_LEFT (105)
 +
|-
 +
| 0x5b || KEY_RIGHT (106)
 +
|-
 +
| 0x5c || <font color="Red"> KEY_OK (352) </font>
 +
|-
 +
| 0x78 || KEY_A (30)
 +
|-
 +
| 0x79 || KEY_B (48)
 +
|-
 +
| 0x7a || KEY_C (46)
 +
|-
 +
| 0x7b || KEY_D (32)
 +
|-
 +
| 0x7c || KEY_E (18)
 +
|-
 +
| 0x7d || KEY_F (33)
 +
|-
 +
| 0x82 || KEY_ENTER (28)
 +
|-
 +
| 0x8e || <font color="Red"> KEY_VENDOR (360) </font>
 +
|-
 +
| 0x96 || KEY_COFFEE (152)
 +
|-
 +
| 0xa9 || BTN_LEFT (272)
 +
|-
 +
| 0xaa || BTN_RIGHT (273)
 +
|-
 +
| 0xbe || KEY_QUESTION (214)
 +
|-
 +
| 0xd0 || KEY_EDIT (176)
 +
|-
 +
| 0xd5 || KEY_FRONT (132)
 +
|-
 +
| 0xf9 || <font color="Red"> KEY_INFO (358) </font>
 +
|}
 +
 
 +
=== Appendix D - keycodes < 255 ===
 +
 
 +
From Linux kernel sources "include/linux/input.h"
 +
 
 +
{| border=1 cellspacing=0 cellpadding=5
 +
| Keycode (decimal value)
 +
|-
 +
| KEY_ESC (1)
 +
|-
 +
| KEY_1 (2)
 +
|-
 +
| KEY_2 (3)
 +
|-
 +
| KEY_3 (4)
 +
|-
 +
| KEY_4 (5)
 +
|-
 +
| KEY_5 (6)
 +
|-
 +
| KEY_6 (7)
 +
|-
 +
| KEY_7 (8)
 +
|-
 +
| KEY_8 (9)
 +
|-
 +
| KEY_9 (10)
 +
|-
 +
| KEY_0 (11)
 +
|-
 +
| KEY_MINUS (12)
 +
|-
 +
| KEY_EQUAL (13)
 +
|-
 +
| KEY_BACKSPACE (14)
 +
|-
 +
| KEY_TAB (15)
 +
|-
 +
| KEY_Q (16)
 +
|-
 +
| KEY_W (17)
 +
|-
 +
| KEY_E (18)
 +
|-
 +
| KEY_R (19)
 +
|-
 +
| KEY_T (20)
 +
|-
 +
| KEY_Y (21)
 +
|-
 +
| KEY_U (22)
 +
|-
 +
| KEY_I (23)
 +
|-
 +
| KEY_O (24)
 +
|-
 +
| KEY_P (25)
 +
|-
 +
| KEY_LEFTBRACE (26)
 +
|-
 +
| KEY_RIGHTBRACE (27)
 +
|-
 +
| KEY_ENTER (28)
 +
|-
 +
| KEY_LEFTCTRL (29)
 +
|-
 +
| KEY_A (30)
 +
|-
 +
| KEY_S (31)
 +
|-
 +
| KEY_D (32)
 +
|-
 +
| KEY_F (33)
 +
|-
 +
| KEY_G (34)
 +
|-
 +
| KEY_H (35)
 +
|-
 +
| KEY_J (36)
 +
|-
 +
| KEY_K (37
 +
|-
 +
| KEY_L (38)
 +
|-
 +
| KEY_SEMICOLON (39)
 +
|-
 +
| KEY_APOSTROPHE (40)
 +
|-
 +
| KEY_GRAVE (41)
 +
|-
 +
| KEY_LEFTSHIFT (42)
 +
|-
 +
| KEY_BACKSLASH (43)
 +
|-
 +
| KEY_Z (44)
 +
|-
 +
| KEY_X (45)
 +
|-
 +
| KEY_C (46)
 +
|-
 +
| KEY_V (47)
 +
|-
 +
| KEY_B (48)
 +
|-
 +
| KEY_N (49)
 +
|-
 +
| KEY_M (50)
 +
|-
 +
| KEY_COMMA (51)
 +
|-
 +
| KEY_DOT (52)
 +
|-
 +
| KEY_SLASH (53)
 +
|-
 +
| KEY_RIGHTSHIFT (54)
 +
|-
 +
| KEY_KPASTERISK (55)
 +
|-
 +
| KEY_LEFTALT (56)
 +
|-
 +
| KEY_SPACE (57)
 +
|-
 +
| KEY_CAPSLOCK (58)
 +
|-
 +
| KEY_F1 (59)
 +
|-
 +
| KEY_F2 (60)
 +
|-
 +
| KEY_F3 (61)
 +
|-
 +
| KEY_F4 (62)
 +
|-
 +
| KEY_F5 (63)
 +
|-
 +
| KEY_F6 (64)
 +
|-
 +
| KEY_F7 (65)
 +
|-
 +
| KEY_F8 (66)
 +
|-
 +
| KEY_F9 (67)
 +
|-
 +
| KEY_F10 (68)
 +
|-
 +
| KEY_NUMLOCK (69)
 +
|-
 +
| KEY_SCROLLLOCK (70)
 +
|-
 +
| KEY_KP7 (71)
 +
|-
 +
| KEY_KP8 (72)
 +
|-
 +
| KEY_KP9 (73)
 +
|-
 +
| KEY_KPMINUS (74)
 +
|-
 +
| KEY_KP4 (75)
 +
|-
 +
| KEY_KP5 (76)
 +
|-
 +
| KEY_KP6 (77)
 +
|-
 +
| KEY_KPPLUS (78)
 +
|-
 +
| KEY_KP1 (79)
 +
|-
 +
| KEY_KP2 (80)
 +
|-
 +
| KEY_KP3 (81)
 +
|-
 +
| KEY_KP0 (82)
 +
|-
 +
| KEY_KPDOT (83)
 +
|-
 +
| KEY_ZENKAKUHANKAKU (85)
 +
|-
 +
| KEY_102ND (86)
 +
|-
 +
| KEY_F11 (87)
 +
|-
 +
| KEY_F12 (88)
 +
|-
 +
| KEY_RO (89)
 +
|-
 +
| KEY_KATAKANA (90)
 +
|-
 +
| KEY_HIRAGANA (91)
 +
|-
 +
| KEY_HENKAN (92)
 +
|-
 +
| KEY_KATAKANAHIRAGANA (93)
 +
|-
 +
| KEY_MUHENKAN (94)
 +
|-
 +
| KEY_KPJPCOMMA (95)
 +
|-
 +
| KEY_KPENTER (96)
 +
|-
 +
| KEY_RIGHTCTRL (97)
 +
|-
 +
| KEY_KPSLASH (98)
 +
|-
 +
| KEY_SYSRQ (99)
 +
|-
 +
| KEY_RIGHTALT (100)
 +
|-
 +
| KEY_LINEFEED (101)
 +
|-
 +
| KEY_HOME (102)
 +
|-
 +
| KEY_UP (103)
 +
|-
 +
| KEY_PAGEUP (104)
 +
|-
 +
| KEY_LEFT (105)
 +
|-
 +
| KEY_RIGHT (106)
 +
|-
 +
| KEY_END (107)
 +
|-
 +
| KEY_DOWN (108)
 +
|-
 +
| KEY_PAGEDOWN (109)
 +
|-
 +
| KEY_INSERT (110)
 +
|-
 +
| KEY_DELETE (111)
 +
|-
 +
| KEY_MACRO (112)
 +
|-
 +
| KEY_MUTE (113)
 +
|-
 +
| KEY_VOLUMEDOWN (114)
 +
|-
 +
| KEY_VOLUMEUP (115)
 +
|-
 +
| KEY_POWER (116)
 +
|-
 +
| KEY_KPEQUAL (117)
 +
|-
 +
| KEY_KPPLUSMINUS (118)
 +
|-
 +
| KEY_PAUSE (119)
 +
|-
 +
| KEY_SCALE (120)
 +
|-
 +
| KEY_KPCOMMA (121)
 +
|-
 +
| KEY_HANGEUL (122)
 +
|-
 +
| KEY_HANJA (123)
 +
|-
 +
| KEY_YEN (124)
 +
|-
 +
| KEY_LEFTMETA (125)
 +
|-
 +
| KEY_RIGHTMETA (126)
 +
|-
 +
| KEY_COMPOSE (127)
 +
|-
 +
| KEY_STOP (128)
 +
|-
 +
| KEY_AGAIN (129)
 +
|-
 +
| KEY_PROPS (130)
 +
|-
 +
| KEY_UNDO (131)
 +
|-
 +
| KEY_FRONT (132)
 +
|-
 +
| KEY_COPY (133)
 +
|-
 +
| KEY_OPEN (134)
 +
|-
 +
| KEY_PASTE (135)
 +
|-
 +
| KEY_FIND (136)
 +
|-
 +
| KEY_CUT (137)
 +
|-
 +
| KEY_HELP (138)
 +
|-
 +
| KEY_MENU (139)
 +
|-
 +
| KEY_CALC (140)
 +
|-
 +
| KEY_SETUP (141)
 +
|-
 +
| KEY_SLEEP (142)
 +
|-
 +
| KEY_WAKEUP (143)
 +
|-
 +
| KEY_FILE (144)
 +
|-
 +
| KEY_SENDFILE (145)
 +
|-
 +
| KEY_DELETEFILE (146)
 +
|-
 +
| KEY_XFER (147)
 +
|-
 +
| KEY_PROG1 (148)
 +
|-
 +
| KEY_PROG2 (149)
 +
|-
 +
| KEY_WWW (150)
 +
|-
 +
| KEY_MSDOS (151)
 +
|-
 +
| KEY_COFFEE (152)
 +
|-
 +
| KEY_DIRECTION (153)
 +
|-
 +
| KEY_CYCLEWINDOWS (154)
 +
|-
 +
| KEY_MAIL (155)
 +
|-
 +
| KEY_BOOKMARKS (156)
 +
|-
 +
| KEY_COMPUTER (157)
 +
|-
 +
| KEY_BACK (158)
 +
|-
 +
| KEY_FORWARD (159)
 +
|-
 +
| KEY_CLOSECD (160)
 +
|-
 +
| KEY_EJECTCD (161)
 +
|-
 +
| KEY_EJECTCLOSECD (162)
 +
|-
 +
| KEY_NEXTSONG (163)
 +
|-
 +
| KEY_PLAYPAUSE (164)
 +
|-
 +
| KEY_PREVIOUSSONG (165)
 +
|-
 +
| KEY_STOPCD (166)
 +
|-
 +
| KEY_RECORD (167)
 +
|-
 +
| KEY_REWIND (168)
 +
|-
 +
| KEY_PHONE (169)
 +
|-
 +
| KEY_ISO (170)
 +
|-
 +
| KEY_CONFIG (171)
 +
|-
 +
| KEY_HOMEPAGE (172)
 +
|-
 +
| KEY_REFRESH (173)
 +
|-
 +
| KEY_EXIT (174)
 +
|-
 +
| KEY_MOVE (175)
 +
|-
 +
| KEY_EDIT (176)
 +
|-
 +
| KEY_SCROLLUP (177)
 +
|-
 +
| KEY_SCROLLDOWN (178)
 +
|-
 +
| KEY_KPLEFTPAREN (179)
 +
|-
 +
| KEY_KPRIGHTPAREN (180)
 +
|-
 +
| KEY_NEW (181)
 +
|-
 +
| KEY_REDO (182)
 +
|-
 +
| KEY_F13 (183)
 +
|-
 +
| KEY_F14 (184)
 +
|-
 +
| KEY_F15 (185)
 +
|-
 +
| KEY_F16 (186)
 +
|-
 +
| KEY_F17 (187)
 +
|-
 +
| KEY_F18 (188)
 +
|-
 +
| KEY_F19 (189)
 +
|-
 +
| KEY_F20 (190)
 +
|-
 +
| KEY_F21 (191)
 +
|-
 +
| KEY_F22 (192)
 +
|-
 +
| KEY_F23 (193)
 +
|-
 +
| KEY_F24 (194)
 +
|-
 +
| KEY_PLAYCD (200)
 +
|-
 +
| KEY_PAUSECD (201)
 +
|-
 +
| KEY_PROG3 (202)
 +
|-
 +
| KEY_PROG4 (203)
 +
|-
 +
| KEY_DASHBOARD (204)
 +
|-
 +
| KEY_SUSPEND (205)
 +
|-
 +
| KEY_CLOSE (206)
 +
|-
 +
| KEY_PLAY (207)
 +
|-
 +
| KEY_FASTFORWARD (208)
 +
|-
 +
| KEY_BASSBOOST (209)
 +
|-
 +
| KEY_PRINT (210)
 +
|-
 +
| KEY_HP (211)
 +
|-
 +
| KEY_CAMERA (212)
 +
|-
 +
| KEY_SOUND (213)
 +
|-
 +
| KEY_QUESTION (214)
 +
|-
 +
| KEY_EMAIL (215)
 +
|-
 +
| KEY_CHAT (216)
 +
|-
 +
| KEY_SEARCH (217)
 +
|-
 +
| KEY_CONNECT (218)
 +
|-
 +
| KEY_FINANCE (219)
 +
|-
 +
| KEY_SPORT (220)
 +
|-
 +
| KEY_SHOP (221)
 +
|-
 +
| KEY_ALTERASE (222)
 +
|-
 +
| KEY_CANCEL (223)
 +
|-
 +
| KEY_BRIGHTNESSDOWN (224)
 +
|-
 +
| KEY_BRIGHTNESSUP (225)
 +
|-
 +
| KEY_MEDIA (226)
 +
|-
 +
| KEY_SWITCHVIDEOMODE (227)
 +
|-
 +
| KEY_KBDILLUMTOGGLE (228)
 +
|-
 +
| KEY_KBDILLUMDOWN (229)
 +
|-
 +
| KEY_KBDILLUMUP (230)
 +
|-
 +
| KEY_SEND (231)
 +
|-
 +
| KEY_REPLY (232)
 +
|-
 +
| KEY_FORWARDMAIL (233)
 +
|-
 +
| KEY_SAVE (234)
 +
|-
 +
| KEY_DOCUMENTS (235)
 +
|-
 +
| KEY_BATTERY (236)
 +
|-
 +
| KEY_BLUETOOTH (237)
 +
|-
 +
| KEY_WLAN (238)
 +
|-
 +
| KEY_UWB (239)
 +
|-
 +
| KEY_UNKNOWN (240)
 +
|-
 +
| KEY_VIDEO_NEXT (241)
 +
|-
 +
| KEY_VIDEO_PREV (242)
 +
|-
 +
| KEY_BRIGHTNESS_CYCLE (243)
 +
|-
 +
| KEY_BRIGHTNESS_ZERO (244)
 +
|-
 +
| KEY_DISPLAY_OFF (245)
 +
|}
 +
 
 +
 
 +
=== Appendix E - ati_remote2 keycode configuration ===
 +
 
 +
Settings for modifying the key actions for the ati_remote2 kernel driver to common MythTV frontend keys.
 +
The remote has 4 modes, and the below configuration sets the keys identically for all 4 modes.
 +
 
 +
<pre><nowiki>
 +
# ATI Key -> F11; Ubuntu's keyboard settings allow a keycode to be mapped to an executable. 
 +
# I mapped F11 to a shell script to start mfe.
 +
setkeycodes 0x008e 87 0x018e 87 0x028e 87 0x038e 87 0x048e 87
 +
# OK -> Enter
 +
setkeycodes 0x005C 28 0x015C 28 0x025C 28 0x035C 28 0x045C 28
 +
# i (info) -> i
 +
setkeycodes 0x00f9 23 0x01f9 23 0x02f9 23 0x03f9 23 0x04f9 23
 +
# clock (coffee) -> Escape
 +
setkeycodes 0x0096 1 0x0196 1 0x0296 1 0x0396 1 0x0496 1
 +
# Pause -> p
 +
setkeycodes 0x0030 25 0x0130 25 0x0230 25 0x0330 25 0x0430 25
 +
# Play -> p
 +
setkeycodes 0x002c 25 0x012c 25 0x022c 25 0x032c 25 0x042c 25
 +
# Stop -> Space
 +
setkeycodes 0x0031 57 0x0131 57 0x0231 57 0x0331 57 0x0431 57
 +
# Menu -> m
 +
setkeycodes 0x0054 50 0x0154 50 0x0254 50 0x0354 50 0x0454 50
 +
# Check (Enter?) -> i
 +
setkeycodes 0x0082 23 0x0182 23 0x0282 23 0x0382 23 0x0482 23
 +
# FF -> RightArrow
 +
setkeycodes 0x0028 106 0x0128 106 0x0228 106 0x0328 106 0x0428 106
 +
# REW -> LeftArrow
 +
setkeycodes 0x0029 105 0x0129 105 0x0229 105 0x0329 105 0x0429 105
 +
# Rec -> r
 +
setkeycodes 0x0037 19 0x0137 19 0x0237 19 0x0337 19 0x0437 19
 +
</nowiki></pre>
 +
 
 +
== External links ==
 +
* [http://evuraan.blogspot.com/2008/01/how-to-use-ati-remote-wonder-ii-remote.html  How to use ATI REMOTE Wonder II Remote for MythTv Frontend? ]
 +
[[Category:HOWTO]]
 +
[[Category:Remote Controls]]
 +
[[Category:LIRC Configuration Files]]

Latest revision as of 19:33, 4 June 2011

One common remote used for controlling MythTV is the ATI Remote Wonder II. Highly popular for Windows and MacOS machines, the RWII is also supported under linux by the ati_remote2 kernel module or by using the LIRC project. Here is a short guide for getting it configured with MythTV.

MythTV, ATI Remote Wonder II and Kernel Keymap Modification

Starting with Linux 2.6.28 the ati_remote2 v0.3 kernel module supports kernel scancode-to-keycode mapping modification. This functionality allows the keycodes generated by the ati_remote2 kernel module for a given button on the remote control to be modified. This is useful because by default a number of the keycodes generated by the ati_remote2 kernel module have values greater than 255, which when combined with the limitation of the X windows system being unable to handle keycodes with such values, results in the offending buttons on the remote being unusable within MythTV.

Modifying the kernel scancode-to-keycode mapping for any buttons with keycode values greater than 255 to give them values less than 255 makes these buttons usable within X and consequently within MythTV.

The simplest way to modify the kernel scancode-to-keycode mapping is to use the "setkeycodes" program. This program accepts pairs of command line parameters consisting of a scancode, in hexadecimal, and a keycode, in decimal. The scancode is the code generated by the hardware, the keycode is the code generated in software by the kernel module in response and sent to the rest of the system. A table of scancodes for the ATI Remote Wonder II can be obtained from Appendix C. A table of keycodes can be obtained from Appendix D.

The ATI Remote Wonder II can operate in one of five modes, AUX1, AUX2, AUX3, AUX4, and PC. Each button generates a different scancode for each of the five modes. Therefore, each button can be configured to generate a different keycode for each of the five modes if so desired. The scancodes consist of two bytes, the upper byte is the index of the mode, the lower byte is the button's code.

So, for example, if we wished to map the "OK" button (0x5C) in PC mode (0x04), which has a default keycode of KEY_OK (352), to be KEY_ENTER (28) we would use:

setkeycodes 0x045C 28

If we didn't want to worry about which mode (AUX1 (0x00), AUX2 (0x01), AUX3 (0x02), AUX4 (0x03), or PC (0x04)) the remote was in when we used it, we could use:

setkeycodes 0x005C 28 0x015C 28 0x025C 28 0x035C 28 0x045C 28

MythTV, ATI Remote Wonder II and xmodmap

Update 23rd Jan 2007: By way of the module ati_remote2 the ATI Remote Wonder is now natively supported under newer linux kernels (I'm using 2.6.17). So by using modprobe ati_remote2 and then using the command xev and xmodmap LIRC is no longer needed in order to use the RWII.

Refer this page for help to configure ATI Remote Wonder II to watch MythTV Frontend using xmodmap.

LIRC, MythTV, and the ATI Remote Wonder II

Atiremotewonder2.jpg

Please note that this is not highly-detailed, may contain mistakes, and assumes little knowledge of your particular linux distro. The differences should be minor, if any, but for frame of reference I am using Slack10. If you spot mistakes or think you can make this guide more clear, please feel free to edit it.

Note: I have found the RWII receiver to be somewhat temperamental. If you plug it in after the computer has booted and then push a button, the internal LED ceases to flash and receive input. Unplug and re-plug it in, push buttons on your remote again, and the LED should flash normally. If the receiver is plugged in at boot it doesn't seem to be a problem.

Before we even install lirc, we're going to get a config file for MythTV to use your remote properly. This will aid you later if you need to generate a new configuration file. See Appendix A for a configuration file based on the one available here. Feel free to modify it to suit your needs once it's working. The text goes in ~/.mythtv/lircrc, with ~ being the home directory of the user that starts mythfrontend (probably your user or the mythtv user). If you have a different remote then you might want to see if there are any /Lircrc Files for it.

Note: The buttons are set up as I thought they make sense. If you would like to change it, find the button you want next to a "button" line, and change the key under "config" below. Another note, the mouse on it (big circular direction pad) can be finnicky. If it is too slow, or too fast, adjust the "repeat" setting under the locations "mouse_cursor_left", "mouse_cursor_right", and so on. A higher repeat will cause lirc to ignore more repeats, and a lower repeat number will let more repeats through (lirc will pass on one key press per however many repeats are specified).

Next, you'll need to install LIRC. The latest official release of LIRC as of this writing is 0.70 and I don't believe it will work properly with all models of the RWII. If there is a later official release, get it, or get the latest from CVS. You can do this via CVS snapshots or straight from CVS.

Follow the instructions in the INSTALL document, which should be something like

./configure
make
sudo make install

You may wish to do ./configure --help first to see what options are available. The defaults should be ok. After it's installed, modprobe the ATI driver to load it with modprobe lirc_atiusb (remember you'll need to be root). You can make sure LIRC detected the USB receiver by searching dmesg for lines similar to (dmesg | grep lirc):

lirc_dev: IR Remote Control driver registered, at major 61 

lirc_atiusb: USB remote driver for LIRC v0.4
lirc_atiusb: Paul Miller <pmiller9@users.sourceforge.net>
usb.c: registered new driver lirc_atiusb
lirc_dev: lirc_register_plugin:sample_rate: 0
lirc_atiusb[5]:  on usb2:5

Next, do ls -l /dev/ | grep lirc and see if the devices have been created. If nothing displays or dmesg doesn't indicate LIRC loaded, try rebooting. If /dev/lirc displays (among others) but /dev/lirc0 does not, I recommend you create a link called lirc0 to lirc as I seemed to have problems before doing this. However, I could be off-base on that one. You can create the link with ln -s /dev/lirc /dev/lirc0 .

Next, you can either try using the RWII LIRC config files that come with LIRC, use the one provided below, or create your own. The one below should work, and can save you the trouble of naming all your buttons. I had to create my own but your milage may vary. To find out if we need to create one, do the following:

Start the LIRC daemon by issuing the following command (as root):

lircd -d /dev/lirc0 /path/to/config.conf

Optionally you may pass --debug after the config file path if it doesn't seem to be starting right. Normal output will be:

lircd 0.7.1-CVS: started server socket
lircd 0.7.1-CVS: parsing remote
lircd 0.7.1-CVS: parsing /root/ati2_full.conf remote
lircd 0.7.1-CVS: config file read

Note the "parsing ..." line will output the name of the read configuration name, not the physical file path! Also, if the daemon has an error reading your configuration file, it will start anyway and you'll need to kill it before you can restart it with a correct config file.

Now run irw and start pushing buttons. If nothing displays, you'll need to generate a new configuration file. If you get an error about being unable to connect to socket, your daemon didn't start or isn't started properly (possibly an invalid device or configuration path).

Note if you use the config files below, make sure the button names are the same in both files.

Creating a New Configuration File

To create a new configuration file, you'll probably want to kill the daemon first although I don't think it's required. As root, killall lircd . Then run irrecord with a path to the new configuration file as the parameter, like:

irrecord /path/to/config.conf

Follow the instructions and note that when naming the control buttons, you'll want to name them to match up with what MythTV needs to process. These button names are located in the ~/.mythtv/lircrc file we created at the very beginning. For each "begin...end" entry, the "button" line is what MythTV is looking for from LIRC. For example, name your stop button "stop", channel up/down "ch+" and "ch-". You can always edit either of the config files to match, so don't feel pressure to get it exact right now. In fact, irrecord will time-out if you don't give it input in 10 seconds, so it's best to get the config file created first and then match up button names later.

Now that your new configuration file is created load the daemon again as you did above, this time with the config path pointing to the new one. Load irw and push buttons. You should see output now. If you don't see output here, go back and try to find the problem as continuing through this guide will not help you. See For Additional Help if you get stuck.

Building LIRC Support into MythTV

If that's working well, only one more step is required for full MythTV integration. If you didn't already compile MythTV will LIRC support, you'll need to do so now.

For Additional Help

For additional help, check the MythTV documentation, the LIRC documentation, the #mythtv-users IRC channel on irc.freenode.net, and the LIRC dev mailing list.

Starting LIRC Daemon on Boot

Optionally, to start the LIRC daemon on boot, I have the following line in my rc.local file:

/usr/local/sbin/lircd -d /dev/lirc0 /etc/ati2_full.conf ;

That's it! Good luck!

Appendix A - MythTV lircrc

# config file for
# the ATI-Wonder Remote
# using lirc_atiusb driver
# 

begin
prog = mythtv
button = a
config = E
repeat = 5
end

begin
prog = mythtv
button = b
config = O
repeat = 5
end

begin
prog = mythtv
button = tv
config = Key Alt-T [[Current Window]]
repeat = 5
end

begin
prog = mythtv
button = stop
config = Esc
repeat = 5
end

begin
prog = mythtv
button = fastforward
config = Right
repeat = 5
end

begin
prog = mythtv
button = rewind
config = Left
repeat = 5
end

begin
prog = mythtv
button = pip
config = V
repeat = 5
end

begin
prog = mythtv
button = pause
config = P
repeat = 5
end

begin
prog = mythtv
button = play
config = P
repeat = 5
end

begin
prog = mythtv
button = mute
config = |
repeat = 5
end

begin
prog = mythtv
button = vol_down
config = F10
repeat = 5
end

begin
prog = mythtv
button = vol_up
config = F11
repeat = 5
end

begin
prog = mythtv
button = f
config = [[Pg Down]]
repeat = 5
end

begin
prog = mythtv
button = d
config = [[Pg Up]]
repeat = 5
end

begin
prog = mythtv
button = c
config = F4
repeat = 5
end

begin
prog = mythtv
button = e
config = Esc
repeat = 5
end

begin
prog = mythtv
button = arrow_right
config = Right
repeat = 5
end

begin
prog = mythtv
button = mouse_cursor_right
config = Right
repeat = 10
end

begin
prog = mythtv
button = arrow_left
config = Left
repeat = 5
end

begin
prog = mythtv
button = mouse_cursor_left
config = Left
repeat = 10
end

begin
prog = mythtv
button = arrow_up
config = Up
repeat = 5
end

begin
prog = mythtv
button = mouse_cursor_up
config = Up
repeat = 10
end

begin
prog = mythtv
button = arrow_down
config = Down
repeat = 5
end

begin
prog = mythtv
button = mouse_cursor_down
config = Down
repeat = 10
end

begin
prog = mythtv
button = ch_up
config = Up
repeat = 5
end

begin
prog = mythtv
button = ch_down
config = Down
repeat = 5
end

begin
prog = mythtv
button = rewind
config = Left
repeat = 5
end


begin
prog = mythtv
button = ok
config = Return
repeat = 5
end

begin
prog = mythtv
button = 1
config = 1
repeat = 5
end

begin
prog = mythtv
button = 2
config = 2
repeat = 5
end

begin
prog = mythtv
button = 3
config = 3
repeat = 5
end

begin
prog = mythtv
button = 4
config = 4
repeat = 5
end

begin
prog = mythtv
button = 5
config = 5
repeat = 5
end

begin
prog = mythtv
button = 6
config = 6
repeat = 5
end

begin
prog = mythtv
button = 7
config = 7
repeat = 5
end

begin
prog = mythtv
button = 8
config = 8
repeat = 5
end

begin
prog = mythtv
button = 9
config = 9
repeat = 5
end

begin
prog = mythtv
button = 0
config = 0
repeat = 5
end

begin
prog = mythtv
button = info
config = I
repeat = 5
end

begin
prog = mythtv
button = rec
config = R
repeat = 5
end 

begin
prog = mythtv
button = check
config = Enter
repeat = 5
end

begin
prog = mythtv
button = mouse_left_btn
config = Enter
repeat = 5
end

begin
prog = mythtv
button = mouse_right_btn
config = Esc
repeat = 5
end


begin
prog = mythtv
button = list
config = M
repeat = 5
end

begin
prog = mythtv
button = info
config = I
repeat = 5
end

begin
prog = mythtv
button = power
config = Esc
repeat = 5
end

begin
prog = mythtv
button = resize
config = W
repeat = 5
end


Appendix B - A Sample remote configuration file. /etc/lircd.conf

# this config file was automatically generated
# using lirc-0.7.0(atiusb) on Sat Feb 12 13:22:29 2005
#
# contributed by Steffen
#
# brand: ATI Sapphire Remote Bob II USB
# model no. of remote control: 5000024400
# devices being controlled by this remote: MythTV
#

begin remote

name       5000024400
bits       16
eps        30
aeps       100

one            0 0
zero           0 0
pre_data_bits  8
pre_data       0x0
post_data_bits 16
post_data      0x0
gap            299851
toggle_bit     0


begin codes
aux1                0x023F
aux2                0x023F
aux3                0x023F
aux4                0x023F
mouse_left_btn      0x02A9
mouse_right_btn     0x02AA
a                   0x0278
b                   0x0279
power               0x020C
dvd                 0x0238
tv                  0x0239
help                0x02BE
pc                  0x023F
resize              0x02D5
hand                0x02D0
ati                 0x028E
vol_up              0x0210
vol_down            0x0211
mute                0x020D
ch_up               0x0220
ch_down             0x0221
mouse_cursor_up          0x01FF
mouse_cursor_down        0x02FF
mouse_cursor_left        0x20FF
mouse_cursor_right       0x10FF
mouse_cursor_upleft      0x21FF
mouse_cursor_upright     0x11FF
mouse_cursor_downleft    0x22FF
mouse_cursor_downright   0x12FF
1                   0x0201
2                   0x0202
3                   0x0203
4                   0x0204
5                   0x0205
6                   0x0206
7                   0x0207
8                   0x0208
9                   0x0209
0                   0x0200
list                0x0254
check               0x0282
info                0x02F9
timer               0x0296
arrow_up            0x0258
arrow_left          0x025A
arrow_right         0x025B
arrow_down          0x0259
ok                  0x025C
c                   0x027A
d                   0x027B
play                0x022C
e                   0x027C
f                   0x027D
rewind              0x0229
rec                 0x0237
stop                0x0231
pause               0x0230
ffwd                0x0228
end codes

end remote

Appendix C - ati_remote2 scancodes

From Linux kernel sources "drivers/input/misc/ati_remote2.c"

Scancode upper byte Remote mode
0x00 AUX1
0x01 AUX2
0x02 AUX3
0x03 AUX4
0x04 PC


Scancode lower byte Keycode (decimal value)
0x00 KEY_0 (11)
0x01 KEY_1 (2)
0x02 KEY_2 (3)
0x03 KEY_3 (4)
0x04 KEY_4 (5)
0x05 KEY_5 (6)
0x06 KEY_6 (7)
0x07 KEY_7 (8)
0x08 KEY_8 (9)
0x09 KEY_9 (10)
0x0c KEY_POWER (116)
0x0d KEY_MUTE (113)
0x10 KEY_VOLUMEUP (115)
0x11 KEY_VOLUMEDOWN (114)
0x20 KEY_CHANNELUP (402)
0x21 KEY_CHANNELDOWN (403)
0x28 KEY_FORWARD (159)
0x29 KEY_REWIND (168)
0x2c KEY_PLAY (207)
0x30 KEY_PAUSE (119)
0x31 KEY_STOP (128)
0x37 KEY_RECORD (167)
0x38 KEY_DVD (389)
0x39 KEY_TV (377)
0x3f KEY_PROG1 (148)
0x3f KEY_PROG2 (149)
0x3f KEY_PROG3 (202)
0x3f KEY_PROG4 (203)
0x3f KEY_PC (376)
0x54 KEY_MENU (139)
0x58 KEY_UP (103)
0x59 KEY_DOWN (108)
0x5a KEY_LEFT (105)
0x5b KEY_RIGHT (106)
0x5c KEY_OK (352)
0x78 KEY_A (30)
0x79 KEY_B (48)
0x7a KEY_C (46)
0x7b KEY_D (32)
0x7c KEY_E (18)
0x7d KEY_F (33)
0x82 KEY_ENTER (28)
0x8e KEY_VENDOR (360)
0x96 KEY_COFFEE (152)
0xa9 BTN_LEFT (272)
0xaa BTN_RIGHT (273)
0xbe KEY_QUESTION (214)
0xd0 KEY_EDIT (176)
0xd5 KEY_FRONT (132)
0xf9 KEY_INFO (358)

Appendix D - keycodes < 255

From Linux kernel sources "include/linux/input.h"

Keycode (decimal value)
KEY_ESC (1)
KEY_1 (2)
KEY_2 (3)
KEY_3 (4)
KEY_4 (5)
KEY_5 (6)
KEY_6 (7)
KEY_7 (8)
KEY_8 (9)
KEY_9 (10)
KEY_0 (11)
KEY_MINUS (12)
KEY_EQUAL (13)
KEY_BACKSPACE (14)
KEY_TAB (15)
KEY_Q (16)
KEY_W (17)
KEY_E (18)
KEY_R (19)
KEY_T (20)
KEY_Y (21)
KEY_U (22)
KEY_I (23)
KEY_O (24)
KEY_P (25)
KEY_LEFTBRACE (26)
KEY_RIGHTBRACE (27)
KEY_ENTER (28)
KEY_LEFTCTRL (29)
KEY_A (30)
KEY_S (31)
KEY_D (32)
KEY_F (33)
KEY_G (34)
KEY_H (35)
KEY_J (36)
KEY_K (37
KEY_L (38)
KEY_SEMICOLON (39)
KEY_APOSTROPHE (40)
KEY_GRAVE (41)
KEY_LEFTSHIFT (42)
KEY_BACKSLASH (43)
KEY_Z (44)
KEY_X (45)
KEY_C (46)
KEY_V (47)
KEY_B (48)
KEY_N (49)
KEY_M (50)
KEY_COMMA (51)
KEY_DOT (52)
KEY_SLASH (53)
KEY_RIGHTSHIFT (54)
KEY_KPASTERISK (55)
KEY_LEFTALT (56)
KEY_SPACE (57)
KEY_CAPSLOCK (58)
KEY_F1 (59)
KEY_F2 (60)
KEY_F3 (61)
KEY_F4 (62)
KEY_F5 (63)
KEY_F6 (64)
KEY_F7 (65)
KEY_F8 (66)
KEY_F9 (67)
KEY_F10 (68)
KEY_NUMLOCK (69)
KEY_SCROLLLOCK (70)
KEY_KP7 (71)
KEY_KP8 (72)
KEY_KP9 (73)
KEY_KPMINUS (74)
KEY_KP4 (75)
KEY_KP5 (76)
KEY_KP6 (77)
KEY_KPPLUS (78)
KEY_KP1 (79)
KEY_KP2 (80)
KEY_KP3 (81)
KEY_KP0 (82)
KEY_KPDOT (83)
KEY_ZENKAKUHANKAKU (85)
KEY_102ND (86)
KEY_F11 (87)
KEY_F12 (88)
KEY_RO (89)
KEY_KATAKANA (90)
KEY_HIRAGANA (91)
KEY_HENKAN (92)
KEY_KATAKANAHIRAGANA (93)
KEY_MUHENKAN (94)
KEY_KPJPCOMMA (95)
KEY_KPENTER (96)
KEY_RIGHTCTRL (97)
KEY_KPSLASH (98)
KEY_SYSRQ (99)
KEY_RIGHTALT (100)
KEY_LINEFEED (101)
KEY_HOME (102)
KEY_UP (103)
KEY_PAGEUP (104)
KEY_LEFT (105)
KEY_RIGHT (106)
KEY_END (107)
KEY_DOWN (108)
KEY_PAGEDOWN (109)
KEY_INSERT (110)
KEY_DELETE (111)
KEY_MACRO (112)
KEY_MUTE (113)
KEY_VOLUMEDOWN (114)
KEY_VOLUMEUP (115)
KEY_POWER (116)
KEY_KPEQUAL (117)
KEY_KPPLUSMINUS (118)
KEY_PAUSE (119)
KEY_SCALE (120)
KEY_KPCOMMA (121)
KEY_HANGEUL (122)
KEY_HANJA (123)
KEY_YEN (124)
KEY_LEFTMETA (125)
KEY_RIGHTMETA (126)
KEY_COMPOSE (127)
KEY_STOP (128)
KEY_AGAIN (129)
KEY_PROPS (130)
KEY_UNDO (131)
KEY_FRONT (132)
KEY_COPY (133)
KEY_OPEN (134)
KEY_PASTE (135)
KEY_FIND (136)
KEY_CUT (137)
KEY_HELP (138)
KEY_MENU (139)
KEY_CALC (140)
KEY_SETUP (141)
KEY_SLEEP (142)
KEY_WAKEUP (143)
KEY_FILE (144)
KEY_SENDFILE (145)
KEY_DELETEFILE (146)
KEY_XFER (147)
KEY_PROG1 (148)
KEY_PROG2 (149)
KEY_WWW (150)
KEY_MSDOS (151)
KEY_COFFEE (152)
KEY_DIRECTION (153)
KEY_CYCLEWINDOWS (154)
KEY_MAIL (155)
KEY_BOOKMARKS (156)
KEY_COMPUTER (157)
KEY_BACK (158)
KEY_FORWARD (159)
KEY_CLOSECD (160)
KEY_EJECTCD (161)
KEY_EJECTCLOSECD (162)
KEY_NEXTSONG (163)
KEY_PLAYPAUSE (164)
KEY_PREVIOUSSONG (165)
KEY_STOPCD (166)
KEY_RECORD (167)
KEY_REWIND (168)
KEY_PHONE (169)
KEY_ISO (170)
KEY_CONFIG (171)
KEY_HOMEPAGE (172)
KEY_REFRESH (173)
KEY_EXIT (174)
KEY_MOVE (175)
KEY_EDIT (176)
KEY_SCROLLUP (177)
KEY_SCROLLDOWN (178)
KEY_KPLEFTPAREN (179)
KEY_KPRIGHTPAREN (180)
KEY_NEW (181)
KEY_REDO (182)
KEY_F13 (183)
KEY_F14 (184)
KEY_F15 (185)
KEY_F16 (186)
KEY_F17 (187)
KEY_F18 (188)
KEY_F19 (189)
KEY_F20 (190)
KEY_F21 (191)
KEY_F22 (192)
KEY_F23 (193)
KEY_F24 (194)
KEY_PLAYCD (200)
KEY_PAUSECD (201)
KEY_PROG3 (202)
KEY_PROG4 (203)
KEY_DASHBOARD (204)
KEY_SUSPEND (205)
KEY_CLOSE (206)
KEY_PLAY (207)
KEY_FASTFORWARD (208)
KEY_BASSBOOST (209)
KEY_PRINT (210)
KEY_HP (211)
KEY_CAMERA (212)
KEY_SOUND (213)
KEY_QUESTION (214)
KEY_EMAIL (215)
KEY_CHAT (216)
KEY_SEARCH (217)
KEY_CONNECT (218)
KEY_FINANCE (219)
KEY_SPORT (220)
KEY_SHOP (221)
KEY_ALTERASE (222)
KEY_CANCEL (223)
KEY_BRIGHTNESSDOWN (224)
KEY_BRIGHTNESSUP (225)
KEY_MEDIA (226)
KEY_SWITCHVIDEOMODE (227)
KEY_KBDILLUMTOGGLE (228)
KEY_KBDILLUMDOWN (229)
KEY_KBDILLUMUP (230)
KEY_SEND (231)
KEY_REPLY (232)
KEY_FORWARDMAIL (233)
KEY_SAVE (234)
KEY_DOCUMENTS (235)
KEY_BATTERY (236)
KEY_BLUETOOTH (237)
KEY_WLAN (238)
KEY_UWB (239)
KEY_UNKNOWN (240)
KEY_VIDEO_NEXT (241)
KEY_VIDEO_PREV (242)
KEY_BRIGHTNESS_CYCLE (243)
KEY_BRIGHTNESS_ZERO (244)
KEY_DISPLAY_OFF (245)


Appendix E - ati_remote2 keycode configuration

Settings for modifying the key actions for the ati_remote2 kernel driver to common MythTV frontend keys. The remote has 4 modes, and the below configuration sets the keys identically for all 4 modes.

# ATI Key -> F11; Ubuntu's keyboard settings allow a keycode to be mapped to an executable.  
# I mapped F11 to a shell script to start mfe.
setkeycodes 0x008e 87 0x018e 87 0x028e 87 0x038e 87 0x048e 87
# OK -> Enter
setkeycodes 0x005C 28 0x015C 28 0x025C 28 0x035C 28 0x045C 28
# i (info) -> i
setkeycodes 0x00f9 23 0x01f9 23 0x02f9 23 0x03f9 23 0x04f9 23
# clock (coffee) -> Escape
setkeycodes 0x0096 1 0x0196 1 0x0296 1 0x0396 1 0x0496 1
# Pause -> p
setkeycodes 0x0030 25 0x0130 25 0x0230 25 0x0330 25 0x0430 25
# Play -> p
setkeycodes 0x002c 25 0x012c 25 0x022c 25 0x032c 25 0x042c 25
# Stop -> Space
setkeycodes 0x0031 57 0x0131 57 0x0231 57 0x0331 57 0x0431 57
# Menu -> m
setkeycodes 0x0054 50 0x0154 50 0x0254 50 0x0354 50 0x0454 50
# Check (Enter?) -> i
setkeycodes 0x0082 23 0x0182 23 0x0282 23 0x0382 23 0x0482 23
# FF -> RightArrow
setkeycodes 0x0028 106 0x0128 106 0x0228 106 0x0328 106 0x0428 106
# REW -> LeftArrow
setkeycodes 0x0029 105 0x0129 105 0x0229 105 0x0329 105 0x0429 105
# Rec -> r
setkeycodes 0x0037 19 0x0137 19 0x0237 19 0x0337 19 0x0437 19

External links