1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-12 06:25:45 +01:00

Add <S-Left>/<S-Right> (like H/L) mappings to Player mode.

Also the appropriate prefix to Player mode help tags.
This commit is contained in:
Doug Kearns
2009-03-30 00:32:11 +11:00
parent 24216eb7a4
commit 2d25c1f7c3
3 changed files with 30 additions and 30 deletions

View File

@@ -1,5 +1,3 @@
// Import Artist List as this can be huge
function Player() // {{{ function Player() // {{{
{ {
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@@ -52,13 +50,12 @@ function Player() // {{{
} }
// Get the artist names before hand. // Get the artist names before hand.
let artists = getArtistsArray(); let artists = getArtistsArray();
const pageService = Components.classes["@songbirdnest.com/Songbird/MediaPageManager;1"] const pageService = Components.classes["@songbirdnest.com/Songbird/MediaPageManager;1"]
.getService(Components.interfaces.sbIMediaPageManager); .getService(Components.interfaces.sbIMediaPageManager);
// Register Callbacks for searching.
// Register Callbacks for searching.
liberator.registerCallback("change", modes.SEARCH_VIEW_FORWARD, function (command) { player.searchView(command);}); liberator.registerCallback("change", modes.SEARCH_VIEW_FORWARD, function (command) { player.searchView(command);});
liberator.registerCallback("submit", modes.SEARCH_VIEW_FORWARD, function (command) { player.searchView(command);}); liberator.registerCallback("submit", modes.SEARCH_VIEW_FORWARD, function (command) { player.searchView(command);});
//liberator.registerCallback("cancel", modes.SEARCH_VIEW_FORWARD, function (command) { player.searchView(command);}); //liberator.registerCallback("cancel", modes.SEARCH_VIEW_FORWARD, function (command) { player.searchView(command);});
@@ -175,12 +172,12 @@ function Player() // {{{
{ flags: Mappings.flags.COUNT }); { flags: Mappings.flags.COUNT });
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
["H"], "Seek -1m", ["H", "<S-Left>"], "Seek -1m",
function (count) { player.seekBackward(Math.max(1, count) * 60000); }, function (count) { player.seekBackward(Math.max(1, count) * 60000); },
{ flags: Mappings.flags.COUNT }); { flags: Mappings.flags.COUNT });
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
["L"], "Seek +1m", ["L", "<S-Right>"], "Seek +1m",
function (count) { player.seekForward(Math.max(1, count) * 60000); }, function (count) { player.seekForward(Math.max(1, count) * 60000); },
{ flags: Mappings.flags.COUNT }); { flags: Mappings.flags.COUNT });
@@ -217,7 +214,7 @@ function Player() // {{{
////////////////////// COMMANDS //////////////////////////////////////////////// ////////////////////// COMMANDS ////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{ /////////////////////////////////////////////////////////////////////////////{{{
// TODO: presumably this will eventually just filter the library view like cmus? --djk // TODO: rename :Filter to :filter and move this functionality into :tqueue etc? --djk
commands.add(["f[ilter]"], commands.add(["f[ilter]"],
"Filter and play tracks", "Filter and play tracks",
function (args) function (args)
@@ -591,7 +588,7 @@ function Player() // {{{
} }
else else
{ {
liberator.echoerr("E486 Pattern not found: "+searchString, commandline.FORCE_SINGLELINE); liberator.echoerr("E486 Pattern not found: " + searchString, commandline.FORCE_SINGLELINE);
} }
}, },

View File

@@ -17,14 +17,17 @@ section:Player{nbsp}mode[player-index]
||[m]f[m]|| Filter and play tracks + ||[m]f[m]|| Filter and play tracks +
||[m]F[m]|| Filter and show the tracks as a view + ||[m]F[m]|| Filter and show the tracks as a view +
||[m]h[m]|| Seek -10s + ||[m]h[m]|| Seek -10s +
||[m]<Left>[m]|| Seek -10s +
||[m]l[m]|| Seek +10s + ||[m]l[m]|| Seek +10s +
||[m]<Right>[m]|| Seek -10s +
||[m]H[m]|| Seek -1m + ||[m]H[m]|| Seek -1m +
||[m]<S-Left>[m]|| Seek -10s +
||[m]L[m]|| Seek +1m + ||[m]L[m]|| Seek +1m +
||[m]<S-Right>[m]|| Seek -10s +
||[m]+[m]|| Increase volume by 10% + ||[m]+[m]|| Increase volume by 10% +
||[m]-[m]|| Decrease volume by 10% + ||[m]-[m]|| Decrease volume by 10% +
||[m]/[m]|| Search forward for a track + ||[m]/[m]|| Search forward for a track +
//||[m]?[m]|| Search backward for a track +
||[m]n[m]|| Find the next track + ||[m]n[m]|| Find the next track +
||[m]N[m]|| Find the previous track + ||[m]N[m]|| Find the previous track +

View File

@@ -7,14 +7,14 @@ tab has focus.
section:Playing{nbsp}tracks[playing-tracks] section:Playing{nbsp}tracks[playing-tracks]
|x| |:playerp| |:playerplay| |p_x| |:playerp| |:playerplay|
||:playerp[lay]|| + ||:playerp[lay]|| +
||x|| ||x||
________________________________________________________________________________ ________________________________________________________________________________
Play the current track. Play the current track.
________________________________________________________________________________ ________________________________________________________________________________
|z| |:playerpr| |:playerprev| |p_z| |:playerpr| |:playerprev|
||:playerpr[ev]|| + ||:playerpr[ev]|| +
||z|| ||z||
________________________________________________________________________________ ________________________________________________________________________________
@@ -22,7 +22,7 @@ Play the previous track.
________________________________________________________________________________ ________________________________________________________________________________
|b| |:playern| |:playernext| |p_b| |:playern| |:playernext|
||:playern[ext]|| + ||:playern[ext]|| +
||b|| ||b||
________________________________________________________________________________ ________________________________________________________________________________
@@ -30,7 +30,7 @@ Play the next track.
________________________________________________________________________________ ________________________________________________________________________________
|c| |:playerpa| |:playerpause| |p_c| |:playerpa| |:playerpause|
||:playerpa[use]|| + ||:playerpa[use]|| +
||c|| ||c||
________________________________________________________________________________ ________________________________________________________________________________
@@ -38,7 +38,7 @@ Pause/unpause the current track.
________________________________________________________________________________ ________________________________________________________________________________
|v| |:players| |:playerstop| |p_v| |:players| |:playerstop|
||:players[top]|| + ||:players[top]|| +
||v|| ||v||
________________________________________________________________________________ ________________________________________________________________________________
@@ -46,21 +46,21 @@ Stop playing the current track.
________________________________________________________________________________ ________________________________________________________________________________
|x| |p_x|
||x|| ||x||
________________________________________________________________________________ ________________________________________________________________________________
Toggle shuffle mode. Toggle shuffle mode.
________________________________________________________________________________ ________________________________________________________________________________
|r| |p_r|
||r|| ||r||
________________________________________________________________________________ ________________________________________________________________________________
Toggle repeat mode. Toggle repeat mode.
________________________________________________________________________________ ________________________________________________________________________________
|i| |p_i|
||i|| ||i||
________________________________________________________________________________ ________________________________________________________________________________
Select the currently playing track. Select the currently playing track.
@@ -68,7 +68,7 @@ ________________________________________________________________________________
section:Filtering{nbsp}the{nbsp}library[filter,filtering] section:Filtering{nbsp}the{nbsp}library[filter,filtering]
|f| |:f| |:filter| |p_f| |:f| |:filter|
||:f[ilter] {artist} [a][album][a] [a][track][a]|| + ||:f[ilter] {artist} [a][album][a] [a][track][a]|| +
||f|| ||f||
________________________________________________________________________________ ________________________________________________________________________________
@@ -79,7 +79,7 @@ tracks for that album are played. A specific track can be specified with
________________________________________________________________________________ ________________________________________________________________________________
|F| |:F| |:Filter| |p_F| |:F| |:Filter|
||:F[ilter] {keywords}|| + ||:F[ilter] {keywords}|| +
||F|| ||F||
________________________________________________________________________________ ________________________________________________________________________________
@@ -90,28 +90,28 @@ ________________________________________________________________________________
section:Seeking{nbsp}to{nbsp}a{nbsp}track{nbsp}position[seeking] section:Seeking{nbsp}to{nbsp}a{nbsp}track{nbsp}position[seeking]
|<Left>| |h| |p_<Left>| |p_h|
||[count]h|| ||[count]h||
________________________________________________________________________________ ________________________________________________________________________________
Seek +10s. Seek +10s.
________________________________________________________________________________ ________________________________________________________________________________
|<Right>| |l| |p_<Right>| |p_l|
||[count]l|| ||[count]l||
________________________________________________________________________________ ________________________________________________________________________________
Seek -10s. Seek -10s.
________________________________________________________________________________ ________________________________________________________________________________
|H| |p_<S-Left>| |p_H|
||[count]H|| ||[count]H||
________________________________________________________________________________ ________________________________________________________________________________
Seek +1m. Seek +1m.
________________________________________________________________________________ ________________________________________________________________________________
|L| |p_<S-Right>| |p_L|
||[count]L|| ||[count]L||
________________________________________________________________________________ ________________________________________________________________________________
Seek -1m. Seek -1m.
@@ -132,7 +132,7 @@ ________________________________________________________________________________
section:Adjusting{nbsp}the{nbsp}volume[volume] section:Adjusting{nbsp}the{nbsp}volume[volume]
|+| |=| |p_+| |p_=|
||+|| + ||+|| +
||=|| ||=||
________________________________________________________________________________ ________________________________________________________________________________
@@ -140,7 +140,7 @@ Increase volume by 10%.
________________________________________________________________________________ ________________________________________________________________________________
|-| |p_-|
||-|| + ||-|| +
________________________________________________________________________________ ________________________________________________________________________________
Decrease volume by 10%. Decrease volume by 10%.
@@ -175,26 +175,26 @@ ________________________________________________________________________________
section:Search{nbsp}commands[search] section:Search{nbsp}commands[search]
|/| |p_/|
||/{pattern}<CR>|| + ||/{pattern}<CR>|| +
________________________________________________________________________________ ________________________________________________________________________________
Search forward for a track matching {pattern} in the visible media view. Search forward for a track matching {pattern} in the visible media view.
________________________________________________________________________________ ________________________________________________________________________________
//|?| //|p_?|
//||?{pattern}<CR>|| + //||?{pattern}<CR>|| +
//________________________________________________________________________________ //________________________________________________________________________________
//Search backwards for a track matching {pattern} in the visible media view. //Search backwards for a track matching {pattern} in the visible media view.
//________________________________________________________________________________ //________________________________________________________________________________
|n| |p_n|
||n|| + ||n|| +
________________________________________________________________________________ ________________________________________________________________________________
Find the next track. Repeats the last search. If the search hits BOTTOM of the Find the next track. Repeats the last search. If the search hits BOTTOM of the
view, it continues from TOP. view, it continues from TOP.
________________________________________________________________________________ ________________________________________________________________________________
|N| |p_N|
||N|| + ||N|| +
________________________________________________________________________________ ________________________________________________________________________________
Find the previous track. Repeats the last search in the opposite direction. If Find the previous track. Repeats the last search in the opposite direction. If
@@ -203,7 +203,7 @@ ________________________________________________________________________________
section:Rating{nbsp}tracks[rating] section:Rating{nbsp}tracks[rating]
|<C-5>| |<C-4>| |<C-3>| |<C-2>| |<C-1>| |<C-0>| |p_<C-5>| |p_<C-4>| |p_<C-3>| |p_<C-2>| |p_<C-1>| |p_<C-0>|
||<C-0>|| + ||<C-0>|| +
||<C-1>|| + ||<C-1>|| +
||<C-2>|| + ||<C-2>|| +