mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-04 18:04:12 +01:00
Add count support to l, L, h and H mappings.
This commit is contained in:
@@ -16,7 +16,7 @@ function Player() // {{{
|
||||
function seek(interval, direction)
|
||||
{
|
||||
interval = interval * 1000;
|
||||
|
||||
|
||||
let min = 0;
|
||||
let max = gMM.playbackControl.duration;
|
||||
|
||||
@@ -63,22 +63,26 @@ function Player() // {{{
|
||||
|
||||
mappings.add([modes.PLAYER],
|
||||
["h"], "Seek -10s",
|
||||
function () { player.seekBackward(10); });
|
||||
function (count) { player.seekBackward(count * 10); },
|
||||
{ flags: Mappings.flags.COUNT });
|
||||
|
||||
mappings.add([modes.PLAYER],
|
||||
["l"], "Seek +10s",
|
||||
function () { player.seekForward(10); });
|
||||
function (count) { player.seekForward(count * 10); },
|
||||
{ flags: Mappings.flags.COUNT });
|
||||
|
||||
mappings.add([modes.PLAYER],
|
||||
["H"], "Seek -1m",
|
||||
function () { player.seekBackward(60); });
|
||||
function (count) { player.seekBackward(count * 60); },
|
||||
{ flags: Mappings.flags.COUNT });
|
||||
|
||||
mappings.add([modes.PLAYER],
|
||||
["L"], "Seek +1m",
|
||||
function () { player.seekForward(60); });
|
||||
|
||||
function (count) { player.seekForward(count * 60); },
|
||||
{ flags: Mappings.flags.COUNT });
|
||||
|
||||
mappings.add([modes.PLAYER],
|
||||
["=","+"], "Increase Volume by 10%",
|
||||
["=", "+"], "Increase Volume by 10%",
|
||||
function () { player.increaseVolume(); });
|
||||
|
||||
mappings.add([modes.PLAYER],
|
||||
@@ -226,7 +230,7 @@ function Player() // {{{
|
||||
gMM.volumeControl.volume = 0.1;
|
||||
else
|
||||
gMM.volumeControl.volume = gMM.volumeControl.volume * 0.9;
|
||||
},
|
||||
}
|
||||
};
|
||||
//}}}
|
||||
} // }}}
|
||||
|
||||
@@ -66,21 +66,21 @@ ________________________________________________________________________________
|
||||
|
||||
|
||||
|l|
|
||||
||l||
|
||||
||[count]l||
|
||||
________________________________________________________________________________
|
||||
Seek -10s.
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
|H|
|
||||
||H||
|
||||
||[count]H||
|
||||
________________________________________________________________________________
|
||||
Seek +1m.
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
|L|
|
||||
||L||
|
||||
||[count]L||
|
||||
________________________________________________________________________________
|
||||
Seek -1m.
|
||||
________________________________________________________________________________
|
||||
|
||||
Reference in New Issue
Block a user