|
|
Hotkeys are user assigned keys that perform common functions that are typically called from menu options. You may also know these as macros with other applications.
Note, HotKeys are not the easiest thing to use, and unless you are familiar with Tcl/Tk, you may not want to make too many changes. Hopefully I will be inspired to write a graphical front end to assigning hotkeys.
SnackAmp supports a hotkey assignment file that uses the standard Tcl/Tk key bindings to assign them to SnackAmp actions. This file is generally located in your home folder under the .snackAmp folder, but can be changed from the settings dialog. The file itself is evaluated as a Tcl file and can thus hold any valid Tcl code. A few Tcl commands are provided to assign keys of your choice to certain SnackAmp windows and fields. The following binding commands are provided:
Function | Description |
Assign | Assign the key to the main SnackAmp GUI. Keys of the same name bound to the options below will override this binding in those locations. |
FilterAssign | Assign the key to the Filter entry box. |
PlaylistAssign | Assign the key to the main play list. |
APL_TreeAssign | Assign the key to the tree portion of the Auto Playlist manager. |
APL_ListAssign | Assign the key to the track list or track table portion of the Auto Playlist manager. |
The following functions are examples that are assigned to hotkeys. They are shown in the categories they are typically used in.
Assign Action |
Description |
Play | Play the currently highlighted song in the play list from the beginning. |
Prev | Play the previous song in the play list from the beginning. |
Next | Play the next song in the play list from the beginning. |
Pause | Pause Play if playing, resume playing if paused. |
Stop | Stop playing the current song, |
OpenFile | Bring up a file selection box to add a song to the play list and start playing it immediately. |
FilterAssign Action |
Description |
findNextSong | Find the next song in the play list that contains text from the filter box |
filterMusic replace | Replace the contents of the play list with songs containing the text from the filter box. The source of the songs to search is dependent on the |
filterMusic append | Append the contents of the play list with songs containing the text from the filter box. The source of the songs to search is dependent on the |
clearFilter | |
playlistAssign Action |
Description |
Play | Play the currently highlighted song in the play list from the beginning. |
Cut | Remove the selected songs from the play list |
Swap up | Swap the highlighted songs with the one above them. |
Swap down | Swap the highlighted songs with the one below them. |
Section |
Binding |
Function |
Assign | <F1> | ::browser::help |
Assign | <Control-Key-f> | findNextSong 1 |
Assign | <Control-Key-s> | sortSelection |
Assign | <Control-Key-g> | findNextSong 0 |
Assign | <Alt-Key-Up> | {bumpLevel 1;break} |
Assign | <Alt-Key-Down> | {bumpLevel -1;break} |
Assign | <Key-Home> | locatePlaying |
Assign | <F2> | {RenameFile [LB::nameActive]} |
Assign | <Control-F2> | {RenameFile [s cget -file]} |
Assign | <F3> | EditPLID3 |
Assign | <Control-F3> | EditPlaying |
Assign | <F4> | PLNameToTag 0 |
Assign | <F5> | SelectFile 0 |
Assign | <Control-F5> | SelectFile 1 |
Assign | <F6> | PLTagToName |
PlaylistAssign | <Return> | Play |
PlaylistAssign | <Double-ButtonPress-1> | Play |
PlaylistAssign | <BackSpace> | Cut |
PlaylistAssign | <Delete> | Cut |
PlaylistAssign | <Control-Key-Up> | Swap up;break (note break is used to stop other bindings to the actions) |
PlaylistAssign | <Control-Key-Down> | Swap down;break |
PlaylistAssign | <<Copy>> | clipboardCopy $::LB 1 |
PlaylistAssign | <<Cut>> | clipboardCut $::LB |
PlaylistAssign | <<Paste>> | clipboardPaste $::LB |
PlaylistAssign | <Control-Key-a> | selectAll |
FilterAssign | <Double-1> | clearFilter;filterMusic replace |
FilterAssign | <Escape> | clearFilter |
FilterAssign | <Return> | filterMusic replace |
FilterAssign | <Control-Return> | filterMusic replace |
FilterAssign | <Alt-Return> | filterMusic append |
APL_ListAssign | <F2> | ::APL::RenameFile |
APL_ListAssign | <Control-F2> | ::APL::RenameFile |
APL_ListAssign | <F3> | ::APL::EditId3 |
APL_ListAssign | <F4> | ::APL::NameToTag 0 |
APL_ListAssign | <F6> | ::APL::TagToName |
APL_ListAssign | <Delete> | ::APL::DeleteFiles |
APL_TreeAssign | <Left> | APL::positionFolder left |
APL_TreeAssign | <Right> | APL::positionFolder right |
APL_TreeAssign | <Up> | APL::positionFolder prev |
APL_TreeAssign | <Down> | APL::positionFolder next |
APL_TreeAssign | <F2> | APL::SelectedFolderRenameInPlace |
APL_TreeAssign | <Return> | Tree::toggleExpand $::TREE [APL::pathToTreeName $::TA(highlightPath)] |
Assign <Control-Right> Next
Assign <Control-Left> Prev
Assign <Control-p> Play
Assign <Pause> Pause
Assign <Control-q> Stop
Assign <Control-o> OpenFile
playlistAssign <Delete> Cut
FilterAssign <Escape> clearFilter
Additional bindings and more information is provided in the example snackAmphotKeys.tcl file.