1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-07 11:44:10 +01:00

Add count support to l, L, h and H mappings.

This commit is contained in:
Doug Kearns
2009-03-20 13:37:52 +11:00
parent 0d9c86a547
commit 032f7c0981
2 changed files with 15 additions and 11 deletions

View File

@@ -16,7 +16,7 @@ function Player() // {{{
function seek(interval, direction) function seek(interval, direction)
{ {
interval = interval * 1000; interval = interval * 1000;
let min = 0; let min = 0;
let max = gMM.playbackControl.duration; let max = gMM.playbackControl.duration;
@@ -63,22 +63,26 @@ function Player() // {{{
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
["h"], "Seek -10s", ["h"], "Seek -10s",
function () { player.seekBackward(10); }); function (count) { player.seekBackward(count * 10); },
{ flags: Mappings.flags.COUNT });
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
["l"], "Seek +10s", ["l"], "Seek +10s",
function () { player.seekForward(10); }); function (count) { player.seekForward(count * 10); },
{ flags: Mappings.flags.COUNT });
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
["H"], "Seek -1m", ["H"], "Seek -1m",
function () { player.seekBackward(60); }); function (count) { player.seekBackward(count * 60); },
{ flags: Mappings.flags.COUNT });
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
["L"], "Seek +1m", ["L"], "Seek +1m",
function () { player.seekForward(60); }); function (count) { player.seekForward(count * 60); },
{ flags: Mappings.flags.COUNT });
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
["=","+"], "Increase Volume by 10%", ["=", "+"], "Increase Volume by 10%",
function () { player.increaseVolume(); }); function () { player.increaseVolume(); });
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
@@ -226,7 +230,7 @@ function Player() // {{{
gMM.volumeControl.volume = 0.1; gMM.volumeControl.volume = 0.1;
else else
gMM.volumeControl.volume = gMM.volumeControl.volume * 0.9; gMM.volumeControl.volume = gMM.volumeControl.volume * 0.9;
}, }
}; };
//}}} //}}}
} // }}} } // }}}

View File

@@ -66,21 +66,21 @@ ________________________________________________________________________________
|l| |l|
||l|| ||[count]l||
________________________________________________________________________________ ________________________________________________________________________________
Seek -10s. Seek -10s.
________________________________________________________________________________ ________________________________________________________________________________
|H| |H|
||H|| ||[count]H||
________________________________________________________________________________ ________________________________________________________________________________
Seek +1m. Seek +1m.
________________________________________________________________________________ ________________________________________________________________________________
|L| |L|
||L|| ||[count]L||
________________________________________________________________________________ ________________________________________________________________________________
Seek -1m. Seek -1m.
________________________________________________________________________________ ________________________________________________________________________________