# lircrc.URC-6131/RC-5 (Hauppauge PVR-250)
# 2004-01-25, Joe Votour
# mailto:vulturej@vulturesnest.net
# Save this file in ~/.mythtv/lircrc, and make a symlink with ~/.lircrc
# TODO: Test/configure the mplayer buttons
#       Finish the rest of the remote buttons for MythTV

# Power button/quit
#begin
#    prog = mythtv
#    button = POWER
#    config = Esc
#end

# Change TV card input
begin
    prog = mythtv
    button = TV/VID
    config = C
end

# Toggle Picture-In-Picture
begin
    prog = mythtv
    button = PIP
    config = V
end

# Swap the PiP windows
begin
    prog = mythtv
    button = Swap
    config = N
end

# Number keys
begin
    prog = mythtv
    button = 1
    config = 1
end

begin
    prog = mythtv
    button = 2
    config = 2
end

begin
    prog = mythtv
    button = 3
    config = 3
end

begin
    prog = mythtv
    button = 4
    config = 4
end

begin
    prog = mythtv
    button = 5
    config = 5
end

begin
    prog = mythtv
    button = 6
    config = 6
end

begin
    prog = mythtv
    button = 7
    config = 7
end

begin
    prog = mythtv
    button = 8
    config = 8
end

begin
    prog = mythtv
    button = 9
    config = 9
end

begin
    prog = mythtv
    button = 0
    config = 0
end

# Exit button (returning to menu)
begin
    prog = mythtv
    button = EXIT
    config = Esc
end

# Menu button (TV menu)
begin
    prog = mythtv
    button = MENU
    config = M
end

# Guide button (EPG)
begin
    prog = mythtv
    button = GUIDE
    config = S
end

# Delete (i.e. View recordings screen)
begin
    prog = mythtv
    button = POWER
    config = D
end

# View program info (OSD)
begin
    prog = mythtv
    button = INFO
    config = I
end

# Note the "repeat =" strings in the volume and channel.
# This means that if you hold down the key, every nth instance will be
# passed.  This depends on your system, so you may want to increase or
# decrease this and see what happens.  repeat = 1 is probably too
# fast.

# Volume Down
begin
    prog = mythtv
    button = VOL-
    repeat = 3
    config = F10
end

# Volume Up
begin
    prog = mythtv
    button = VOL+
    repeat = 3
    config = F11
end

# Channel Up
begin
    prog = mythtv
    button = THUP
    repeat = 3
    config = Up
end

# Channel Down
begin
    prog = mythtv
    button = THDN
    repeat = 3
    config = Down
end

# Navigational arrows
begin
    prog = mythtv
    button = LEFT
    repeat = 3
    config = Left
end

begin
    prog = mythtv
    button = RIGHT
    repeat = 3
    config = Right
end

begin
    prog = mythtv
    button = SELECT
    config = Return
end

# Mute
begin
    prog = mythtv
    button = Mute
    config = F9
end

# Browse mode
#begin
#    prog = mythtv
#    button = DISPLAY
#    config = O
#end

# Channel history
begin
    prog = mythtv
    button = Prev
    config = H
end

# Rewind
begin
    prog = mythtv
    button = REW
    config = Left
end

# Play
begin
    prog = mythtv
    button = PLAY
    config = P
end

# Fast-forward
begin
    prog = mythtv
    button = FFW
    config = Right
end

# Next chapter (page down for EPG)
begin
    prog = mythtv
    button = NEXTCH
    config = PgDown
end

# Previous chapter (page up for EPG)
begin
    prog = mythtv
    button = PREVCH
    config = PgUp
end

# Record
begin
    prog = mythtv
    button = REC
    config = R
end

# Teletext/Closed Captioning
# Audio button doubles as CC
begin
    prog = mythtv
    button = Audio
    config = T
end

# Pause
begin
    prog = mythtv
    button = PAUSE
    config = P
end

# Backwards commercial skip
begin
    prog = mythtv
    button = REPLAY
    config = Q
end

# Forward commercial skip
begin
    prog = mythtv
    button = SKIP
    config = Z
end

#
# mplayer keys (Untested)
#
begin
    prog = mplayer
    button = EXIT
    config = quit
end

begin
    prog = mplayer
    button = MUTE
    config = mute
end

begin
    prog = mplayer
    button = VOL-
    config = volume -1
    repeat = 1
end

begin
    prog = mplayer
    button = VOL+
    config = volume 1
    repeat = 1
end

begin
    prog = mplayer
    button = PLAY
    config = pause
end

begin
    prog = mplayer
    button = PAUSE
    config = pause
end

begin
    prog = mplayer
    button = STOP
    config = quit
end

begin
    prog = mplayer
    button = DISPLAY
    config = osd
end

begin
    prog = mplayer
    button = FFW
    config = skip 1
end

begin
    prog = mplayer
    button = REW
    config = skip -1
end

begin
    prog = mplayer
    button = REPLAY
    config = skip -60
end

begin
    prog = mplayer
    button = SKIP
    config = skip 60
end

##
# xine key bindings.
# Automatically generated by xine-ui version 0.9.23.
# To run xine:
# MythVideo: xine -D -pfh %s
# MythDVD: xine -D -pfhq --auto-scan dvd (for DVD)
#          xine -D -pfhq --auto-scan vcdo (for VCD)
##

# start playback
begin
	button = PLAY
	prog   = xine
	repeat = 3
	config = Play
end

# playback pause toggle
begin
	button = PAUSE
	prog   = xine
	repeat = 3
	config = Pause
end

# stop playback
begin
	button = STOP
	prog   = xine
	repeat = 3
	config = Stop
end

# set position to -10 minutes in current stream
begin
	button = REPLAY
	prog   = xine
	repeat = 3
	config = SeekRelative-600
end

# set position to +10 minutes in current stream
begin
	button = SKIP
	prog   = xine
	repeat = 3
	config = SeekRelative+600
end

# set position to -30 seconds in current stream
begin
	button = REW
	prog   = xine
	repeat = 3
	config = SeekRelative-30
end

# set position to +30 seconds in current stream
begin
	button = FFW
	prog   = xine
	repeat = 3
	config = SeekRelative+30
end

# decrement playback speed
begin
	button = SLOMO
	prog   = xine
	repeat = 3
	config = SpeedSlower
end

# reset playback speed
begin
	button = PLAY
	prog   = xine
	repeat = 3
	config = SpeedReset
end

# increment audio volume
begin
	button = VOL+
	prog   = xine
	repeat = 2
	config = Volume+
end

# decrement audio volume
begin
	button = VOL-
	prog   = xine
	repeat = 2
	config = Volume-
end

# increment amplification level
#begin
#	remote = xxxxx
#	button = xxxxx
#	prog   = xine
#	repeat = 3
#	config = Amp+
#end

# decrement amplification level
#begin
#	remote = xxxxx
#	button = xxxxx
#	prog   = xine
#	repeat = 3
#	config = Amp-
#end

# reset amplification to default value
#begin
#	remote = xxxxx
#	button = xxxxx
#	prog   = xine
#	repeat = 3
#	config = ResetAmp
#end

# audio muting toggle
begin
	button = Mute
	prog   = xine
	repeat = 3
	config = Mute
end

# select next audio channel
begin
	button = Audio
	prog   = xine
	repeat = 3
	config = AudioChannelNext
end

# select next sub picture (subtitle) channel
begin
	button = SUBT
	prog   = xine
	repeat = 3
	config = SpuNext
end

# jump to media Menu
#begin
#	button = MENU
#	prog   = xine
#	repeat = 3
#	config = Menu
#end

# jump to Title Menu
#begin
#	remote = xxxxx
#	button = xxxxx
#	prog   = xine
#	repeat = 3
#	config = TitleMenu
#end

# jump to Root Menu
begin
	button = MENU
	prog   = xine
	repeat = 3
	config = RootMenu
end

# jump to Subpicture Menu
begin
	remote = xxxxx
	button = xxxxx
	prog   = xine
	repeat = 3
	config = SubpictureMenu
end

# jump to Audio Menu
begin
	button = Audio
	prog   = xine
	repeat = 3
	config = AudioMenu
end

# jump to Angle Menu
begin
	button = Angle
	prog   = xine
	repeat = 3
	config = AngleMenu
end

# jump to Part Menu
#begin
#	remote = xxxxx
#	button = xxxxx
#	prog   = xine
#	repeat = 3
#	config = PartMenu
#end

# menu navigate up
begin
	button = CH+
	prog   = xine
	repeat = 3
	config = EventUp
end

# menu navigate down
begin
	button = CH-
	prog   = xine
	repeat = 3
	config = EventDown
end

# menu navigate left
begin
	button = LEFT
	prog   = xine
	repeat = 3
	config = EventLeft
end

# menu navigate right
begin
	button = RIGHT
	prog   = xine
	repeat = 3
	config = EventRight
end

# menu select
begin
	button = SELECT
	prog   = xine
	repeat = 3
	config = EventSelect
end

# jump to next chapter
begin
	button = NEXTCH
	prog   = xine
	repeat = 3
	config = EventNext
end

# jump to previous chapter
begin
	button = PREVCH
	prog   = xine
	repeat = 3
	config = EventPrior
end

# select next angle
begin
	button = ANGLE
	prog   = xine
	repeat = 3
	config = EventAngleNext
end

# display stream information using OSD
begin
	button = INFO
	prog   = xine
	repeat = 3
	config = OSDStreamInfos
end

# enter the number 0
begin
	button = 0
	prog   = xine
	repeat = 3
	config = Number0
end

# enter the number 1
begin
	button = 1
	prog   = xine
	repeat = 3
	config = Number1
end

# enter the number 2
begin
	button = 2
	prog   = xine
	repeat = 3
	config = Number2
end

# enter the number 3
begin
	button = 3
	prog   = xine
	repeat = 3
	config = Number3
end

# enter the number 4
begin
	button = 4
	prog   = xine
	repeat = 3
	config = Number4
end

# enter the number 5
begin
	button = 5
	prog   = xine
	repeat = 3
	config = Number5
end

# enter the number 6
begin
	button = 6
	prog   = xine
	repeat = 3
	config = Number6
end

# enter the number 7
begin
	button = 7
	prog   = xine
	repeat = 3
	config = Number7
end

# enter the number 8
begin
	button = 8
	prog   = xine
	repeat = 3
	config = Number8
end

# enter the number 9
begin
	button = 9
	prog   = xine
	repeat = 3
	config = Number9
end

# quit the program
begin
	button = POWER
	prog   = xine
	repeat = 3
	config = Quit
end

##
# End of xine key bindings.
##

