<keybindings name="default">
    <binding key="UP" cmd="menu up" />
    <binding key="DOWN" cmd="menu down" />
    <binding key="LEFT" cmd="menu left" />
    <binding key="RIGHT" cmd="menu right" />
    <binding key="ENTER" cmd="menu ok" />
    <binding key="ESC" cmd="menu cancel" />
    <binding key="HOME" cmd="menu home" />
    <binding key="END" cmd="menu end" />
    <binding key="PGUP" cmd="menu pageup" />
    <binding key="PGDWN" cmd="menu pagedown" />
    <binding key="JOY_AXIS1_MINUS" cmd="menu up" />
    <binding key="JOY_AXIS1_PLUS" cmd="menu down" />
    <binding key="JOY_AXIS0_MINUS" cmd="menu left" />
    <binding key="JOY_AXIS0_PLUS" cmd="menu right" />
    <binding key="JOY_BTN0" cmd="menu ok" />
    <binding key="JOY_BTN1" cmd="menu cancel" />
</keybindings>
<keybindings name="list" parent="default" />
<keybindings name="filesel" parent="list">
    <binding key="BS" cmd="menu left" />
    <binding key="LEFT" cmd="menu cancel" />
    <binding key="JOY_AXIS0_MINUS" cmd="menu cancel" />
</keybindings>
<keybindings name="cmdlist" parent="list" />
<keybindings name="txt" parent="list" />
<keybindings name="pt" parent="list" />
<keybindings name="pref" parent="list" />

<filesel name="open_file" title="#SELECT_FILE# %p"
         filter="/etc/extensions" 
         file-action="run 'mp_loader \'%p\''
                      menu hide"
         actions="d:run 'mp_loader \'%p\' d'
menu hide,c:run 'mp_loader \'%p\' c'
menu hide,r:run 'mp_loader \'%p\' r'
menu hide,o:run 'mp_loader \'%p\' o'
menu hide,p:run 'mp_loader \'%p\' p'
menu hide,l:run 'mp_loader \'%p\' l'
menu hide,u:run 'mp_loader \'%p\' u'
menu hide,b:run 'mp_loader \'%p\' b'
menu hide,m:menu hide"/>
<filesel name="open_sub" title="#LOAD_SUB_FILE# %p"
         filter="/etc/subs_ext"
         file-action="sub_load '%p'
                      sub_select 1
                      sub_visibility 1
                      menu hide" />
<chapsel name="chap_sel" title="#SELECT_CHAPTER#" auto-close="yes"/>
<dvbsel name="dvb_sel" title="#LIST_CHANNELS#"/>
<pt name="jump_to" title="#PLAYLIST#" auto-close="yes"/>
<txt name="help" file="/etc/mplayer/help.txt"/>
<txt name="info" file="/tmp/info.txt"/>
<console name="console" height="80" vspace="0">#WELCOME_CONSOLE#</console>

<cmdlist name="open" title="#OPEN#" >
      <e name="#OPEN_FILE#" ok="set_menu open_file"/>
      <e name="#LOAD_SUB#" ok="set_menu open_sub"/>
      <e name="#WATCH_TV#" ok="set_menu tv_settings"/>
      <e name="#WATCH_PVR#" ok="loadfile pvr://"/>
      <e name="#WATCH_DVB#" ok="set_menu dvb_sel"/>
      <e name="#LISTEN_RADIO#" ok="set_menu radio_chan"/>
      <e name="#PLAY_DVD#" ok="run 'play_dvd'"/>
      <e name="#PLAY_VCD#" ok="loadfile vcd://"/>
      <e name="#PLAY_CDDA#" ok="loadfile cdda://"/>
</cmdlist>

<cmdlist name="tv_settings" title="#TV_SETTINGS#" >
      <e name="#TV_CHANNELS#" ok="set_menu tv_chan"/>
      <e name="#TV_INPUT_COMPOSITE#" ok="loadfile tv:///COMPOSITE_NUM"/>
      <e name="#TV_INPUT_SVHS#" ok="loadfile tv:///SVIDEO_NUM"/>
</cmdlist>

<cmdlist name="tv_norm" title="#TV_NORM#" >
      <e name="PAL" ok="tv_set_norm PAL"/>
      <e name="SECAM" ok="tv_set_norm SECAM"/>
      <e name="NTSC" ok="tv_set_norm NTSC"/>
</cmdlist>

<pref name="osd_sub_pref" title="#SUBS_PREF#">
      <e property="sub" name="#SUBS#"/>
      <e property="sub_visibility" name="#SUBS_VISIBILITY#"/>
      <e property="sub_forced_only" name="#SUBS_FORCED#"/>
      <e property="sub_pos" name="#SUBS_POSITION#"/>
      <e property="sub_delay" name="#SUBS_DELAY#"/>
      <e property="sub_scale" name="#SUBS_SCALE#"/> 
</pref>

<pref name="audio_pref" title="#AUDIO_PREF#">
      <e property="volume" name="#AUDIO_VOLUME#"/>
      <e property="mute" name="#AUDIO_MUTE#"/>
      <e property="audio_delay" name="#AUDIO_DELAY#"/>
      <e property="switch_audio" name="#AUDIO_STREAMS#"/>
</pref>

<pref name="colors_pref" title="#COLORS_PREF#">
      <e property="gamma" name="#COLORS_GAMMA#"/>
      <e property="brightness" name="#COLORS_BRIGHTNESS#"/>
      <e property="contrast" name="#COLORS_CONTRAST#"/>
      <e property="saturation" name="#COLORS_SATURATION#"/>
      <e property="hue" name="#COLORS_HUE#"/>
</pref>

<pref name="video_pref" title="#VIDEO_PREF#">
      <menu menu="aspect" name="#VIDEO_ASPECT#"/>
      <menu menu="colors_pref" name="#VIDEO_COLORS#"/>
      <e property="panscan" name="#PANSCAN#"/>
      <e property="framedropping" name="#VIDEO_FRAMEDROP#"/>
      <e property="speed" name="#SPEED#"/>
</pref>

<cmdlist name="pref_main" title="#PREFERENCES#" >
    <e name="#PREF_AUDIO#" ok="set_menu audio_pref"/>
    <e name="#PREF_VIDEO#" ok="set_menu video_pref"/>
    <e name="#PREF_SUBS#" ok="set_menu osd_sub_pref"/>
    <e name="#PREF_CHAPTERS#" ok="set_menu chap_sel"/>
    <e name="#PREF_PROPERTIES#" ok="set_menu properties"/>
</cmdlist>

<cmdlist name="controls" title="#CTRLS#" >
      <e name="#CTRLS_PAUSE#" ok="pause"/>
      <e name="#CTRLS_STOP#" ok="quit"/>
      <e name="#CTRLS_EJECT#" ok="run /usr/bin/eject -s"/>
      <e name="#CTRLS_PREV#" ok="pt_step -1"/>
      <e name="#CTRLS_NEXT#" ok="pt_step 1"/>
      <e name="#CTRLS_PLAYLIST#" ok="set_menu jump_to"/>
</cmdlist>

<cmdlist name="aspect" title="#ASPECT#" >
      <e name="#ASPECT_ORIGINAL#" ok="switch_ratio -1"/>
      <e name="#ASPECT_4_3#" ok="switch_ratio 1.33333"/>
      <e name="#ASPECT_16_9#" ok="switch_ratio 1.77778"/>
      <e name="#ASPECT_CINEMASCOPE#" ok="switch_ratio 2.35"/>
      <e name="#ASPECT_16_10#" ok="switch_ratio 1.6"/>
      <e name="#ASPECT_5_4#" ok="switch_ratio 1.25"/>
      <e name="#ASPECT_1_1#" ok="switch_ratio 1.0"/>
      <e name="#ASPECT_221_100#" ok="switch_ratio 2.21"/>
      <e name="#ASPECT_37_20#" ok="switch_ratio 1.85"/>
</cmdlist>

<cmdlist name="view_img_timeout" title="#IMG_SHOW_TIMEOUT#" >
      <e name="#IMG_SHOW_DISABLE#" ok="run 'echo 0 > /var/view_img_timeout'"/>
      <e name="#IMG_1S#" ok="run 'echo 1 > /var/view_img_timeout'"/>
      <e name="#IMG_3S#" ok="run 'echo 3 > /var/view_img_timeout'"/>
      <e name="#IMG_5S#" ok="run 'echo 5 > /var/view_img_timeout'"/>
      <e name="#IMG_10S#" ok="run 'echo 10 > /var/view_img_timeout'"/>
      <e name="#IMG_15S#" ok="run 'echo 15 > /var/view_img_timeout'"/>
      <e name="#IMG_30S#" ok="run 'echo 30 > /var/view_img_timeout'"/>
      <e name="#IMG_60S#" ok="run 'echo 60 > /var/view_img_timeout'"/>
      <e name="#IMG_5M#" ok="run 'echo 300 > /var/view_img_timeout'"/>
      <e name="#IMG_15M#" ok="run 'echo 900 > /var/view_img_timeout'"/>
</cmdlist>

<cmdlist name="view_sleeptimer" title="#SLEEP_TIMER#" >
      <e name="#SLEEP_TIMER_OFF#" ok="run '/usr/bin/set_sleeptimer 0'"/>
      <e name="#SLEEP_TIMER_15M#" ok="run '/usr/bin/set_sleeptimer 900'"/>
      <e name="#SLEEP_TIMER_30M#" ok="run '/usr/bin/set_sleeptimer 1800'"/>
      <e name="#SLEEP_TIMER_45M#" ok="run '/usr/bin/set_sleeptimer 2700'"/>
      <e name="#SLEEP_TIMER_60M#" ok="run '/usr/bin/set_sleeptimer 3600'"/>
      <e name="#SLEEP_TIMER_75M#" ok="run '/usr/bin/set_sleeptimer 4500'"/>
      <e name="#SLEEP_TIMER_90M#" ok="run '/usr/bin/set_sleeptimer 5400'"/>
      <e name="#SLEEP_TIMER_120M#" ok="run '/usr/bin/set_sleeptimer 7200'"/>
</cmdlist>

<cmdlist name="filter" title="#FILES_FILTER#" >
      <e name="#FILES_FILTER_ALL#" ok="file_filter 0"/>
      <e name="#FILES_FILTER_MEDIA#" ok="file_filter 1"/>
</cmdlist>

<pref name="properties" title="#STREAM_PROPERTIES#">
      <e txt="${filename}" name="#STREAM_NAME#" auto-update="yes"/>
      <e txt="${demuxer}" name="#DEMUXER_NAME#" auto-update="yes"/>
      <e txt="${video_format}" name="#STREAM_VCODEC#" auto-update="yes"/>
      <e txt="${video_bitrate}" name="#STREAM_VBITRATE#" auto-update="yes"/>
      <e txt="${width} x ${height}" name="#STREAM_RESOLUTION#" auto-update="yes"/>
      <e txt="${audio_codec}" name="#STREAM_ACODEC#" auto-update="yes"/>
      <e txt="${audio_bitrate}" name="#STREAM_ABITRATE#" auto-update="yes"/>
      <e txt="${samplerate}" name="#STREAM_ASAMPLES#" auto-update="yes"/>
      <e txt="${metadata/Title}" name="#STREAM_TITLE#" auto-update="yes"/>
      <e txt="${metadata/Artist}" name="#STREAM_ARTIST#" auto-update="yes"/>
      <e txt="${metadata/Album}" name="#STREAM_ALBUM#" auto-update="yes"/>
      <e txt="${metadata/Year}" name="#STREAM_YEAR#" auto-update="yes"/>
      <e txt="${metadata/Comment}" name="#STREAM_COMMENT#" auto-update="yes"/>
      <e txt="${metadata/Track}" name="#STREAM_TRACK#" auto-update="yes"/>
      <e txt="${metadata/Genre}" name="#STREAM_GENRE#" auto-update="yes"/>
</pref>

<cmdlist name="dvd_settings" title="#DVD_PLAYBACK#" >
      <e name="#DVD_PLAYBACK_DIRECT#" ok="run 'rm /var/dvdnav'"/>
      <e name="#DVD_PLAYBACK_DVDNAV#" ok="run 'echo 1 > /var/dvdnav'"/>
</cmdlist>

<cmdlist name="visuals_settings" title="#VISUALS#" >
      <e name="#VISUALS_ENABLE#" ok="run 'mp_set_option visuals yes'
                                   menu hide
                                   quit"/>
      <e name="#VISUALS_DISABLE#" ok="run 'mp_set_option visuals no'
                                   menu hide
                                   quit"/>
</cmdlist>

<cmdlist name="ao_switch" title="#AO_SWITCH#" >
      <e name="#AO_SWITCH_DEFAULT#" ok="run 'switch_ao'"/>
      <e name="#AO_SWITCH_BLUETOOTH_STEREO#" ok="run 'switch_ao alsa:noblock:device=bluetooth'"/>
      <e name="#AO_SWITCH_BLUETOOTH_MONO#" ok="run 'switch_ao alsa:noblock:device=headset'"/>
</cmdlist>

<cmdlist name="cdvdimg_settings" title="#CDVDIMG_SETTINGS#" >
      <e name="#CDVDIMG_MOUNT#" ok="run 'echo 1 > /var/mountimg'"/>
      <e name="#CDVDIMG_NOMOUNT#" ok="run 'run 'rm -f /var/mountimg'"/>
</cmdlist>

<cmdlist name="obex_settings" title="#OBEX_OPTIONS#" >
      <e name="#OBEX_START_SERVER#" ok="run 'start_obex_server'"/>
      <e name="#OBEX_STOP_SERVER#" ok="run 'killall sobexsrv'"/>
      <e name="#OBEX_MOUNT_PHONE#" ok="run 'mount_mobile'"/>
      <e name="#OBEX_UNMOUNT_PHONE#" ok="run 'killall obexfs'"/>
</cmdlist>

<cmdlist name="frontsd" title="#FRONTSD#" >
      <e name="#UMOUNT_FSD#" ok="run umount_fsd"/>
      <e name="#MOUNT_FSD#" ok="run mount_fsd"/>
</cmdlist>

<cmdlist name="vsync" title="#VSYNC#" >
      <e name="#VSYNC_ENABLE#" ok="run 'mp_set_option vsync yes'
                                   menu hide
                                   quit"/>
      <e name="#VSYNC_DISABLE#" ok="run 'mp_set_option vsync no'
                                    menu hide
                                    quit"/>
</cmdlist>

<cmdlist name="lowersub" title="#LOWERSUB#" >
      <e name="#LOWERSUB_ENABLE#" ok="run 'lowersub enable'"/>
      <e name="#LOWERSUB_DISABLE#" ok="run 'lowersub disable'"/>
</cmdlist>

<cmdlist name="options" title="#OPTIONS#" >
      <e name="#OPTIONS_FRONTSD#" ok="set_menu frontsd"/>
      <e name="#OPTIONS_AO_SWITCH#" ok="set_menu ao_switch"/>
      <e name="#OPTIONS_VISUALS#" ok="set_menu visuals_settings"/>
      <e name="#OPTIONS_TV_NORM#" ok="set_menu tv_norm"/>
      <e name="#OPTIONS_TV_SWITCH#" ok="run /usr/bin/tvswitch"/>
      <e name="#OPTIONS_VSYNC#" ok="set_menu vsync"/>
      <e name="#OPTIONS_LOWERSUB#" ok="set_menu lowersub"/>
      <e name="#OPTIONS_IMG_SHOW#" ok="set_menu view_img_timeout"/>
      <e name="#OPTIONS_SLEEP_TIMER#" ok="set_menu view_sleeptimer"/>
      <e name="#OPTIONS_RESET_PATH#" ok="run 'echo /mnt/ > /tmp/mp_current_path'"/>
      <e name="#OPTIONS_AUTOPLAY#" ok="set_menu autoplay_mode"/>
      <e name="#OPTIONS_FILE_FILTER#" ok="set_menu filter"/>
      <e name="#OPTIONS_INFOS#" ok="run 'gen_menu_info'"/>
      <e name="#OPTIONS_CDVDIMG_SETTINGS#" ok="set_menu cdvdimg_settings"/>
      <e name="#OPTIONS_DVD_SETTINGS#" ok="set_menu dvd_settings"/>
      <e name="#OPTIONS_OBEX_OPTIONS#" ok="set_menu obex_settings"/>
</cmdlist>

<cmdlist name="main" title="#MENU_GEEXBOX#" >
      <e name="#MENU_OPEN#" ok="set_menu open"/>
      <e name="#MENU_CONTROLS#" ok="set_menu controls"/>
      <e name="#MENU_PREFERENCES#" ok="set_menu pref_main"/>
      <e name="#MENU_OPTIONS#" ok="set_menu options"/>
      <e name="#MENU_HELP#" ok="set_menu help"/>
      <e name="#MENU_REBOOT#" ok="run /etc/init.d/reboot"/>
      <e name="#MENU_QUIT#" ok="quit 166"/>
</cmdlist>

<cmdlist name="autoplay_mode" title="#AUTOPLAY#" >
      <e name="#AUTOPLAY_ENABLE#" ok="run 'echo 1 > /var/autoplay'"/>
      <e name="#AUTOPLAY_DISABLE#" ok="run 'rm /var/autoplay'"/>
</cmdlist>

<cmdlist name="digimatrix_radio" title="#DIGI_RADIO#" >
      <e name="#DIGI_RADIO_OFF#" ok="run 'digiradio -r off'"/>
      <e name="#DIGI_RADIO_FM#" ok="run 'digiradio -r fm'"/>
      <e name="#DIGI_RADIO_AM#" ok="run 'digiradio -r am'"/>
      <e name="#DIGI_RADIO_CHANNELS#" ok="run 'digiradio -c ch+'" cancel="run 'digiradio -c ch-'"/>
      <e name="#DIGI_RADIO_CONFIG#" ok="set_menu digimatrix_manual"/>
</cmdlist>

<cmdlist name="digimatrix_manual" title="#DIGI_TUNING#" >
      <e name="#DIGI_TUNING_SEEK_PLUS#" ok="run 'digiradio -c seek+'"/>
      <e name="#DIGI_TUNING_SEEK_MINUS#" ok="run 'digiradio -c seek-'"/>
      <e name="#DIGI_TUNING_FINE_PLUS#" ok="run 'digiradio -c fine+'"/>
      <e name="#DIGI_TUNING_FINE_MINUS#" ok="run 'digiradio -c fine-'"/>
      <e name="#DIGI_SAVE_CHANNEL#" ok="set_menu digimatrix_channels"/>
</cmdlist>

<cmdlist name="digimatrix_channels" title="#DIGI_CHANNELS#" >
      <e name="#DIGI_CHANNELS_STORE#" ok="run 'digiradio -c prog'"/>
      <e name="#DIGI_CHANNELS_SELECT#" ok="run 'digiradio -c ch+'" cancel="run 'digiradio -c ch-'"/>
      <e name="#DIGI_CHANNELS_CONFIRM#" ok="run 'digiradio -c store'"/>
      <e name="#DIGI_CHANNELS_CANCEL#" ok="run 'digiradio -c cancel'"/>
</cmdlist>
