# Advanced amaroK features

## Keyboard Shortcuts

&amarok; uses keyboard shortcuts like most other applications, below is a listing of those shortcuts and there respective actions. The global shortcuts can be configured by right clicking the Player window and selecting Configure Global Shortcuts... The &amarok; shortcuts can be configured by right clicking the Player window and selecting Configure Shortcuts...

You can assign you multimedia keys to work as &amarok; shortcuts making your keyboard an &amarok; control center.

The global shortcuts are:

Key Combination | Action
--- | ---
WinX | Play
WinC | Pause
WinV | Stop
WinB | Next Track
WinZ | Previous Track
WinKP_Add | Increase Volume
WinKP_Subtract | Decrease Volume
WinA | Add Media
WinP | Toggle Playlist
WinO | Show OSD

The &amarok; shortcuts are:

Key Combination | Action
--- | ---
CtrlC | Copy
CtrlKP_Enter | Goto Current
CtrlQ | Quit
CtrlShiftZ | Redo
CtrlS | Save Playlist
CtrlA | Select All
CtrlH | Shuffle
CtrlZ | Undo

The Playlist Browser shortcuts are:

Key Combination | Action
--- | ---
Space | Load Playlist
F2 | Rename Playlist
Backspace | Remove Playlist

## The DCOP Interface

The amaroK DCOP interface provides you with an easy way to control amaroK with your own custom scripts.

The DCOP interface for amaroK has many generic functions that may be found in other KDE applications. This section is divided into two tables and is intended to describe the DCOP functions of the player and playlist. An example of the pause dcop function would look like:

&percnt;dcop amarok player pause

### dcop amarok player

DCOP Function | Action
--- | ---
album | The album function returns the album of the currently playing track.
artist | The artist function returns the artist of the currently playing track.
bitrate | The bitrate function returns the bitrate of the currently playing track.
comment | The comment function returns the comment of the currently playing track.
coverImage | The coverImage function returns the URL to the current track's cover image.
currentTime | The currentTime function returns the position (mm:ss) of the currently playing track.
encodedURL | The encodedURL returns the URL for the current track with spaces encoded.
genre | The genre function returns the genre of the currently playing track.
nowPlaying | The nowPlaying function returns "Artist - Title" of the currently playing track. If one of both id3 tags is empty, only "Artist" or "Title" is shown (without the "-").
title | The title function returns the title of the currently playing track.
totalTime | The totalTime function returns the total time (mm:ss) of the currently playing track.
track | The track function returns the track number of the current track.
year | The year function returns the year of the currently playing track.
isPlaying | The isPlaying function returns a value of true or false to indicate if the player is playing or not.
randomModeStatus | The randomModeStatus function returns the status of Random Mode with a value of true or false.
repeatPlaylistStatus | The repeatPlaylistStatus function returns the status of Repeat Playlist with a value of true or false.
repeatTrackStatus | The repeatTrackStatus function returns the status of Repeat Track with a value of true or false.
getVolume | The getVolume function returns a value for the volume level specified by a value of 0-100.
sampleRate | The sampleRate function returns the sample rate of the current track.
score | The score function returns the current track's score.
status | The status function returns a value for the engine status, 2 for playing, 1 for paused, and 0 for idle.
trackCurrentTime | The trackCurrentTime function returns a value of the current elapsed track time in seconds.
trackPlayCounter | The trackPlayCounter function returns the number of times the current track has been played.
trackTotalTime | The trackTotalTime function returns a value of the current track's total time in seconds.
configEqualizer | The configEqualizer function raises the equalizer configuration window.
enableOSD | The enableOSD function allows you to toggle the On-Screen-Display with a true or false value
enableRandomMode | The enableRandomMode function is used to toggle the random mode with a value of 0 for disabled, and 1 for enabled.
mute | The mute function allows you to mute and unmute the playing track.
next | The next function advances the player one track.
pause | The pause function pauses the currently playing track.
play | The play function starts the player from where it was last stopped.
playPause | The playPause function starts the player if it is currently stopped or paused. This function also pauses the player if it is currently playing a track.
prev | The prev function moves the player back one track.
scanCollection | The scanCollection function performs a manual scan of your collection.
seek | The seek function is used to seek to a specific point in a track by a value specified in seconds.
seekRelative | The seekRelative function is used to seek to a position relative to the current track position by a value specified in seconds.
setContextStyle |
setEqualizer | The setEqualizer function uses eleven space delimited integers to set the equalizer slider values. The slider values range from -255 as the lowest value, and 255 as the highest. The first integer is used to set the pre-amp value, the remaining integers set the pre-amp response frequency values from 60Hz to 16kHz.
setEqualizerEnabled | The setEqualizerEnabled function is used to enable the equalizer using a true or false value.
setVolume | The setVolume function adjusts the volume to a level specified by a value of 0-100.
showOSD | The showOSD function raises the OSD to show the current track information.
stop | The stop function will stop the player if it is currently playing.
volumeDown | The volumeDown function adjusts the volume down one step.
volumeUp | The volumeUp function adjusts the volume up one step.

### dcop amarok playlist

DCOP Function | Action
--- | ---
getActiveIndex | The getActiveIndex function returns an integer value for the current track's position in the playlist.
addMedia | The addMedia function is used to add single files to the playlist.
addMediaList | The addMediaList function is used to add multiple files to the playlist.
clearPlaylist | The clearPlaylist function is used to clear the entire playlist.
playByIndex | The playByIndex function starts playback of a track by it's position in the playlist.
playMedia | The playMEDIA function starts playback of a track specified by it's KURL.
saveCurrentPlaylist | The saveCurrentPlaylist function saves the current playlist as ~/.kde/share/apps/amarok/current.xml.
setStopAfterCurrent | The setStopAfterCurrent function stops playback of the playlist after the current track has completed.
shortStatusMessage | The shortStatusMessage function displays a string of text as a message in the status bar.
shufflePlaylist | The shufflePlaylist function randomizes the order of the tracks in the playlist.
togglePlaylist | The togglePlaylist function toggles the use of the playlist window either on or off.

## Command-line Options

amaroK supports the use of the standard Qt and kde command line options. amaroK also has it's own application specific options.

The Qt and kde options:

Option | Action
--- | ---
--help | Show help about options.
--help-qt | Show Qt specific options.
--help-kde | Show KDE specific options.
--help-all | Show all options.
--author | Show author information.
-v, --version | Show version information.
--license | Show license information.

The amaroK options:

The &amarok; options are designed to be used while &amarok; is running.

Option | Action
--- | ---
-r, --previous | Skip to the previous track in the playlist.
-p, --play | Start playing current playlist.
-s, --stop | Stop playback.
--pause | Pause playback.
-f, --next | Skip to the next track in the playlist.
-a, --append | Append Files/URLs into the playlist.
-e, --enqueue | See append, available for backwards compatability.
--queue | Queue Files/URLs after the currently playing track.
-m, --toggle-playlist-window | Toggle the playlist window.
--wizard | Launch the First-run wizard.
--engine "name" | Start &amarok; with the "name" engine.