Twinhan VP-1025 LIRC Config

From MythTV Official Wiki
Jump to: navigation, search

This is a DVB-S card.

To get the remote control to work I wrote the following lircrc file.

Note that I have not mapped all the keys to functions in mythtv. I've been working on a mapping but the various modes in mythtv and all the plugins make this quite hard.

It can be used in conjunction with the devinput lirc support and in conjunction with a devinput lircd.conf. The one I use is included at the end of this page. I can't remember where I got it from, but it works. It correctly handles the keys which generate multiple events.

begin
        flags = startup_mode
        mode = NORMAL
end

begin NORMAL
        begin
                prog = mythtv
                button = LEFTSHIFT
                mode = SHIFT
        end
end NORMAL

begin NORMAL
        begin
                prog = mythtv
                button = LEFTCTRL
                mode = CTRL
        end
end NORMAL

begin CTRL
        begin
                prog = mythtv
                button = LEFTALT
                mode = CTRLALT
        end
end CTRL

# Power
begin CTRLALT
        begin
                prog = mythtv
                button = F6
                config = POWER
                mode = NORMAL
        end
end CTRLALT

# Favorite List
begin NORMAL
        begin
                prog = mythtv
                button = V
                config = M
        end
end NORMAL

# Teletext
begin NORMAL
        begin
                prog = mythtv
                button = A
                config = F7
        end
end NORMAL

# Preview
begin NORMAL
        begin
                prog = mythtv
                button = K
                config = Preview
        end
end NORMAL

# Info/EPG
begin NORMAL
        begin
                prog = mythtv
                button = E
                config = O
        end
end NORMAL

# Record List
begin NORMAL
        begin
                prog = mythtv
                button = L
                config = RecordList
        end
end NORMAL

# Zero
begin NORMAL
        begin
                prog = mythtv
                button = 0
                config = 0
        end
end NORMAL

# One
begin NORMAL
        begin
                prog = mythtv
                button = 1
                config = 1
        end
end NORMAL

# Two
begin NORMAL
        begin
                prog = mythtv
                button = 2
                config = 2
        end
end NORMAL

# Three
begin NORMAL
        begin
                prog = mythtv
                button = 3
                config = 3
        end
end NORMAL

# Four
begin NORMAL
        begin
                prog = mythtv
                button = 4
                config = 4
        end
end NORMAL

# Five
begin NORMAL
        begin
                prog = mythtv
                button = 5
                config = 5
        end
end NORMAL

# Six
begin NORMAL
        begin
                prog = mythtv
                button = 6
                config = 6
        end
end NORMAL

# Seven
begin NORMAL
        begin
                prog = mythtv
                button = 7
                config = 7
        end
end NORMAL

# Eight
begin NORMAL
        begin
                prog = mythtv
                button = 8
                config = 8
        end
end NORMAL

# Nine
begin NORMAL
        begin
                prog = mythtv
                button = 9
                config = 9
        end
end NORMAL

# Cancel
begin NORMAL
        begin
                prog = mythtv
                button = ESC
                config = Esc
        end
end NORMAL

# Clear
begin NORMAL
        begin
                prog = mythtv
                button = DELETE
                config = Backspace
        end
end NORMAL

# Back
begin NORMAL
        begin
                prog = mythtv
                button = BACKSPACE
                config = Back
        end
end NORMAL

# Tab
begin NORMAL
        begin
                prog = mythtv
                button = TAB
                config = Tab
        end
end NORMAL

# Up
begin NORMAL
        begin
                prog = mythtv
                button = UP
                config = Up
        end
end NORMAL

# Down
begin NORMAL
        begin
                prog = mythtv
                button = DOWN
                config = Down
        end
end NORMAL

# Left
begin NORMAL
        begin
                prog = mythtv
                button = LEFT
                config = Left
        end
end NORMAL

# Right
begin NORMAL
        begin
                prog = mythtv
                button = RIGHT
                config = Right
        end
end NORMAL

# Enter/ok
begin NORMAL
        begin
                prog = mythtv
                button = ENTER
                config = Return
        end
end NORMAL

# VOL+
begin SHIFT
        begin
                prog = mythtv
                button = UP
                config = ]
                mode = NORMAL
        end
end SHIFT

# VOL-
begin SHIFT
        begin
                prog = mythtv
                button = DOWN
                config = [
                mode = NORMAL
        end
end SHIFT

# CH-
begin NORMAL
        begin
                prog = mythtv
                button = PAGEDOWN
                config = Down
        end
end NORMAL

# CH+
begin NORMAL
        begin
                prog = mythtv
                button = PAGEUP
                config = Up
        end
end NORMAL

# REC
begin NORMAL
        begin
                prog = mythtv
                button = HOME
                config = R
        end
end NORMAL
# Play
begin CTRL
        begin
                prog = mythtv
                button = N
                config = Space
                mode = NORMAL
                flags = quit
        end
end CTRL

# Pause
begin NORMAL
        begin
                prog = mythtv
                button = T
                config = P
        end
end NORMAL

# Stop
begin NORMAL
        begin
                prog = mythtv
                button = END
                config = Esc
        end
end NORMAL

# FR (Rewind)
begin NORMAL
        begin
                prog = mythtv
                button = I
                config = PgUp
        end
end NORMAL

# FF
begin NORMAL
        begin
                prog = mythtv
                button = N
                config = PgDown
        end
end NORMAL

# Replay
begin CTRL
        begin
                prog = mythtv
                button = R
                config = PgUp
                mode = NORMAL
        end
end CTRL

# Skip
begin CTRL
        begin
                prog = mythtv
                button = K
                config = PgDown
                mode = NORMAL
        end
end CTRL

# Capture
begin NORMAL
        begin
                prog = mythtv
                button = P
                config = Capture
        end
end NORMAL

# SAP
begin CTRL
        begin
                prog = mythtv
                button = L
                config = SAP
                mode = NORMAL
        end
end CTRL

# PIP
begin CTRL
        begin
                prog = mythtv
                button = P
                config = V
                mode = NORMAL
        end
end CTRL

# Full Screen
begin NORMAL
        begin
                prog = mythtv
                button = Z
                config = W
                mode = NORMAL
        end
end NORMAL

# Subtitle/CC
begin CTRL
        begin
                prog = mythtv
                button = T
                config = SubtitleCC
                mode = NORMAL
        end
end CTRL

# Mute
begin NORMAL
        begin
                prog = mythtv
                button = M
                config = |
        end
end NORMAL

# L/R
begin CTRL
        begin
                prog = mythtv
                button = V
                config = LR
                mode = NORMAL
        end
end CTRL

# Hibernate
begin CTRL
        begin
                prog = mythtv
                button = S
                config = Hibernate
                mode = NORMAL
        end
end CTRL

# A/V
begin CTRL
        begin
                prog = mythtv
                button = D
                config = Y
                mode = NORMAL
        end
end CTRL

# Recall
begin NORMAL
        begin
                prog = mythtv
                button = C
                config = Recall
        end
end NORMAL

# Zoom+
begin CTRL
        begin
                prog = mythtv
                button = EQUAL
                config = Zoom+
                mode = NORMAL
        end
end CTRL

# Zoom-
begin CTRL
        begin
                prog = mythtv
                button = MINUS
                config = Zoom-
                mode = NORMAL
        end
end CTRL

# Red
begin SHIFT
        begin
                prog = mythtv
                button = R
                config = F2
                mode = NORMAL
        end
end SHIFT

# Green
begin SHIFT
        begin
                prog = mythtv
                button = G
                config = F3
                mode = NORMAL
        end
end SHIFT

# Yellow
begin SHIFT
        begin
                prog = mythtv
                button = Y
                config = F4
                mode = NORMAL
        end
end SHIFT

# Blue
begin SHIFT
        begin
                prog = mythtv
                button = B
                config = F5
                mode = NORMAL
        end
end SHIFT

A working lircd.conf file.

begin remote
        name linux-input-layer
        bits 32
        begin codes
                ESC                  0x10001
                1                    0x10002
                2                    0x10003
                3                    0x10004
                4                    0x10005
                5                    0x10006
                6                    0x10007
                7                    0x10008
                8                    0x10009
                9                    0x1000a
                0                    0x1000b
                MINUS                0x1000c
                EQUAL                0x1000d
                BACKSPACE            0x1000e
                TAB                  0x1000f
                Q                    0x10010
                W                    0x10011
                E                    0x10012
                R                    0x10013
                T                    0x10014
                Y                    0x10015
                U                    0x10016
                I                    0x10017
                O                    0x10018
                P                    0x10019
                LEFTBRACE            0x1001a
                RIGHTBRACE           0x1001b
                ENTER                0x1001c
                LEFTCTRL             0x1001d
                A                    0x1001e
                S                    0x1001f
                D                    0x10020
                F                    0x10021
                G                    0x10022
                H                    0x10023
                J                    0x10024
                K                    0x10025
                L                    0x10026
                SEMICOLON            0x10027
                APOSTROPHE           0x10028
                GRAVE                0x10029
                LEFTSHIFT            0x1002a
                BACKSLASH            0x1002b
                Z                    0x1002c
                X                    0x1002d
                C                    0x1002e
                V                    0x1002f
                B                    0x10030
                N                    0x10031
                M                    0x10032
                COMMA                0x10033
                DOT                  0x10034
                SLASH                0x10035
                RIGHTSHIFT           0x10036
                KPASTERISK           0x10037
                LEFTALT              0x10038
                SPACE                0x10039
                CAPSLOCK             0x1003a
                F1                   0x1003b
                F2                   0x1003c
                F3                   0x1003d
                F4                   0x1003e
                F5                   0x1003f
                F6                   0x10040
                F7                   0x10041
                F8                   0x10042
                F9                   0x10043
                F10                  0x10044
                NUMLOCK              0x10045
                SCROLLLOCK           0x10046
                KP7                  0x10047
                KP8                  0x10048
                KP9                  0x10049
                KPMINUS              0x1004a
                KP4                  0x1004b
                KP5                  0x1004c
                KP6                  0x1004d
                KPPLUS               0x1004e
                KP1                  0x1004f
                KP2                  0x10050
                KP3                  0x10051
                KP0                  0x10052
                KPDOT                0x10053
                103RD                0x10054
                F13                  0x10055
                102ND                0x10056
                F11                  0x10057
                F12                  0x10058
                F14                  0x10059
                F15                  0x1005a
                F16                  0x1005b
                F17                  0x1005c
                F18                  0x1005d
                F19                  0x1005e
                F20                  0x1005f
                KPENTER              0x10060
                RIGHTCTRL            0x10061
                KPSLASH              0x10062
                SYSRQ                0x10063
                RIGHTALT             0x10064
                LINEFEED             0x10065
                HOME                 0x10066
                UP                   0x10067
                PAGEUP               0x10068
                LEFT                 0x10069
                RIGHT                0x1006a
                END                  0x1006b
                DOWN                 0x1006c
                PAGEDOWN             0x1006d
                INSERT               0x1006e
                DELETE               0x1006f
                MACRO                0x10070
                MUTE                 0x10071
                VOLUMEDOWN           0x10072
                VOLUMEUP             0x10073
                POWER                0x10074
                KPEQUAL              0x10075
                KPPLUSMINUS          0x10076
                PAUSE                0x10077
                F21                  0x10078
                F22                  0x10079
                F23                  0x1007a
                F24                  0x1007b
                KPCOMMA              0x1007c
                LEFTMETA             0x1007d
                RIGHTMETA            0x1007e
                COMPOSE              0x1007f
                STOP                 0x10080
                AGAIN                0x10081
                PROPS                0x10082
                UNDO                 0x10083
                FRONT                0x10084
                COPY                 0x10085
                OPEN                 0x10086
                PASTE                0x10087
                FIND                 0x10088
                CUT                  0x10089
                HELP                 0x1008a
                MENU                 0x1008b
                CALC                 0x1008c
                SETUP                0x1008d
                SLEEP                0x1008e
                WAKEUP               0x1008f
                FILE                 0x10090
                SENDFILE             0x10091
                DELETEFILE           0x10092
                XFER                 0x10093
                PROG1                0x10094
                PROG2                0x10095
                WWW                  0x10096
                MSDOS                0x10097
                COFFEE               0x10098
                DIRECTION            0x10099
                CYCLEWINDOWS         0x1009a
                MAIL                 0x1009b
                BOOKMARKS            0x1009c
                COMPUTER             0x1009d
                BACK                 0x1009e
                FORWARD              0x1009f
                CLOSECD              0x100a0
                EJECTCD              0x100a1
                EJECTCLOSECD         0x100a2
                NEXTSONG             0x100a3
                PLAYPAUSE            0x100a4
#               PREVIOUSSONG         0x100a5
                AB                   0x100a5
                STOPCD               0x100a6
                RECORD               0x100a7
                REWIND               0x100a8
                PHONE                0x100a9
                ISO                  0x100aa
                CONFIG               0x100ab
                HOMEPAGE             0x100ac
                REFRESH              0x100ad
                EXIT                 0x100ae
                MOVE                 0x100af
                EDIT                 0x100b0
                SCROLLUP             0x100b1
                SCROLLDOWN           0x100b2
                KPLEFTPAREN          0x100b3
                KPRIGHTPAREN         0x100b4
                INTL1                0x100b5
                INTL2                0x100b6
                INTL3                0x100b7
                INTL4                0x100b8
                INTL5                0x100b9
                INTL6                0x100ba
                INTL7                0x100bb
                INTL8                0x100bc
                INTL9                0x100bd
                LANG1                0x100be
                LANG2                0x100bf
                LANG3                0x100c0
                LANG4                0x100c1
                LANG5                0x100c2
                LANG6                0x100c3
                LANG7                0x100c4
                LANG8                0x100c5
                LANG9                0x100c6
                PLAYCD               0x100c8
                PAUSECD              0x100c9
                PROG3                0x100ca
                PROG4                0x100cb
                SUSPEND              0x100cd
                CLOSE                0x100ce
                PLAY                 0x100cf
                FASTFORWARD          0x100d0
                BASSBOOST            0x100d1
                PRINT                0x100d2
                HP                   0x100d3
                CAMERA               0x100d4
                SOUND                0x100d5
                QUESTION             0x100d6
                EMAIL                0x100d7
                CHAT                 0x100d8
                SEARCH               0x100d9
                CONNECT              0x100da
                FINANCE              0x100db
                SPORT                0x100dc
                SHOP                 0x100dd
                ALTERASE             0x100de
                CANCEL               0x100df
                BRIGHTNESSDOWN       0x100e0
                BRIGHTNESSUP         0x100e1
                MEDIA                0x100e2
                UNKNOWN              0x100f0
                BTN_MISC             0x10100
                BTN_0                0x10100
                BTN_1                0x10101
                BTN_2                0x10102
                BTN_3                0x10103
                BTN_4                0x10104
                BTN_5                0x10105
                BTN_6                0x10106
                BTN_7                0x10107
                BTN_8                0x10108
                BTN_9                0x10109
                BTN_MOUSE            0x10110
                BTN_LEFT             0x10110
                BTN_RIGHT            0x10111
                BTN_MIDDLE           0x10112
                BTN_SIDE             0x10113
                BTN_EXTRA            0x10114
                BTN_FORWARD          0x10115
                BTN_BACK             0x10116
                BTN_TASK             0x10117
                BTN_JOYSTICK         0x10120
                BTN_TRIGGER          0x10120
                BTN_THUMB            0x10121
                BTN_THUMB2           0x10122
                BTN_TOP              0x10123
                BTN_TOP2             0x10124
                BTN_PINKIE           0x10125
                BTN_BASE             0x10126
                BTN_BASE2            0x10127
                BTN_BASE3            0x10128
                BTN_BASE4            0x10129
                BTN_BASE5            0x1012a
                BTN_BASE6            0x1012b
                BTN_DEAD             0x1012f
                BTN_GAMEPAD          0x10130
                BTN_A                0x10130
                BTN_B                0x10131
                BTN_C                0x10132
                BTN_X                0x10133
                BTN_Y                0x10134
                BTN_Z                0x10135
                BTN_TL               0x10136
                BTN_TR               0x10137
                BTN_TL2              0x10138
                BTN_TR2              0x10139
                BTN_SELECT           0x1013a
                BTN_START            0x1013b
                BTN_MODE             0x1013c
                BTN_THUMBL           0x1013d
                BTN_THUMBR           0x1013e
                BTN_DIGI             0x10140
                BTN_TOOL_PEN         0x10140
                BTN_TOOL_RUBBER      0x10141
                BTN_TOOL_BRUSH       0x10142
                BTN_TOOL_PENCIL      0x10143
                BTN_TOOL_AIRBRUSH    0x10144
                BTN_TOOL_FINGER      0x10145
                BTN_TOOL_MOUSE       0x10146
                BTN_TOOL_LENS        0x10147
                BTN_TOUCH            0x1014a
                BTN_STYLUS           0x1014b
                BTN_STYLUS2          0x1014c
                BTN_WHEEL            0x10150
                BTN_GEAR_DOWN        0x10150
                BTN_GEAR_UP          0x10151
                OK                   0x10160
                SELECT               0x10161
                GOTO                 0x10162
                CLEAR                0x10163
                POWER2               0x10164
                OPTION               0x10165
                INFO                 0x10166
                TIME                 0x10167
                VENDOR               0x10168
                ARCHIVE              0x10169
                PROGRAM              0x1016a
                CHANNEL              0x1016b
                FAVORITES            0x1016c
                EPG                  0x1016d
                PVR                  0x1016e
                MHP                  0x1016f
                LANGUAGE             0x10170
                TITLE                0x10171
                SUBTITLE             0x10172
                ANGLE                0x10173
                ZOOM                 0x10174
                MODE                 0x10175
                KEYBOARD             0x10176
                SCREEN               0x10177
                PC                   0x10178
                TV                   0x10179
                TV2                  0x1017a
                VCR                  0x1017b
                VCR2                 0x1017c
                SAT                  0x1017d
                SAT2                 0x1017e
                CD                   0x1017f
                TAPE                 0x10180
                RADIO                0x10181
#               TUNER                0x10182
                AV                   0x10182
                PLAYER               0x10183
                TEXT                 0x10184
                DVD                  0x10185
                AUX                  0x10186
                MP3                  0x10187
                AUDIO                0x10188
                VIDEO                0x10189
                DIRECTORY            0x1018a
                LIST                 0x1018b
                MEMO                 0x1018c
                CALENDAR             0x1018d
                RED                  0x1018e
                GREEN                0x1018f
                YELLOW               0x10190
                BLUE                 0x10191
                CHANNELUP            0x10192
                CHANNELDOWN          0x10193
                FIRST                0x10194
                LAST                 0x10195
                AB                   0x10196
                NEXT                 0x10197
                RESTART              0x10198
                SLOW                 0x10199
#               SHUFFLE              0x1019a
                PIC                  0x1019a
                BREAK                0x1019b
                PREVIOUS             0x1019c
                DIGITS               0x1019d
                TEEN                 0x1019e
                TWEN                 0x1019f
                DEL_EOL              0x101c0
                DEL_EOS              0x101c1
                INS_LINE             0x101c2
                DEL_LINE             0x101c3
        end codes
end remote