WinFast remote control
- From: Vladislav Kurz <vladislav.kurz (at) webstep.net>
- Date: Sun, 12 Feb 2006 15:15:43 +0100 (CET)
Hello all,
I have this TV card:
Leadtek Winfast TV 2000 XP Expert
with IR remote control
Leadtek Winfast CoolCommand Y0400052
Now I use kernel 2.6.15
TV card works perfectly (since kernel 2.6.8), many thanks to all
developers of cx88 drivers.
Remote works partially (since kernel 2.6.12). It seems that the definition
in /drivers/media/common/ir-common.c is made using some older remote
control. A lot of keys are missing and some are extra.
I have made my own, with correspondig keyboard definition for X11
(/etc/X11/xkb/symbols/remote), which produces keystrokes that are directly
understood by tvtime, mplayer and xmms. (Like fullscreen button is
F key, Mute button is M key, etc.) However, I would like to submit
something that could be generally used and would map keys "The Right Way".
Could someone point me where can I find reference to keycode constants
used in /drivers/media/common/ir-common.c and /include/linux/input.h ?
I have questions, like what's the difference between: KEY_FORWARD and
KEY_FASTFORWARD, KEY_NEXT and KEY_NEXTSONG, KEY_STOP and KEY_STOPCD, ...
Moreover I found out, that I can't use keys with codes higher than 255
(e.g. KEY_RED, KEY_YELLOW, ...). Well, at least they do not show up in xev
output. If I map all keys to codes less than 255 then all of them can be
used by X.org. Is there a way to enable X to use these extra keys somehow?
I would like to submit not only patch for ir-common.c but also a usable
keymap for X, and I ask if someone knows where to find a list of those
XF86AudioSomething codes with some explanation what they are supposed to
do?
Here goes the ir-common.c hack if someone is interested, and X keymap
follows after ------
Thanks for answers.
Vladislav Kurz
--- ir-common.c.orig 2006-01-03 04:21:10.000000000 +0100
+++ ir-common.c 2006-02-12 14:18:37.000000000 +0100
(at) (at) -87,42 +87,56 (at) (at)
/* Table for Leadtek Winfast Remote Controls - used by both bttv and cx88
*/
IR_KEYTAB_TYPE ir_codes_winfast[IR_KEYTAB_SIZE] = {
- /* Keys 0 to 9 */
- [ 18 ] = KEY_KP0,
- [ 5 ] = KEY_KP1,
- [ 6 ] = KEY_KP2,
- [ 7 ] = KEY_KP3,
- [ 9 ] = KEY_KP4,
- [ 10 ] = KEY_KP5,
- [ 11 ] = KEY_KP6,
- [ 13 ] = KEY_KP7,
- [ 14 ] = KEY_KP8,
- [ 15 ] = KEY_KP9,
[ 0 ] = KEY_POWER,
- [ 2 ] = KEY_TUNER, /* TV/FM */
- [ 30 ] = KEY_VIDEO,
- [ 4 ] = KEY_VOLUMEUP,
- [ 8 ] = KEY_VOLUMEDOWN,
- [ 12 ] = KEY_CHANNELUP,
- [ 16 ] = KEY_CHANNELDOWN,
- [ 3 ] = KEY_ZOOM, /* fullscreen */
- [ 31 ] = KEY_SUBTITLE, /* closed caption/teletext */
+ [ 3 ] = KEY_F, /* fullscreen */
+ [ 4 ] = KEY_RIGHT,
+ [ 5 ] = KEY_1,
+ [ 6 ] = KEY_2,
+ [ 7 ] = KEY_3,
+ [ 8 ] = KEY_LEFT,
+ [ 9 ] = KEY_4,
+ [ 10 ] = KEY_5,
+ [ 11 ] = KEY_6,
+ [ 12 ] = KEY_UP,
+ [ 13 ] = KEY_7,
+ [ 14 ] = KEY_8,
+ [ 15 ] = KEY_9,
+ [ 16 ] = KEY_DOWN,
+ [ 17 ] = KEY_BACKSPACE,
+ [ 18 ] = KEY_0,
+ [ 19 ] = KEY_ENTER,
+ [ 20 ] = KEY_M, /* mute */
+ [ 22 ] = KEY_F5, /* display */
+ [ 27 ] = KEY_F6, /* audio */
+ [ 30 ] = KEY_F7, /* video */
+ [ 31 ] = KEY_TEXT, /* closed caption/teletext */
[ 32 ] = KEY_SLEEP,
- [ 20 ] = KEY_MUTE,
+ [ 33 ] = KEY_DOT,
+ [ 34 ] = KEY_PREVIOUSSONG,
+ [ 35 ] = KEY_PLAYPAUSE,
+ [ 36 ] = KEY_NEXTSONG,
+ [ 37 ] = KEY_EJECTCD, /* time shift */
+ [ 38 ] = KEY_STOPCD,
+ [ 39 ] = KEY_RECORD,
+ [ 40 ] = KEY_S, /* snap shot */
+ [ 41 ] = KEY_EXIT, /* boss key */
+ [ 42 ] = KEY_UNKNOWN, /* PIP */
[ 43 ] = KEY_RED,
[ 44 ] = KEY_GREEN,
[ 45 ] = KEY_YELLOW,
[ 46 ] = KEY_BLUE,
- [ 24 ] = KEY_KPPLUS, /* fine tune + */
- [ 25 ] = KEY_KPMINUS, /* fine tune - */
- [ 33 ] = KEY_KPDOT,
- [ 19 ] = KEY_KPENTER,
- [ 34 ] = KEY_BACK,
- [ 35 ] = KEY_PLAYPAUSE,
- [ 36 ] = KEY_NEXT,
- [ 38 ] = KEY_STOP,
- [ 39 ] = KEY_RECORD
+ [ 47 ] = KEY_F1, /* menu */
+ [ 48 ] = KEY_Q, /* C */
+ [ 49 ] = KEY_CHANNEL, /* channel surf */
+ [ 50 ] = KEY_V, /* subtitle */
+ [ 51 ] = KEY_E, /* language */
+ [ 52 ] = KEY_LEFT, /* << */
+ [ 53 ] = KEY_RIGHT, /* >> */
+ [ 54 ] = KEY_TV, /* TV */
+ [ 55 ] = KEY_RADIO, /* FM */
+ [ 56 ] = KEY_DVD, /* DVD */
+
};
EXPORT_SYMBOL_GPL(ir_codes_winfast);
------
// Leadtek WinFast CoolCommand Y0400052
partial alphanumeric_keys
xkb_symbols "winfast" {
name[Group1]= "LeadTek WinFast CoolCommand";
key <I5E> { [ XF86PowerOff ] }; // Power
key <I5F> { [ XF86Sleep ] }; // Sleep
/// <M> // Mute
/// <Q> // C
/// <F1> // Menu
/// <F> // Zoom
key <I10> { [ XF86AudioPrev ] }; // |<
key <I22> { [ XF86AudioPlay ] }; // >/||
key <I19> { [ XF86AudioNext ] }; // >|
/// <V> // Subtitles
/// <LEFT> // <<
/// <I24> { [ XF86AudioStop ] }; // []
/// <RIGHT> // >>
/// <E> // Language
key <I24> { [ XF86AudioStop ] }; // []
key <I31> { [ XF86AudioRecord ] }; // ()
key <K6C> { [ XF86Eject ] }; // (->
};
--
Press Ctrl-Alt-Del to continue...
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request (at) redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list