# StreamZap Remote
# 'config' must either be a literal key, e.g. 'config = l' or must
# refer to a defined key in MythTV, e.g. 'config = PLAY'a


#restart frontend
begin
        remote = RS_LD
        button = RESET
        prog   = irexec
        repeat = 0
        config = /usr/bin/restartfrontend.sh
end

#time
begin
        remote = RS_LD
        button = TIME
        prog   = irexec
        repeat = 10
        config = /usr/bin/saytime.sh
end

#screen blank
begin
        remote = RS_LD
        button = BLANK
        prog   = irexec
        repeat = 0
#      config  = ls
        config = xset s activate ; xset s blank
end


#picture
begin
REMOTE = RS_LD
prog = mythtv
button = PICTURE
repeat = 5
config = f
end

#change aspect
begin
remote = RS_LD
prog = mythtv
button = ASPECT
# change aspect ratio
config = w
repeat = 5
end

#Browse
begin
remote = RS_LD
prog = mythtv
button = BROWSE
repeat = 8
config = o
end

# delete key
begin
remote = RS_LD
prog = mythtv
button = DELETE
repeat = 8
config = d
end


#change card
begin
remote = RS_LD
prog = mythtv
button = CARD
repeat = 8
config = y
end

# Change TV card input
begin
remote = RS_LD
prog = mythtv
button = CARD_SOURCE
repeat = 4
config = C
end



# Cycle through channel history
begin
remote = Streamzap_PC_Remote
prog = mythtv
button = BLUE
repeat = 4
config = H
end

# Bring up OSD info
begin
remote =  Streamzap_PC_Remote
prog = mythtv
button = YELLOW
repeat = 4
config = i
end




begin
prog = mythtv
button = 0
config = 0
repeat = 5
end

begin
prog = mythtv
button = 1
config = 1
repeat = 5
end

begin
prog = mythtv
button = 2
config = 2
repeat = 5
end

begin
prog = mythtv
button = 3
config = 3
repeat = 5
end

begin
prog = mythtv
button = 4
config = 4
repeat = 5
end

begin
prog = mythtv
button = 5
config = 5
repeat = 5
end

begin
prog = mythtv
button = 6
config = 6
repeat = 5
end

begin
prog = mythtv
button = 7
config = 7
repeat = 5
end

begin
prog = mythtv
button = 8
config = 8
repeat = 5
end

begin
prog = mythtv
button = 9
config = 9
repeat = 5
end


begin
prog = mythtv
button = POWER
config = Esc
end

# ???
begin
prog = mythtv
button = MUTE
config = F9
end

begin
prog = mythtv
button = CH_UP
repeat = 3
config = PgUp
end

begin
prog = mythtv
button = VOL_UP
repeat = 3
config = ]
end

begin
prog = mythtv
button = CH_DOWN
repeat = 3
config = PgDown
end

begin
prog = mythtv
button = VOL_DOWN
repeat = 3
config = [
end

begin
prog = mythtv
button = UP
repeat = 3
config = Up
end

begin
prog = mythtv
button = LEFT
# navigates, or skips back during playback or live tv.
config = Left
repeat = 5
end

begin
prog = mythtv
button = OK
config = Return
repeat = 5
end

begin
prog = mythtv
button = RIGHT
# navigates, or skips forwards during playback or live tv.
config = Right
end

begin
prog = mythtv
button = DOWN
repeat = 3
config = Down
end

begin
prog = mythtv
button = MENU
config = m
repeat = 5
end

begin
prog = mythtv
button = EXIT
config = Esc
repeat = 5
end

begin
prog = mythtv
button = PLAY
config = Space
repeat = 5
end

begin
prog = mythtv
button = PAUSE
config = p
repeat = 5
end

begin
prog = mythtv
button = STOP
config = Esc
repeat = 5
end

begin
prog = mythtv
# skip backward
button = |<<
config = PgUp
repeat = 5
end

begin
prog = mythtv
# skip forward
button = >>|
config = PgDown
repeat = 5
end

begin
prog = mythtv
button = RECORD
config = r
repeat = 5
end

begin
prog = mythtv
# rewind
button = <<
config = Home
repeat = 5
end

begin
prog = mythtv
# fast forward
button = >>
config = End
repeat = 5
end

begin
prog = mythtv
button = RED
# Delete
config = d
end

begin
prog = mythtv
button = GREEN
# Info
config = S
repeat = 5
end

#begin
#prog = mythtv
#button = YELLOW
# change aspect ratio
#config = w
#end

begin
prog = mythtv
button = BLUE
config = Tab
end

# MPLAYER
begin
prog = mplayer
button = POWER
config = quit
end

begin
prog = mplayer
button = MUTE
config = mute
end

begin
prog = mplayer
button = VOL_UP
repeat = 3
config = volume +1
end

begin
prog = mplayer
button = VOL_DOWN
repeat = 3
config = volume -1
end

begin
prog = mplayer
button = UP
repeat = 3
config = seek +10
end

begin
prog = mplayer
button = LEFT
# navigates, or skips back during playback or live tv.
config = seek -60
end

begin
prog = mplayer
button = RIGHT
# navigates, or skips forwards during playback or live tv.
config = seek +60
end

begin
prog = mplayer
button = DOWN
repeat = 3
config = seek -10
end

begin
prog = mplayer
button = EXIT
config = quit
end

begin
prog = mplayer
button = play
config = speed_set 1.0
end

begin
    prog = mplayer
    button = pause
    config = pause
end

begin
prog = mplayer
button = STOP
config = quit
end

begin
prog = mplayer
# skip backward
button = |<<
config = seek -600
end

begin
prog = mplayer
# skip forward
button = >>|
config = seek +600
end

begin
prog = mplayer
# slow forward
button = <<
config = speed_mult 0.5
end

begin
prog = mplayer
# fast forward
button = >>
config = speed_mult 2.0
end

### xine  commands

begin
prog = xine
button = YELLOW
repeat = 4
#config = ToggleVisiblity
config = OSDStreamInfos
end

begin
prog = xine
button = MENU
repeat = 4
config = SeekRelative+60
end

# increase brightness by 10
begin
        button = DELETE
        prog   = xine
        repeat = 4
        config = BrightnessControl+
end

# decrease brightness by 10
begin
        button = PICTURE
        prog   = xine
        repeat = 4
        config = BrightnessControl-
end


begin
prog = xine
button = PAUSE
repeat = 4
config = Pause
end

begin
prog = xine
button = PLAY
repeat = 4
config = Play
end

begin
prog = xine
button = STOP
repeat = 4
config = quit
end

begin
prog = xine
button = MUTE
repeat = 4
config = mute
end

begin
prog = xine
button = <<
repeat = 4
config = SeekRelative-30
end

begin
prog = xine
button =  >>
repeat = 4
#config = SeekRelative+30
config =  SpeedFaster
end

begin
prog = xine
button = POWER
repeat = 4
config = quit
end

begin
prog = xine
button = EXIT
repeat = 4
config = quit
end


begin
prog = xine
button = FREEZE
repeat = 4
config =  SeekRelative+1200
end

begin
prog = xine
button = MOVE
repeat = 4
config =  SeekRelative-1200
end

begin
prog   = xine
button = 3
config = SpuNext
repeat = 0
end

# Select previous sub picture (subtitle) channel.
begin
button = 1
prog   = xine
repeat = 0
config = SpuPrior
end

# Select next audio channel.
begin
button = 9
prog   = xine
repeat = 0
config = AudioChannelNext
end

# Select previous audio channel.
begin
button = 7
prog   = xine
repeat = 0
config = AudioChannelPrior
end



# Up event.
begin

button = UP
prog   = xine
repeat = 8
config = EventUp
end

# Down event.
begin

button = DOWN
prog   = xine
repeat = 8
config = EventDown
end

# Left event.
begin

button = LEFT
prog   = xine
repeat = 8
config = EventLeft
end

# Right event.
begin

button = RIGHT
prog   = xine
repeat = 8
config = EventRight
end

# Select event.
begin
prog   = xine
button = ok
repeat = 8
config = EventSelect
end

# Down Chapter
begin

button = CH_DOWN
prog   = xine
repeat = 8
config = EventPrior
end

# Next Chapter.
begin

button = CH_UP
prog   = xine
repeat = 8
config = EventNext
end

# menu.
begin

button = record
prog   = xine
repeat = 8
config = RootMenu
end

# Toggle aspect ratio
begin
prog   = xine
button = ASPECT
repeat = 0
config = ToggleAspectRatio
end



#######xmms
begin xmms
  begin
    prog = xmms
    button = PLAY
    config = PLAY
  end
  begin
    prog = xmms
    button = clear
    config = PLAYLIST_CLEAR
  end
  begin
    prog = xmms
    button = load
    config = PLAYLIST_ADD .xmms/xmms.m3u
   end
  begin
    prog = xmms
    button = PAUSE
    config = PAUSE
  end
  begin
    prog = xmms
    button = STOP
    config = STOP
  end
  begin
    prog = xmms
    button = EXIT
    config = QUIT
    flags = mode
  end

  begin
    prog = xmms
    button = POWER
    config = QUIT
    flags = mode
  end

  begin
    prog = xmms
    button = CH_UP
    config = NEXT
  end
  begin
    prog = xmms
    button = CH_DOWN
    config = PREV
  end
  


begin
    prog = xmms
    button = >>|
    config = NEXT
  end
begin
    prog = xmms
    button = |<<
    config = PREV
end


begin
    prog = xmms
    button = <<
    config = FWD 10
    repeat = 2
  end
  begin
    prog = xmms
    button = <<
    config = BWD 10
    repeat = 2
  end
  begin
    prog = xmms
    button = volup
    config = VOL_UP 10
    repeat = 2
  end
  begin
    prog = xmms
    button = voldown
    config = VOL_DOWN 10
    repeat = 2
  end
  begin
    prog = xmms
    button = 1
    config = ONE
  end
  begin
    prog = xmms
    button = 2
    config = TWO
  end
  begin
    prog = xmms
    button = 3
    config = THREE
  end
  begin
    prog = xmms
    button = 4
    config = FOUR
  end
  begin
    prog = xmms
    button = 5
    config = FIVE
  end
  begin
    prog = xmms
    button = 6
    config = SIX
  end
  begin
    prog = xmms
    button = 7
    config = SEVEN
  end
  begin
    prog = xmms
    button = 8
    config = EIGHT
  end
  begin
    prog = xmms
    button = 9
    config = NINE
  end
  begin
    prog = xmms
    button = 0
    config = ZERO
  end
  begin
    prog = xmms
    button = enter
    config = SETPOS
  end
end xmms

#



















