WinTV Nova-T Keyboard Map

From MythTV Official Wiki
Jump to: navigation, search

The author is presently slowly managing to get this working (this is MythTV, so what's new!).

Newer kernels have support for this card as a keyboard. Button pushes received by the dongle are translated into keyboard events. Alas, the keymap the driver uses does not seem to agree with the sytem keymap ; many of the buttons produce kernel messages about unrecognised keycodes. Currently the keys that appear to work well are the arrow, OK and number keys. OK is mapped to the Enter key which is sensible enough.

N.B. - the following info should be unnecessary soon as patches for full support for this remote are arriving with kernel 2.6.17

Apparently, this remote is fairly new and the kernel support for it is not complete (as of 2.6.16). Some of the keycodes the remote produces are not included in the code. By banging the buttons and watching the kernel messages, I've noted which keycode goes with which button and added some lines to this array....

Please note, that I didn't agree with some of the key assignments that were already present in the kernel source, and others conflicted with remote buttons that made more sense with the code that was already taken. Where this is so, these buttons have been changed ; as a result, there is a distinct keycode that makes internal sense (to me, at least) for every button on the remote. But it's not compatible with configurations based on the original. So you might have to change a few lines in lircd.conf and lircrc files, but that's about as much pain as it will cause.

 /usr/src/linux/drivers/media/common/ir-common.

// I've added some new keycodes to this array
// !!** SOME OF THE EXISTING CODES HAVE CHANGED FROM THE DEFAULT KERNEL SOURCE **!!
IR_KEYTAB_TYPE ir_codes_hauppauge_new[IR_KEYTAB_SIZE] = {
	[ 0x00 ] = KEY_KP0,             // 0
	[ 0x01 ] = KEY_KP1,             // 1
	[ 0x02 ] = KEY_KP2,             // 2
	[ 0x03 ] = KEY_KP3,             // 3
	[ 0x04 ] = KEY_KP4,             // 4
	[ 0x05 ] = KEY_KP5,             // 5
	[ 0x06 ] = KEY_KP6,             // 6
	[ 0x07 ] = KEY_KP7,             // 7
	[ 0x08 ] = KEY_KP8,             // 8
	[ 0x09 ] = KEY_KP9,             // 9
	[ 0x0a ] = KEY_TEXT,      	// keypad asterisk as well
	[ 0x0b ] = KEY_RED,             // red button
	[ 0x0c ] = KEY_RADIO,           // radio
	[ 0x0d ] = KEY_MENU,            // menu
	[ 0x0e ] = KEY_SUBTITLE,	// also the # key
	[ 0x0f ] = KEY_MUTE,            // mute
	[ 0x10 ] = KEY_VOLUMEUP,        // volume +
	[ 0x11 ] = KEY_VOLUMEDOWN,      // volume -
	[ 0x12 ] = KEY_PREVIOUS,        // previous channel
	[ 0x14 ] = KEY_UP,              // up
	[ 0x15 ] = KEY_DOWN,		// down
	[ 0x16 ] = KEY_LEFT,		// left
	[ 0x17 ] = KEY_RIGHT,		// right
	[ 0x18 ] = KEY_VIDEO,		// Videos
	[ 0x19 ] = KEY_AUDIO,		// Music
	[ 0x1a ] = KEY_MHP,		// Pictures - presume this means "Multimedia Home Platform"- no "PICTURES" key in input.h
	[ 0x1b ] = KEY_EPG,		// Guide
	[ 0x1c ] = KEY_TV,		// TV
	[ 0x1e ] = KEY_NEXTSONG,        // skip >|
	[ 0x1f ] = KEY_EXIT,            // back/exit
	[ 0x20 ] = KEY_CHANNELUP,       // channel / program +
	[ 0x21 ] = KEY_CHANNELDOWN,     // channel / program -
	[ 0x22 ] = KEY_CHANNEL,         // source (old black remote)
	[ 0x24 ] = KEY_PREVIOUSSONG,    // replay |<
	[ 0x25 ] = KEY_ENTER,           // OK
	[ 0x26 ] = KEY_SLEEP,           // minimize (old black remote)
	[ 0x29 ] = KEY_BLUE,            // blue key
	[ 0x2e ] = KEY_GREEN,           // green button
	[ 0x30 ] = KEY_PAUSE,           // pause
	[ 0x32 ] = KEY_REWIND,          // backward <<
	[ 0x34 ] = KEY_FASTFORWARD,     // forward >>
	[ 0x35 ] = KEY_PLAY,            // play
	[ 0x36 ] = KEY_STOP,            // stop
	[ 0x37 ] = KEY_RECORD,          // recording
	[ 0x38 ] = KEY_YELLOW,          // yellow key
	[ 0x3b ] = KEY_SELECT,          // top right button
	[ 0x3c ] = KEY_ZOOM,            // full
	[ 0x3d ] = KEY_POWER,           // system power (green button)
};
EXPORT_SYMBOL(ir_codes_hauppauge_new);