# mplayer/irpty remote buttons in (left to right and top to bottom) order
# fbi buttons are near the bottom

# shut computer down
begin
   prog = mplayer
   button = CLOSE
   config = quit 166
end
# help file (language > help_en.txt)
begin
   prog = mplayer
   button = HELP
   config = set_menu help
end
# reboot computer
begin
   prog = mplayer
   button = POWER
   config = quit 168
end
#toggle through standard aspect ratios
begin
   prog = mplayer
   button = TV
   config = switch_ratio 1.33333
   config = switch_ratio 1.77778
   config = switch_ratio 2.35
  end
# Alternatives for TV button
#   config = run /usr/bin/tvswitch
#   config = set_menu tv_settings
#   config = set_menu tv_chan
# cycle through available subtitles
begin
   prog = mplayer
   button = GDE
   config = sub_select
end
# cycle through available audio tracks (lang, commentary, etc.)
begin
   prog = mplayer
   button = CD
   config = switch_audio
end
# fbi only, play selected directory and any subdirectories (recursive)
begin
   prog = irpty
   button = MSG
   config = l
end
# Play selected directory (fbi) and any subdirectories (recursive in mplayer)
begin
   prog = irpty
   button = PHONE
   config = p
end
# menu navigation back/forward (l/r)
begin
   prog = mplayer
   button = BUTTONL_DOWN
   config = menu cancel
end
begin
   prog = mplayer
   button = BUTTONR_DOWN
   config = menu ok
end
# menu show/hide
begin
   prog = mplayer
   button = ENTER
   config = menu toggle
end
# menu navigation up/down
begin
   prog = mplayer
   button = CH+
   repeat = 1
   config = menu up
end
begin
   prog = mplayer
   button = CH-
   repeat = 1
   config = menu down
end
# mute
begin
   prog = mplayer
   button = MUTE
   config = mute
end
# volume up/down
begin
   prog = mplayer
   button = VOL+
   repeat = 1
   config = volume 1
end
begin
   prog = mplayer
   button = VOL-
   repeat = 1
   config = volume -1
end
# play previous file
begin
   prog = mplayer
   button = SEEK-
   config = pt_step -1
end
# (re)set playback to 1x
begin
   prog = mplayer
   button = PLAY
   config = speed_set 1.0
end
# play next file
begin
   prog = mplayer
   button = SEEK+
   config = pt_step 1
end
# Select a file to jump to
begin
   prog = mplayer
   button = EJECT
   config = set_menu jump_to
end
# alternatives for 'eject' button
# config = set_menu open_file
# config = run /usr/bin/eject
# stop playback
begin
   prog = mplayer
   button = STOP
   config = quit
end
# pause playback
begin
   prog = mplayer
   button = PAUSE
   config = pause
end

## moving within a file (1 > 6 buttons) ##
# rewind 10 sec. x n
begin
   prog = mplayer
   button = 1
   repeat = 1
   config = seek -10
end
# fast forward 2/4/6...x  (use play or fast rewind to return to 1x)
begin
   prog = mplayer
   button = 2
   config = speed_mult 2.0
end
# forward 10 sec. x n
begin
   prog = mplayer
   button = 3
   repeat = 1
   config = seek 10
end
# rewind 2 min. x n
begin
   prog = mplayer
   button = 4
   repeat = 1
   config = seek -120
end
# fast rewind (current speed / 2, i.e. decrease playback speed by multiples of .5)
begin
   prog = mplayer
   button = 5
   config = speed_mult 0.5
end
# was config = set_menu jump_to
# forward 2 min. x n
begin
   prog = mplayer
   button = 6
   repeat = 1
   config = seek +120
end

## Visual tweaking, buttons 7 > # ##
# audio delay up/down
begin
   prog = mplayer
   button = 7
   config = audio_delay 0.100
end
begin
   prog = mplayer
   button = STAR
   config = audio_delay -0.100
end
# contrast up/down x5
begin
   prog = mplayer
   button = 8
   config = contrast 5
end
begin
   prog = mplayer
   button = 0
   config = contrast -5
end
# brightness up/down x5
begin
   prog = mplayer
   button = 9
   repeat = 1
   config = brightness 5
end
begin
   prog = mplayer
   button = HASH
   repeat = 1
   config = brightness -5
end
 
### IMAGE VIEWER ###
# quit fbi, same as quit geexbox (dupe, permanent home undecided)
begin
   prog = fbi
   button = CLOSE
   config = q
end
# next/previous image (dupe, logic: = to menu navugation, note: repeat doesn't work with these 2 buttons)
begin
   prog = fbi
   button = BUTTONL_DOWN
   repeat = 1
   config = b
end
begin
   prog = fbi
   button = BUTTONR_DOWN
   repeat = 1
   config = n
end
# exit image viewer (i.e. show Geexbox menu, dupe)
begin
   prog = fbi
   button = ENTER
   config = q
end
# All primary fbi controls now fit below blue buttons and above number buttons
# zoom in/out
begin
   prog = fbi
   button = CH+
   repeat = 1
   config = +
end
begin
   prog = fbi
   button = CH-
   repeat = 1
   config = -
end
# trying zoom + was q - exit image viewer
begin
   prog = fbi
   button = MUTE
   config = +
end
# next/previous image
begin
   prog = fbi
   button = VOL+
   repeat = 1
   config = b
end
begin
   prog = fbi
   button = VOL-
   repeat = 1
   config = n
end
# scroll zoomed image |< (left), > (up, down is stop button), >| (right)
#   config = \x1b[D
begin
   prog = fbi
   button = SEEK-
   repeat = 1
   config = <
end
#   config = \x1b[A
begin
   prog = fbi
   button = PLAY
   repeat = 1
   config = u
end
#   config = \x1b[C
begin
   prog = fbi
   button = SEEK+
   repeat = 1
   config = >
end
# was toggle full screen. Since FS is now default, something more useful could be here
# trying zoom here also
begin
   prog = fbi
   button = EJECT
   config = +
end
# scroll zoomed image down
#   config = \x1b[B
begin
   prog = fbi
   button = STOP
   repeat = 1
   config = d
end
# pause/play slideshow
begin
   prog = fbi
   button = PAUSE
   config = p
end
# number keys
# image info (EXIF, if any)
begin
   prog = fbi
   button = 1
   config = i
end
# statusline (path, zoom %, resolution)
begin
   prog = fbi
   button = 2
   config = v
end
# keyboard help
begin
   prog = fbi
   button = 3
   config = h
end
