mplayer: add command modes and option classes
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 13 Oct 2009 23:28:56 +0000 (23:28 +0000)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 13 Oct 2009 23:30:53 +0000 (23:30 +0000)
mplayer.inc.pl
mplayer.plp

index 66bd78d9e66d7206912898129142b100095481ef..9b1cf2748cfd6285e940fea68afc48b36be12c2a 100644 (file)
@@ -3,46 +3,54 @@ use utf8;
 '' => {
        desc => "interactive control",
 
 '' => {
        desc => "interactive control",
 
-       'p' => ["pause", 'co'],
-       '.' => ["step forward", 'co'],
-       'q' => ["stop and quit"],
-       '+' => ["audio delay +$sign{_}.1s"],
-       '-' => ["audio delay -$sign{_}.1s"],
-       '/' => ["volume decrease"],
-       '*' => ["volume increase"],
+       '[' => ["slow down 10%", 'mi'],
+       ']' => ["speed up 10%", 'mi'],
+       '{' => ["half speed", 'mi'],
+       '}' => ["double speed", 'mi'],
+       '<' => ["previous file", 'mo'],
+       '>' => ["next file", 'mo'],
+       'p' => ["pause", 'mi'],
+       '.' => ["step forward", 'mi'],
+       'q' => ["stop and quit", 'mo'],
+       '+' => ["audio delay +$sign{_}.1s", 'co'],
+       '-' => ["audio delay -$sign{_}.1s", 'co'],
+       '/' => ["volume decrease", 'co'],
+       '*' => ["volume increase", 'co'],
        '9' => '/',
        '0' => '*',
        '9' => '/',
        '0' => '*',
-       'm' => ["mute sound"],
-       '#' => ["cycle audio tr$sign{_}ack$sign{_}s"],
-       'f' => ["full$sign{_}screen"],
-       'T' => ["stay on top"],
-       'w' => ["pan/sc. decr$sign{_}eas$sign{_}e"],
-       'e' => ["pan/scan increase"],
-       'o' => ["osd state switch"],
-       'd' => ["frame drop mode"],
-       'v' => ["subtitle visibility"],
-       'b' => ["next sub$sign{_}title"],
-       'j' => ["prev$sign{_}ious sub$sign{_}title"],
-       'y' => ["forward in subtitle list"], #TODO
+       'm' => ["mute sound", 'co'],
+       '#' => ["cycle audio tr$sign{_}ack$sign{_}s", 'co'],
+       'f' => ["full$sign{_}screen", 'po'],
+       'T' => ["stay on top", 'po'],
+       'w' => ["pan/sc. decr$sign{_}eas$sign{_}e", 'po'],
+       'e' => ["pan/scan increase", 'po'],
+       'o' => ["osd state switch", 'ci'],
+       'd' => ["frame drop mode", 'po'],
+       'v' => ["subtitle visibility", 'pm'],
+       'b' => ["next sub$sign{_}title", 'pm'],
+       'j' => ["prev$sign{_}ious sub$sign{_}title", 'pm'],
+       'y' => ["forward in subtitle list", 'pm'], #TODO
        'g' => 'y', #TODO
        'g' => 'y', #TODO
-       'F' => ["forced subtitles"],
-       'a' => ["align subtitles"],
-       'x' => ["subtitle delay +$sign{_}.1s"],
-       'z' => ["subtitle delay -$sign{_}.1s"],
-       'r' => ["subtitles up"],
-       't' => ["subtitles down"],
-       's' => ["screen$sign{_}shot", 'opt', "-vf screenshot"],
-       'S' => ["record screen$sign{_}shot$sign{_}s", 'opt', "-vf screenshot"],
-       'I' => ["filename"],
-       '!' => ["chapter back"],
-       '@' => ["chapter forward"],
-       '1' => ["contrast less", 'opt'],
-       '2' => ["contrast more", 'opt'],
-       '3' => ["brighter", 'opt'],
-       '4' => ["darker", 'opt'],
-       '5' => ["hue to red", 'opt'],
-       '6' => ["hue to blue", 'opt'],
-       '7' => ["saturate", 'opt'],
-       '8' => ["de$sign{_}saturate", 'opt'],
+       'F' => ["forced subtitles", 'pm'],
+       'a' => ["align subtitles", 'pm'],
+       'c' => ["cycle fs mode", 'po ext'],
+       'n' => ["restore video mode", 'po ext'],
+       'x' => ["subtitle delay +$sign{_}.1s", 'pm'],
+       'z' => ["subtitle delay -$sign{_}.1s", 'pm'],
+       'r' => ["subtitles up", 'pm'],
+       't' => ["subtitles down", 'pm'],
+       's' => ["screen$sign{_}shot", 'mo ext', "-vf screenshot"],
+       'S' => ["record screen$sign{_}shot$sign{_}s", 'mo ext', "-vf screenshot"],
+       'I' => ["filename", 'ci'],
+       '!' => ["chapter back", 'mi'],
+       '@' => ["chapter forward", 'mi'],
+       '1' => ["contrast less", 'po ext'],
+       '2' => ["contrast more", 'po ext'],
+       '3' => ["brighter", 'po ext'],
+       '4' => ["darker", 'po ext'],
+       '5' => ["hue to red", 'po ext'],
+       '6' => ["hue to blue", 'po ext'],
+       '7' => ["saturate", 'po ext'],
+       '8' => ["de$sign{_}saturate", 'po ext'],
 },
 
 },
 
index 73e79fb0b307b589c0f2eb1c61f3bd262f0221ea..9aab0ea4470bdfe6de1ed38dd20bd3496cd034c8 100644 (file)
@@ -44,7 +44,7 @@ $header{content_type} = "text/html; charset=$sign{charset}";
 
 <li class="row">
        <ul class="keys omni">
 
 <li class="row">
        <ul class="keys omni">
-       <li class="me chr27" onclick="setmode()"><b>Esc</b> +
+       <li class="mo chr27" onclick="setmode()"><b>Esc</b> q
                <!-- not as static anymore, but never bothered; just see ^[ -->
        </ul>
 </li>
                <!-- not as static anymore, but never bothered; just see ^[ -->
        </ul>
 </li>
@@ -53,7 +53,7 @@ $header{content_type} = "text/html; charset=$sign{charset}";
 use Shiar_Sheet::Keyboard;
 my $keys = Shiar_Sheet::Keyboard->new({do 'mplayer.inc.pl'});
 $keys->map($get{map}) or undef $get{map};
 use Shiar_Sheet::Keyboard;
 my $keys = Shiar_Sheet::Keyboard->new({do 'mplayer.inc.pl'});
 $keys->map($get{map}) or undef $get{map};
-$keys->print_rows($get{rows});
+$keys->print_rows($get{rows}, [1,0]);
 :>
 </ul>
 
 :>
 </ul>
 
@@ -62,22 +62,18 @@ $keys->print_rows($get{rows});
 <div class="help">
        <div class="left">
                <dl class="legend legend-types">
 <div class="help">
        <div class="left">
                <dl class="legend legend-types">
-               <dt class="ci">aside
-                       <dd>Temporarily display something without changing state.
-               <dt class="pm">select
-                       <dd>Scroll list and/or select a different line.
-               <dt class="po">search
-                       <dd>Go to a specific message entry.
-               <dt class="co">edit
-                       <dd>Modify message flags or contents.
-               <dt class="mi">command
-                       <dd>Any other action which does not alter an existing message.
-               <dt class="mo">send
-                       <dd>Prepare and/or send a (new) message.
-               <dt class="mv">leave
-                       <dd>Exit the opened folder.
-               <dt class="me">display
-                       <dd>Permanently alter/toggle current view.
+               <dt class="ci">osd
+                       <dd>Print information or change display.
+               <dt class="pm">subtitles
+                       <dd>Control subtitle selection or settings.
+               <dt class="po">video
+                       <dd>Video adjustment.
+               <dt class="co">audio
+                       <dd>Sound (track) configuration.
+               <dt class="mi">playback
+                       <dd>Playback control.
+               <dt class="mo">general
+                       <dd>Other MPlayer features.
                </dl>
        </div>
 
                </dl>
        </div>
 
@@ -85,6 +81,8 @@ $keys->print_rows($get{rows});
                <dl class="legend legend-options">
                <dt>key<:= $sign{arg} :>
                        <dd>Commands with a dot need an argument afterwards.
                <dl class="legend legend-options">
                <dt>key<:= $sign{arg} :>
                        <dd>Commands with a dot need an argument afterwards.
+               <dt class="ext">optional
+                       <dd>Some features depend on setup and/or parameters.
                </dl>
 
                <ul class="legend legend-set">
                </dl>
 
                <ul class="legend legend-set">