aboutsummaryrefslogtreecommitdiffstats
path: root/util/av7110_loadkeys
diff options
context:
space:
mode:
Diffstat (limited to 'util/av7110_loadkeys')
-rw-r--r--util/av7110_loadkeys/Makefile48
-rw-r--r--util/av7110_loadkeys/README64
-rw-r--r--util/av7110_loadkeys/activy.rcmm54
-rw-r--r--util/av7110_loadkeys/av7110_loadkeys.c186
-rw-r--r--util/av7110_loadkeys/evtest.c177
-rw-r--r--util/av7110_loadkeys/galaxis.rcmm51
-rw-r--r--util/av7110_loadkeys/hauppauge.rc525
-rw-r--r--util/av7110_loadkeys/hauppauge_grey.rc540
-rw-r--r--util/av7110_loadkeys/input_fake.h84
-rw-r--r--util/av7110_loadkeys/mbo_81095-code_562.rc539
-rw-r--r--util/av7110_loadkeys/medion_088.rc536
-rw-r--r--util/av7110_loadkeys/medion_155.rc535
-rw-r--r--util/av7110_loadkeys/philips.rc532
-rw-r--r--util/av7110_loadkeys/philips1358.rc537
14 files changed, 908 insertions, 0 deletions
diff --git a/util/av7110_loadkeys/Makefile b/util/av7110_loadkeys/Makefile
new file mode 100644
index 0000000..e83e069
--- /dev/null
+++ b/util/av7110_loadkeys/Makefile
@@ -0,0 +1,48 @@
+CC = gcc
+CFLAGS = -g -Wall -O2
+
+all: av7110_loadkeys evtest
+
+av7110_loadkeys: av7110_loadkeys.o
+
+evtest: evtest.o
+
+av7110_loadkeys.o: av7110_loadkeys.c input_keynames.h
+
+evtest.o: evtest.c input_keynames.h
+
+
+input_keynames.h: /usr/include/linux/input.h input_fake.h
+ @echo 'generate $@...'
+ @echo '#ifndef __INPUT_KEYNAMES_H__' > $@
+ @echo '#define __INPUT_KEYNAMES_H__' >> $@
+ @echo '' >> $@
+ @echo '#include <linux/input.h>' >> $@
+ @echo '' >> $@
+ @echo '#if !defined(KEY_OK)' >> $@
+ @echo '#include "input_fake.h"' >> $@
+ @echo '#endif' >> $@
+ @echo '' >> $@
+ @echo '' >> $@
+ @echo 'struct input_key_name {' >> $@
+ @echo ' const char *name;' >> $@
+ @echo ' int key;' >> $@
+ @echo '};' >> $@
+ @echo '' >> $@
+ @echo '' >> $@
+ @echo 'static struct input_key_name key_name [] = {' >> $@
+ @for x in `cat /usr/include/linux/input.h input_fake.h | \
+ grep KEY_ | grep "#define" | grep -v KEY_MAX | \
+ cut -f 1 | cut -f 2 -d ' ' | sort | uniq` ; do \
+ echo " { \"`echo $$x | cut -b 5-`\", $$x }," >> $@ \
+ ; \
+ done
+ @echo '};' >> $@
+ @echo '' >> $@
+ @echo '#endif /* __INPUT_KEYNAMES_H */' >> $@
+ @echo '' >> $@
+
+
+clean:
+ $(RM) core* *.o input_keynames.h av7110_loadkeys evtest
+
diff --git a/util/av7110_loadkeys/README b/util/av7110_loadkeys/README
new file mode 100644
index 0000000..b778e9a
--- /dev/null
+++ b/util/av7110_loadkeys/README
@@ -0,0 +1,64 @@
+Hi,
+
+this is a utility to setup IR control keymaps using the /proc/av7110_ir
+interface.
+
+just call
+
+ # ./av7110_loadkeys [-i|--invert] [-a|--address <num>] keymapname.(rc5|rcmm) > /proc/av7110_ir
+
+If your IR receiver hardware inverts the signal, you should use the -i
+or --invert command line option.
+
+If you have two or more devices which use the same IR protocol, you should
+specify the -a or --address parameter. If the parameter is omitted, the
+driver listens to all device addresses. Some examples:
+
+Listen to *any* IR transmitter with uses the RC5 protocol:
+# ./av7110_loadkeys hauppauge.rc5 > /proc/av7110_ir
+
+Listen to RC5 transmitter with address 2:
+# ./av7110_loadkeys -a 2 hauppauge.rc5 > /proc/av7110_ir
+
+If you don't know the correct value for the -a parameter, take a look
+on the debug output of the driver (see below).
+
+Now you can test your hardware setup using evtest
+
+ # ./evtest /dev/input/eventX
+
+where eventX is the IR input event device, usually event0 if you don't
+use USB mice or keyboards.
+
+------------------------------------------------------------------------
+
+Keymaps are in format:
+
+ <key> <associated input keycode>
+
+ 0x00 KEY_0
+ 0x01 KEY_1
+ 0x42 KEY_HOME
+
+------------------------------------------------------------------------
+
+In order to write a new keymap you might want to see the raw key
+values in the kernel log. Use
+
+ # insmod dvb-ttpci.o av7110_ir_debug=1
+
+in order to enable some verbosity in the av7110_ir driver. Then watch
+the kernel log while pressing your remote control keys. When you don't see
+any messages in your kernel log you should check all electrical connections,
+the selected protocol (RC5 or RCMM?) and the inversion setting.
+
+You find a list of all linux input key identifiers in </usr/include/input.h>
+and "./input_fake.h".
+
+Please post new keymaps on the linux-dvb mailing list or send them to
+me <holger@convergence.de>.
+
+have fun!
+
+Holger
+
diff --git a/util/av7110_loadkeys/activy.rcmm b/util/av7110_loadkeys/activy.rcmm
new file mode 100644
index 0000000..372df8e
--- /dev/null
+++ b/util/av7110_loadkeys/activy.rcmm
@@ -0,0 +1,54 @@
+0x00 KEY_0
+0x01 KEY_1
+0x02 KEY_2
+0x03 KEY_3
+0x04 KEY_4
+0x05 KEY_5
+0x06 KEY_6
+0x07 KEY_7
+0x08 KEY_8
+0x09 KEY_9
+
+0x0c KEY_POWER
+0x0a KEY_BACK
+
+0xfe KEY_SCROLLUP
+0xff KEY_SCROLLDOWN
+
+0x40 KEY_GOTO
+0x86 KEY_KEYBOARD
+
+0x87 KEY_RED
+0xda KEY_GREEN
+0xf3 KEY_YELLOW
+0x88 KEY_BLUE
+
+0x82 KEY_HOME
+0x54 KEY_MENU
+
+0x58 KEY_UP
+0x59 KEY_DOWN
+0x5a KEY_LEFT
+0x5b KEY_RIGHT
+
+0x5c KEY_OK
+
+0xf0 KEY_CHANNELUP
+0xef KEY_CHANNELDOWN
+
+0x10 KEY_VOLUMEUP
+0x11 KEY_VOLUMEDOWN
+
+0x81 KEY_INFO
+0x0d KEY_MUTE
+
+0x2f KEY_REWIND
+0x2c KEY_PLAYPAUSE
+0x2e KEY_FASTFORWARD
+0x37 KEY_RECORD
+
+0x21 KEY_PREVIOUS
+0x31 KEY_STOP
+0x20 KEY_NEXT
+0x42 KEY_EJECTCD
+
diff --git a/util/av7110_loadkeys/av7110_loadkeys.c b/util/av7110_loadkeys/av7110_loadkeys.c
new file mode 100644
index 0000000..e9eeea0
--- /dev/null
+++ b/util/av7110_loadkeys/av7110_loadkeys.c
@@ -0,0 +1,186 @@
+#include <asm/types.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <string.h>
+
+#include "input_keynames.h"
+
+
+static
+void print_error (const char *action, const char *file)
+__attribute__ ((noreturn));
+
+
+static
+void print_error (const char *action, const char *file)
+{
+ static const char msg [] = "\nERROR: could not ";
+
+ write (0, msg, strlen(msg));
+ write (0, action, strlen(action));
+ write (0, " '", 2);
+ write (0, file, strlen(file));
+ write (0, "'\n\n", 3);
+ exit (-1);
+}
+
+
+static
+int parse_keyname (char *pos, char **nend, int limit)
+{
+ int cmp, index;
+ int l = 1;
+ int r = sizeof (key_name) / sizeof (key_name[0]);
+
+ if (limit < 5)
+ return -1;
+
+ while ((*pos == ' ' || *pos == '\t') && limit > 0) {
+ (*nend)++;
+ pos++;
+ limit--;
+ }
+
+ if (pos [0] != 'K' || pos[1] != 'E' || pos[2] != 'Y' || pos[3] != '_')
+ return -2;
+
+ (*nend) += 4;
+ pos += 4;
+ limit -= 4;
+
+ while (r >= l) {
+ int len0, len1 = 0;
+
+ index = (l + r) / 2;
+
+ len0 = strlen(key_name[index-1].name);
+
+ while (len1 < limit && isgraph(pos[len1]))
+ len1++;
+
+ cmp = strncmp (key_name[index-1].name, pos,
+ strlen(key_name[index-1].name));
+
+ if (len0 < len1 && cmp == 0)
+ cmp = -1;
+
+ if (cmp == 0) {
+ *nend = pos + strlen (key_name[index-1].name);
+
+ if (**nend != '\n' &&
+ **nend != '\t' &&
+ **nend != ' ' &&
+ *nend != pos)
+ return -3;
+
+ return key_name[index-1].key;
+ }
+
+ if (cmp < 0)
+ l = index + 1;
+ else
+ r = index - 1;
+
+ if (r < l) {
+ static const char msg [] = "\nunknown key '";
+ write (0, msg, strlen(msg));
+ write (0, pos-4, len1 + 4);
+ write (0, "'\n", 2);
+ }
+ };
+
+ return -4;
+}
+
+
+
+const char usage [] = "\n\tusage: av7110_loadkeys [-i|--invert] [-a|--address <num>] keymap_filename.(rc5|rcmm)\n\n";
+
+
+struct ir_setup {
+ __u32 ir_config;
+ __u16 keytab [256];
+} __attribute__ ((packed));
+
+
+int main (int argc, char **argv)
+{
+ static struct ir_setup setup;
+ int i, fd;
+ size_t len;
+ char *buf, *pos, *fname = NULL;
+
+ for (i=1; i<argc; i++) {
+ if (!strcmp("-i", argv[i]) || !strcmp("--invert", argv[i]))
+ setup.ir_config |= 0x8000;
+ else if (!strcmp("-a", argv[i]) || !strcmp("--address", argv[i])) {
+ if (++i < argc) {
+ setup.ir_config |= (atoi(argv[i]) & 0xff) << 16;
+ setup.ir_config |= 0x4000;
+ }
+ } else
+ fname = argv[i];
+ }
+
+ if (!fname) {
+ write (0, usage, strlen(usage));
+ exit (-1);
+ }
+
+ if (strncmp(".rcmm", fname + strlen(fname) - 5, 5) == 0)
+ setup.ir_config |= 0x0001;
+ else if (strncmp(".rc5", fname + strlen(fname) - 4, 4) != 0) {
+ const char msg [] = "\nERROR: "
+ "input filename must have suffix .rc5 or .rcmm\n";
+ write (0, msg, strlen(msg));
+ exit (-1);
+ }
+
+ if ((fd = open (fname, O_RDONLY)) < 0)
+ print_error ("open", fname);
+
+ len = lseek (fd, 0, SEEK_END);
+
+ if (!(pos = buf = mmap (NULL, len, PROT_READ, MAP_PRIVATE, fd, 0)))
+ print_error ("mmap", fname);
+
+ while (pos < buf + len) {
+ int key, keycode;
+
+ while (!isxdigit(*pos) && pos < buf + len)
+ pos++;
+
+ if (pos == buf + len)
+ break;
+
+ key = strtol (pos, &pos, 0);
+ keycode = parse_keyname (pos, &pos, buf + len - pos);
+
+ if (key < 0 || key > 0xff) {
+ const char msg [] =
+ "\nERROR: key must be in range 0 ... 0xff!\n\n";
+
+ write (0, msg, strlen(msg));
+ exit (-1);
+ }
+
+ if (keycode < 0)
+ print_error ("parse", fname);
+
+ setup.keytab[key] = keycode;
+ }
+
+ munmap (buf, len);
+ close (fd);
+
+ write (1, &setup, 4 + 256 * sizeof(__u16));
+
+ return 0;
+}
+
+
diff --git a/util/av7110_loadkeys/evtest.c b/util/av7110_loadkeys/evtest.c
new file mode 100644
index 0000000..6714128
--- /dev/null
+++ b/util/av7110_loadkeys/evtest.c
@@ -0,0 +1,177 @@
+/*
+ * $Id: evtest.c,v 1.1 2004/01/17 16:59:46 js Exp $
+ *
+ * Copyright (c) 1999-2000 Vojtech Pavlik
+ *
+ * Event device test program
+ */
+
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Should you need to contact me, the author, you can do so either by
+ * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
+ * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
+ */
+
+#include <linux/input.h>
+
+#include <string.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+char *events[EV_MAX + 1] = { "Reset", "Key", "Relative", "Absolute", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+NULL, NULL, NULL, "LED", "Sound", NULL, "Repeat", "ForceFeedback", NULL, "ForceFeedbackStatus"};
+char *keys[KEY_MAX + 1] = { "Reserved", "Esc", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "Minus", "Equal", "Backspace",
+"Tab", "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "LeftBrace", "RightBrace", "Enter", "LeftControl", "A", "S", "D", "F", "G",
+"H", "J", "K", "L", "Semicolon", "Apostrophe", "Grave", "LeftShift", "BackSlash", "Z", "X", "C", "V", "B", "N", "M", "Comma", "Dot",
+"Slash", "RightShift", "KPAsterisk", "LeftAlt", "Space", "CapsLock", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10",
+"NumLock", "ScrollLock", "KP7", "KP8", "KP9", "KPMinus", "KP4", "KP5", "KP6", "KPPlus", "KP1", "KP2", "KP3", "KP0", "KPDot", "103rd",
+"F13", "102nd", "F11", "F12", "F14", "F15", "F16", "F17", "F18", "F19", "F20", "KPEnter", "RightCtrl", "KPSlash", "SysRq",
+"RightAlt", "LineFeed", "Home", "Up", "PageUp", "Left", "Right", "End", "Down", "PageDown", "Insert", "Delete", "Macro", "Mute",
+"VolumeDown", "VolumeUp", "Power", "KPEqual", "KPPlusMinus", "Pause", "F21", "F22", "F23", "F24", "KPComma", "LeftMeta", "RightMeta",
+"Compose", "Stop", "Again", "Props", "Undo", "Front", "Copy", "Open", "Paste", "Find", "Cut", "Help", "Menu", "Calc", "Setup",
+"Sleep", "WakeUp", "File", "SendFile", "DeleteFile", "X-fer", "Prog1", "Prog2", "WWW", "MSDOS", "Coffee", "Direction",
+"CycleWindows", "Mail", "Bookmarks", "Computer", "Back", "Forward", "CloseCD", "EjectCD", "EjectCloseCD", "NextSong", "PlayPause",
+"PreviousSong", "StopCD", "Record", "Rewind", "Phone", "ISOKey", "Config", "HomePage", "Refresh", "Exit", "Move", "Edit", "ScrollUp",
+"ScrollDown", "KPLeftParenthesis", "KPRightParenthesis",
+"International1", "International2", "International3", "International4", "International5",
+"International6", "International7", "International8", "International9",
+"Language1", "Language2", "Language3", "Language4", "Language5", "Language6", "Language7", "Language8", "Language9",
+NULL,
+"PlayCD", "PauseCD", "Prog3", "Prog4", "Suspend", "Close",
+NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+"Btn0", "Btn1", "Btn2", "Btn3", "Btn4", "Btn5", "Btn6", "Btn7", "Btn8", "Btn9",
+NULL, NULL, NULL, NULL, NULL, NULL,
+"LeftBtn", "RightBtn", "MiddleBtn", "SideBtn", "ExtraBtn", "ForwardBtn", "BackBtn",
+NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+"Trigger", "ThumbBtn", "ThumbBtn2", "TopBtn", "TopBtn2", "PinkieBtn",
+"BaseBtn", "BaseBtn2", "BaseBtn3", "BaseBtn4", "BaseBtn5", "BaseBtn6",
+NULL, NULL, NULL, "BtnDead",
+"BtnA", "BtnB", "BtnC", "BtnX", "BtnY", "BtnZ", "BtnTL", "BtnTR", "BtnTL2", "BtnTR2", "BtnSelect", "BtnStart", "BtnMode",
+"BtnThumbL", "BtnThumbR", NULL,
+"ToolPen", "ToolRubber", "ToolBrush", "ToolPencil", "ToolAirbrush", "ToolFinger", "ToolMouse", "ToolLens", NULL, NULL,
+"Touch", "Stylus", "Stylus2", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+"Ok", "Select", "Goto", "Clear", "Power2", "Option", "Info", "Time", "Vendor",
+"Archive", "Program", "Channel", "Favorites", "EPG", "PVR", "MHP", "Language",
+"Title", "Subtitle", "Angle", "Zoom", "Mode", "Keyboard", "Screen", "PC", "TV",
+"TV2", "VCR", "VCR2", "Sat", "Sat2", "CD", "Tape", "Radio", "Tuner", "Player",
+"Text", "DVD", "Aux", "MP3", "Audio", "Video", "Directory", "List", "Memo",
+"Calendar", "Red", "Green", "Yellow", "Blue", "ChannelUp", "ChannelDown",
+"First", "Last", "AB", "Play", "Restart", "Slow", "Shuffle", "FastForward",
+"Previous", "Next", "Digits", "Teen", "Twen", "Break" };
+
+char *absval[5] = { "Value", "Min ", "Max ", "Fuzz ", "Flat " };
+char *relatives[REL_MAX + 1] = { "X", "Y", "Z", NULL, NULL, NULL, "HWheel", "Dial", "Wheel" };
+char *absolutes[ABS_MAX + 1] = { "X", "Y", "Z", "Rx", "Ry", "Rz", "Throttle", "Rudder", "Wheel", "Gas", "Brake",
+NULL, NULL, NULL, NULL, NULL,
+"Hat0X", "Hat0Y", "Hat1X", "Hat1Y", "Hat2X", "Hat2Y", "Hat3X", "Hat 3Y", "Pressure", "Distance", "XTilt", "YTilt"};
+char *leds[LED_MAX + 1] = { "NumLock", "CapsLock", "ScrollLock", "Compose", "Kana", "Sleep", "Suspend", "Mute" };
+char *repeats[REP_MAX + 1] = { "Delay", "Period" };
+char *sounds[SND_MAX + 1] = { "Bell", "Click" };
+
+char **names[EV_MAX + 1] = { events, keys, relatives, absolutes, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+NULL, NULL, leds, sounds, NULL, repeats, NULL, NULL, NULL };
+
+#define BITS_PER_LONG (sizeof(long) * 8)
+#define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1)
+#define OFF(x) ((x)%BITS_PER_LONG)
+#define BIT(x) (1UL<<OFF(x))
+#define LONG(x) ((x)/BITS_PER_LONG)
+#define test_bit(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1)
+
+int main (int argc, char **argv)
+{
+ int fd, rd, i, j, k;
+ struct input_event ev[64];
+ int version;
+ unsigned short id[4];
+ unsigned long bit[EV_MAX][NBITS(KEY_MAX)];
+ char name[256] = "Unknown";
+ int abs[5];
+
+ if (argc < 2) {
+ printf("Usage: evtest /dev/input/eventX\n");
+ printf("Where X = input device number\n");
+ exit(1);
+ }
+
+ if ((fd = open(argv[argc - 1], O_RDONLY)) < 0) {
+ perror("evtest");
+ exit(1);
+ }
+
+ if (ioctl(fd, EVIOCGVERSION, &version)) {
+ perror("evtest: can't get version");
+ exit(1);
+ }
+
+ printf("Input driver version is %d.%d.%d\n",
+ version >> 16, (version >> 8) & 0xff, version & 0xff);
+
+ ioctl(fd, EVIOCGID, id);
+ printf("Input device ID: bus 0x%x vendor 0x%x product 0x%x version 0x%x\n",
+ id[ID_BUS], id[ID_VENDOR], id[ID_PRODUCT], id[ID_VERSION]);
+
+ ioctl(fd, EVIOCGNAME(sizeof(name)), name);
+ printf("Input device name: \"%s\"\n", name);
+
+ memset(bit, 0, sizeof(bit));
+ ioctl(fd, EVIOCGBIT(0, EV_MAX), bit[0]);
+ printf("Supported events:\n");
+
+ for (i = 0; i < EV_MAX; i++)
+ if (test_bit(i, bit[0])) {
+ printf(" Event type %d (%s)\n", i, events[i] ? events[i] : "?");
+ ioctl(fd, EVIOCGBIT(i, KEY_MAX), bit[i]);
+ for (j = 0; j < KEY_MAX; j++)
+ if (test_bit(j, bit[i])) {
+ printf(" Event code %d (%s)\n", j, names[i] ? (names[i][j] ? names[i][j] : "?") : "?");
+ if (i == EV_ABS) {
+ ioctl(fd, EVIOCGABS(j), abs);
+ for (k = 0; k < 5; k++)
+ if ((k < 3) || abs[k])
+ printf(" %s %6d\n", absval[k], abs[k]);
+ }
+ }
+ }
+
+
+ printf("Testing ... (interrupt to exit)\n");
+
+ while (1) {
+ rd = read(fd, ev, sizeof(struct input_event) * 64);
+
+ if (rd < (int) sizeof(struct input_event)) {
+ printf("yyy\n");
+ perror("\nevtest: error reading");
+ exit (1);
+ }
+
+ for (i = 0; i < rd / sizeof(struct input_event); i++)
+ printf("Event: time %ld.%06ld, type %d (%s), code %d (%s), value %d\n",
+ ev[i].time.tv_sec, ev[i].time.tv_usec, ev[i].type,
+ events[ev[i].type] ? events[ev[i].type] : "?",
+ ev[i].code,
+ names[ev[i].type] ? (names[ev[i].type][ev[i].code] ? names[ev[i].type][ev[i].code] : "?") : "?",
+ ev[i].value);
+
+ }
+}
+
diff --git a/util/av7110_loadkeys/galaxis.rcmm b/util/av7110_loadkeys/galaxis.rcmm
new file mode 100644
index 0000000..86268e9
--- /dev/null
+++ b/util/av7110_loadkeys/galaxis.rcmm
@@ -0,0 +1,51 @@
+0x00 KEY_0
+0x01 KEY_1
+0x02 KEY_2
+0x03 KEY_3
+0x04 KEY_4
+0x05 KEY_5
+0x06 KEY_6
+0x07 KEY_7
+0x08 KEY_8
+0x09 KEY_9
+
+0x0a KEY_MHP
+0x0c KEY_POWER
+0x0d KEY_MUTE
+0x0f KEY_INFO
+0x10 KEY_VOLUMEUP
+0x11 KEY_VOLUMEDOWN
+0x20 KEY_CHANNELUP
+0x21 KEY_CHANNELDOWN
+0x3c KEY_TEXT
+0x3f KEY_TV
+
+0x45 KEY_SETUP
+0x4b KEY_SUBTITLE
+0x4e KEY_LANGUAGE
+
+0x50 KEY_RADIO
+0x55 KEY_EXIT
+
+0x58 KEY_UP
+0x59 KEY_DOWN
+0x5a KEY_LEFT
+0x5b KEY_RIGHT
+0x5c KEY_OK
+
+0x6d KEY_RED
+0x6e KEY_GREEN
+0x6f KEY_YELLOW
+0x70 KEY_BLUE
+
+0x78 KEY_MENU
+0x79 KEY_LIST
+0xcc KEY_EPG
+
+0xc4 KEY_UP
+0xc5 KEY_UP
+0xc6 KEY_DOWN
+0xc7 KEY_DOWN
+
+0xff KEY_VCR
+
diff --git a/util/av7110_loadkeys/hauppauge.rc5 b/util/av7110_loadkeys/hauppauge.rc5
new file mode 100644
index 0000000..c9a65b3
--- /dev/null
+++ b/util/av7110_loadkeys/hauppauge.rc5
@@ -0,0 +1,25 @@
+0x00 KEY_0
+0x01 KEY_1
+0x02 KEY_2
+0x03 KEY_3
+0x04 KEY_4
+0x05 KEY_5
+0x06 KEY_6
+0x07 KEY_7
+0x08 KEY_8
+0x09 KEY_9
+
+0x0c KEY_RADIO
+0x0d KEY_MUTE
+0x0f KEY_TV
+
+0x10 KEY_VOLUMEUP
+0x11 KEY_VOLUMEDOWN
+0x1e KEY_VENDOR
+
+0x20 KEY_CHANNELUP
+0x21 KEY_CHANNELDOWN
+0x22 KEY_SELECT
+0x26 KEY_CYCLEWINDOWS
+0x2e KEY_SCREEN
+
diff --git a/util/av7110_loadkeys/hauppauge_grey.rc5 b/util/av7110_loadkeys/hauppauge_grey.rc5
new file mode 100644
index 0000000..ac186dc
--- /dev/null
+++ b/util/av7110_loadkeys/hauppauge_grey.rc5
@@ -0,0 +1,40 @@
+
+0x3d KEY_POWER
+0x3b KEY_GOTO
+
+0x00 KEY_0
+0x01 KEY_1
+0x02 KEY_2
+0x03 KEY_3
+0x04 KEY_4
+0x05 KEY_5
+0x06 KEY_6
+0x07 KEY_7
+0x08 KEY_8
+0x09 KEY_9
+
+0x1f KEY_EXIT
+0x0d KEY_MENU
+
+0x0b KEY_RED
+0x2e KEY_GREEN
+0x38 KEY_YELLOW
+0x29 KEY_BLUE
+
+0x11 KEY_LEFT
+0x10 KEY_RIGHT
+0x20 KEY_UP
+0x21 KEY_DOWN
+0x25 KEY_OK
+
+0x0f KEY_MUTE
+0x0c KEY_INFO
+0x3c KEY_EPG
+0x32 KEY_REWIND
+0x35 KEY_PLAY
+0x34 KEY_FASTFORWARD
+0x37 KEY_RECORD
+0x36 KEY_STOP
+0x30 KEY_PAUSE
+0x24 KEY_PREVIOUS
+0x1e KEY_NEXT
diff --git a/util/av7110_loadkeys/input_fake.h b/util/av7110_loadkeys/input_fake.h
new file mode 100644
index 0000000..7aecc9f
--- /dev/null
+++ b/util/av7110_loadkeys/input_fake.h
@@ -0,0 +1,84 @@
+#ifndef _INPUT_FAKE_H
+#define _INPUT_FAKE_H
+
+#include <linux/input.h>
+
+
+#if !defined(KEY_OK)
+
+/**
+ * define some additional remote control keys in case they
+ * were not already defined above in <linux/input.h>
+ */
+
+#define KEY_OK 0x160
+#define KEY_SELECT 0x161
+#define KEY_GOTO 0x162
+#define KEY_CLEAR 0x163
+#define KEY_POWER2 0x164
+#define KEY_OPTION 0x165
+#define KEY_INFO 0x166
+#define KEY_TIME 0x167
+#define KEY_VENDOR 0x168
+#define KEY_ARCHIVE 0x169
+#define KEY_PROGRAM 0x16a
+#define KEY_CHANNEL 0x16b
+#define KEY_FAVORITES 0x16c
+#define KEY_EPG 0x16d
+#define KEY_PVR 0x16e
+#define KEY_MHP 0x16f
+#define KEY_LANGUAGE 0x170
+#define KEY_TITLE 0x171
+#define KEY_SUBTITLE 0x172
+#define KEY_ANGLE 0x173
+#define KEY_ZOOM 0x174
+#define KEY_MODE 0x175
+#define KEY_KEYBOARD 0x176
+#define KEY_SCREEN 0x177
+#define KEY_PC 0x178
+#define KEY_TV 0x179
+#define KEY_TV2 0x17a
+#define KEY_VCR 0x17b
+#define KEY_VCR2 0x17c
+#define KEY_SAT 0x17d
+#define KEY_SAT2 0x17e
+#define KEY_CD 0x17f
+#define KEY_TAPE 0x180
+#define KEY_RADIO 0x181
+#define KEY_TUNER 0x182
+#define KEY_PLAYER 0x183
+#define KEY_TEXT 0x184
+#define KEY_DVD 0x185
+#define KEY_AUX 0x186
+#define KEY_MP3 0x187
+#define KEY_AUDIO 0x188
+#define KEY_VIDEO 0x189
+#define KEY_DIRECTORY 0x18a
+#define KEY_LIST 0x18b
+#define KEY_MEMO 0x18c
+#define KEY_CALENDAR 0x18d
+#define KEY_RED 0x18e
+#define KEY_GREEN 0x18f
+#define KEY_YELLOW 0x190
+#define KEY_BLUE 0x191
+#define KEY_CHANNELUP 0x192
+#define KEY_CHANNELDOWN 0x193
+#define KEY_FIRST 0x194
+#define KEY_LAST 0x195
+#define KEY_AB 0x196
+#define KEY_PLAY 0x197
+#define KEY_RESTART 0x198
+#define KEY_SLOW 0x199
+#define KEY_SHUFFLE 0x19a
+#define KEY_FASTFORWARD 0x19b
+#define KEY_PREVIOUS 0x19c
+#define KEY_NEXT 0x19d
+#define KEY_DIGITS 0x19e
+#define KEY_TEEN 0x19f
+#define KEY_TWEN 0x1a0
+#define KEY_BREAK 0x1a1
+
+
+#endif /* !defined(KEY_OK) */
+#endif /* _INPUT_FAKE_H */
+
diff --git a/util/av7110_loadkeys/mbo_81095-code_562.rc5 b/util/av7110_loadkeys/mbo_81095-code_562.rc5
new file mode 100644
index 0000000..357e410
--- /dev/null
+++ b/util/av7110_loadkeys/mbo_81095-code_562.rc5
@@ -0,0 +1,39 @@
+0x0c KEY_POWER
+
+0x01 KEY_1
+0x02 KEY_2
+0x03 KEY_3
+0x04 KEY_4
+
+0x05 KEY_5
+0x06 KEY_6
+0x07 KEY_7
+0x08 KEY_8
+
+0x09 KEY_9
+0x00 KEY_0
+0x0a KEY_F11
+0x2b KEY_F12
+
+0x3f KEY_PROGRAM
+0x23 KEY_CONFIG
+0x0d KEY_MUTE
+
+0x11 KEY_VOLUMEDOWN
+0x10 KEY_VOLUMEUP
+0x20 KEY_CHANNELUP
+0x21 KEY_CHANNELDOWN
+0x29 KEY_TV
+
+0x1a KEY_RED
+0x1b KEY_GREEN
+0x2e KEY_YELLOW
+0x24 KEY_BLUE
+
+0x32 KEY_REWIND
+0x35 KEY_PLAY
+0x34 KEY_FORWARD
+0x37 KEY_RECORD
+
+0x36 KEY_STOP
+0x30 KEY_PAUSE
diff --git a/util/av7110_loadkeys/medion_088.rc5 b/util/av7110_loadkeys/medion_088.rc5
new file mode 100644
index 0000000..ebec3fe
--- /dev/null
+++ b/util/av7110_loadkeys/medion_088.rc5
@@ -0,0 +1,36 @@
+0x00 KEY_0
+0x01 KEY_1
+0x02 KEY_2
+0x03 KEY_3
+0x04 KEY_4
+0x05 KEY_5
+0x06 KEY_6
+0x07 KEY_7
+0x08 KEY_8
+0x09 KEY_9
+
+0x0b KEY_BACK
+0x0c KEY_POWER
+0x0d KEY_MUTE
+0x0e KEY_MENU
+0x0f KEY_TV
+
+0x10 KEY_VOLUMEUP
+0x11 KEY_VOLUMEDOWN
+0x12 KEY_UP
+0x13 KEY_DOWN
+0x14 KEY_RIGHT
+0x15 KEY_LEFT
+0x1e KEY_VENDOR
+
+0x20 KEY_CHANNELUP
+0x21 KEY_CHANNELDOWN
+0x22 KEY_SELECT
+0x23 KEY_OK
+0x26 KEY_CYCLEWINDOWS
+0x2e KEY_SCREEN
+
+0x37 KEY_RED
+0x36 KEY_GREEN
+0x34 KEY_BLUE
+0x32 KEY_YELLOW
diff --git a/util/av7110_loadkeys/medion_155.rc5 b/util/av7110_loadkeys/medion_155.rc5
new file mode 100644
index 0000000..416bbd9
--- /dev/null
+++ b/util/av7110_loadkeys/medion_155.rc5
@@ -0,0 +1,35 @@
+0x00 KEY_0
+0x01 KEY_1
+0x02 KEY_2
+0x03 KEY_3
+0x04 KEY_4
+0x05 KEY_5
+0x06 KEY_6
+0x07 KEY_7
+0x08 KEY_8
+0x09 KEY_9
+
+0x35 KEY_BACK
+0x0c KEY_POWER
+0x0d KEY_MUTE
+0x3f KEY_MENU
+0x0f KEY_TV
+
+0x10 KEY_VOLUMEUP
+0x11 KEY_VOLUMEDOWN
+0x12 KEY_UP
+0x13 KEY_DOWN
+0x14 KEY_RIGHT
+0x15 KEY_LEFT
+
+0x0a KEY_CHANNELUP
+0x0b KEY_CHANNELDOWN
+0x22 KEY_SELECT
+0x23 KEY_OK
+0x26 KEY_CYCLEWINDOWS
+0x2e KEY_SCREEN
+
+0x37 KEY_RED
+0x36 KEY_GREEN
+0x34 KEY_BLUE
+0x32 KEY_YELLOW
diff --git a/util/av7110_loadkeys/philips.rc5 b/util/av7110_loadkeys/philips.rc5
new file mode 100644
index 0000000..68bc85d
--- /dev/null
+++ b/util/av7110_loadkeys/philips.rc5
@@ -0,0 +1,32 @@
+0x00 KEY_0
+0x01 KEY_1
+0x02 KEY_2
+0x03 KEY_3
+0x04 KEY_4
+0x05 KEY_5
+0x06 KEY_6
+0x07 KEY_7
+0x08 KEY_8
+0x09 KEY_9
+
+0x0b KEY_MENU
+0x0c KEY_POWER
+0x0d KEY_MUTE
+0x0e KEY_OK
+0x0f KEY_MINUS
+0x10 KEY_VOLUMEUP
+0x11 KEY_VOLUMEDOWN
+
+0x20 KEY_CHANNELUP
+0x21 KEY_CHANNELDOWN
+0x26 KEY_INFO
+0x2d KEY_ZOOM
+0x2e KEY_CYCLEWINDOWS
+
+0x32 KEY_PLAY
+0x34 KEY_FORWARD
+0x36 KEY_STOP
+0x37 KEY_REWIND
+0x38 KEY_AUX
+0x3c KEY_TEXT
+0x3f KEY_SCREEN
diff --git a/util/av7110_loadkeys/philips1358.rc5 b/util/av7110_loadkeys/philips1358.rc5
new file mode 100644
index 0000000..e30efba
--- /dev/null
+++ b/util/av7110_loadkeys/philips1358.rc5
@@ -0,0 +1,37 @@
+0x00 KEY_0
+0x01 KEY_1
+0x02 KEY_2
+0x03 KEY_3
+0x04 KEY_4
+0x05 KEY_5
+0x06 KEY_6
+0x07 KEY_7
+0x08 KEY_8
+0x09 KEY_9
+0x0C KEY_POWER
+0x0D KEY_MUTE
+0x0E KEY_OK
+0x0F KEY_DIGITS
+0x10 KEY_RIGHT
+0x11 KEY_LEFT
+0x1E KEY_STOP
+0x20 KEY_UP
+0x21 KEY_DOWN
+0x23 KEY_AB
+0x24 KEY_RECORD
+0x25 KEY_SUBTITLE
+0x26 KEY_INFO
+0x29 KEY_PLAY
+0x2A KEY_FORWARD
+0x2B KEY_PAUSE
+0x2C KEY_REWIND
+0x2D KEY_F4
+0x2E KEY_F3
+0x32 KEY_YELLOW
+0x34 KEY_BLUE
+0x36 KEY_GREEN
+0x37 KEY_RED
+0x38 KEY_AUX
+0x3C KEY_F2
+0x3D KEY_SCREEN
+0x3F KEY_F1 \ No newline at end of file