<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.8.1">
</HEAD>
<BODY>
If the remote control is connected via USB it will not be possible to set keycodes. At the moment I am trying to modify the input drivers to make this possible.<BR>
If you can set the kernel keycode, then of course you can get the X keycode by using xev. However you may find it easier to use the translation table I made:<BR>
<BR>
/* Kernel keycode -> X keycode table */<BR>
const unsigned int keycode_table[256] = {<BR>
          0,   9,  10,  11,  12,  13,  14,  15,  16,  17,  18,  19,  20,  21,  22,  23,<BR>
         24,  25,  26,  27,  28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,  39,<BR>
         40,  41,  42,  43,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,<BR>
         56,  57,  58,  59,  60,  61,  62,  63,  64,  65,  66,  67,  68,  69,  70,  71,<BR>
         72,  73,  74,  75,  76,  77,  76,  79,  80,  81,  82,  83,  84,  85,  86,  87,<BR>
         88,  89,  90,  91, 111,  221, 94,  95,  96, 211, 128, 127, 129, 208, 131, 126,<BR>
        108, 109, 112, 111, 113, 181,  97,  98,  99, 100, 102, 103, 104, 105, 106, 107,<BR>
        239, 160, 174, 176, 222, 157, 123, 110, 139, 134, 209, 210, 133, 115, 116, 117,<BR>
        232, 133, 134, 135, 140, 248, 191, 192, 122, 188, 245, 158, 161, 193, 223, 227,<BR>
        198, 199, 200, 147, 159, 151, 178, 201, 146, 203, 166, 236, 230, 235, 234, 233,<BR>
        163, 204, 253, 153, 162, 144, 164, 177, 152, 190, 208, 129, 130, 231, 209, 210,<BR>
        136, 220, 143, 246, 251, 137, 138, 182, 183, 184,  93, 184, 247, 132, 170, 219,<BR>
        249, 205, 207, 149, 150, 154, 155, 167, 168, 169, 171, 172, 173, 165, 175, 179,<BR>
        180,   0, 185, 186, 187, 118, 119, 120, 121, 229, 194, 195, 196, 197, 148, 202,<BR>
        101, 212, 237, 214, 215, 216, 217, 218, 228, 142, 213, 240, 241, 242, 243, 244,<BR>
          0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0<BR>
};<BR>
<BR>
I made this table for my project keyTouch (<A HREF="http://keytouch.sf.net">http://keytouch.sf.net</A>). If it is possible to the set keycodes for your remote control, then you can even use this program to bind actions to it. KeyTouch assigns kernel keycodes to scancodes, translates the kernel keycode to a X keycode and executes an action when that keycode is pressed under X. By using the keyTouch editor program you can make a so called keyboard file for your remote control and import this keyboard file in keyTouch to get working.<BR>
<BR>
- Marvin Raaijmakers<BR>
<BR>
On Thu, 2006-06-01 at 08:59 +0300, Aivils Stoss wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">On Trešdiena, 31. Maijs 2006 20:31, Jeremy Wilkins wrote:</FONT>
<FONT COLOR="#000000">> Hi All,</FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">> I've got an ATI remote control, this worked great in older linux 2.6</FONT>
<FONT COLOR="#000000">> kernels but the OK button has changed and now maps to linux keycode</FONT>
<FONT COLOR="#000000">> 352 (KEY_OK). I've also managed to find the the scancode using</FONT>
<FONT COLOR="#000000">> showkeys.</FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">> How do I find the equivalent X keycode? I've tried xev, but this</FONT>
<FONT COLOR="#000000">> appears to only work with keycodes up to 255?</FONT>

<FONT COLOR="#000000">Linux kernel does not send keycodes > 255 to X. That is kernel limitation.</FONT>
<FONT COLOR="#000000">Set another code on OK button.</FONT>

<FONT COLOR="#000000">man setkeycodes</FONT>

<FONT COLOR="#000000">Aivils Stoss</FONT>
<FONT COLOR="#000000">_______________________________________________</FONT>
<FONT COLOR="#000000">xorg mailing list</FONT>
<FONT COLOR="#000000"><A HREF="mailto:xorg@lists.freedesktop.org">xorg@lists.freedesktop.org</A></FONT>
<FONT COLOR="#000000"><A HREF="http://lists.freedesktop.org/mailman/listinfo/xorg">http://lists.freedesktop.org/mailman/listinfo/xorg</A></FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>