Foobar2000:Preferences:Keyboard Shortcuts: Difference between revisions

From Hydrogenaudio Knowledgebase
No edit summary
Line 106: Line 106:


== Multimedia keys ==
== Multimedia keys ==
<div style="width:80%>''Note: This portion of the wiki page applies to a particular combination of hardware (keyboard w/ media keys) and software (IntelliType Pro keyboard driver). The instructions in this section may be useful, if not specifically applicable, to your installation.''</div>
You may wish to redefine the dedicated multimedia keys (stop, play, etc...) to control foobar2000 functions instead of the Windows Media Player. Here is one scenario where this is accomplished with a bit of effort.
# '''Problem:''' pressing media key for “play” starts Windows Media Player. '''Solution:''' disable the play key using the keyboard control panel (in Windows). Go ahead and disable the functions for other media keys as well.
# Next, we want to assign media key keyboard shortcuts in foobar2000. We will start by defining two keyboard shortcuts: '''stop''' and '''play.''' Open foobar2000 and call up the keyboard shortcuts preferences panel. Click “Add New” to define a new keyboard shortcut. Next, click in the field labeled “Key” at the bottom of the panel. Press the dedicated media key labeled with the stop icon.
# '''Problem:''' nothing appears in the “Key” field when we press the stop key. It appears as though foobar2000 cannot see that a key has been pressed—false: it can. '''Solution:''' terminate the keyboard driver process using the task manager. This is brutish, but effective. There are other ways to terminate this process, such as disabling the driver from loading when you logon to Windows.
# Once, type32.exe is no longer active, foobar200 can observe the media key keypress. Set up new keyboard shortcuts for stop and play. Make these keyboard shortcuts global, if you wish.
# Now, logoff from Windows, and login again. This will load the IntelliType Pro keyboard driver once again. You start foobar200 and begin playing an audio track. Minimize the foobar2000 window and make a different application the active window. Test your media keys '''stop''' and '''play.''' If they work, and Windows Media Player does not intrude upon your application, you have successfully reoriented your dedicated media keys to work with gfoobar2000 instead of WMP.
You may have a different combination of hardware and software. You may be able to adapt the above steps to use your media keys. A further enhancment to the above process allows you to launch foobar2000 by pressing your play media key:
# Remove the keyboard shortcut definition for the play key from your foobar2000 preferences. Definitions for the other keys will be left alone.
# We will assign a command line sequence to the Play media key using the IntelliType Pro software. The command line is:
<tt>C:\program files\foobar2000\foobar2000.exe /playpause</tt>


== Avoiding conflicts ==
== Avoiding conflicts ==

Revision as of 04:54, 12 February 2007

Keyboard Shortcuts preferences

This is the Keyboard Shortcuts page. It contains information for configuring foobar2000 keyboard shortcuts.

Concepts

Keyboard shortcuts are associated with menu commands. Menu commands may include the main menu bar, context menus, and sub-menus. Several dozen keyboard shortcuts are predefined upon installation of foobar2000. Many of these shortcuts are familiar: Ctrl+S for “save”, Ctrl+P for “preferences”, et cetera. It is helpful to review predefined keyboard shortcuts by examining the preferences panel.

Keyboard shortcuts can be defined for unmodified keys, such as Z for stop, or for modified keys such as Ctrl+P for 'print.' Possible modifiers are Ctrl, Shift, and Alt.

Keyboard shortcuts have the possibility of being defined as “global”. A global keyboard shortcut takes action even when foobar2000 is running in the background. If foobar2000 is running, global keyboard shortcuts will control it. Users having keyboards equipped with dedicated multi-media keys may wish to assign global keyboard shortcuts to these keys.

There are no global keyboard shortcuts among the predefined keys. One can easily assign global status to one or more of these keys. Good candidates for global assignment are the volume-controling keys: Num + and Num -. Global assignments should be made carefully as they may interfere with your ability to use other applications.

Keyboard Shortcut preferences panel

Predefined shortcut definition for Z.
Predefined shortcut definition for Z.

The keyboard shortcut preferences panel is where keyboard shortcuts are added, modified, deleted, or simply inspected.

A related option appears on the "Display" preferences panel. A (normally-checked) box specifies whether shortcuts should be displayed in menus. You may wish to uncheck this to prevent menus from becoming unmanageably wide.

“Assigned Shortcuts” portion: lists and defines shortcuts

The top portion of the keyboard shortcut preferences displays a list of existing shortcuts. The list may be sorted by clicking one of headers.

“Action” portion: menu structure and filter

This middle portion of the preference panel shows the menu commands available for assignment. This portion of the panel may be ignored if you are simply reviewing keyboard shortcuts already defined.

Finding menu commands containing “stop”.

A filter is available to speed the task of assigning new commands. This filter reduces the number of items displayed in the commands list, assuming the user enters part of the command name he is looking for. Otherwise, the filter has no effect on Foobar2000's operation. Be sure to remove stray characters that might be entered in this filter—otherwise you may not be able to see the command you're after!

“Key” portion: assignment of keystroke

The final portion of the keyboard shortcuts preferences panel shows the keystroke assigned to a given action. To assign a different keystroke, click in the field and press the new keystroke.

Predefined Keyboard Shortcuts

There are thirty-one predefined shortcuts in a fresh installation of Foobar2000 ver.0.9.4.2. All predefined shortcuts are “non-global”, or local, shortcuts. These keyboard shortcuts take effect only when Foobar2000 is the active window.

modifier key action/menu-command modifier key action/menu-command
Num 4 Seek back by 10 seconds Alt A Always on Top
Ctrl Num 4 Seek back by 1 minute Num + Volume up
Num 6 Seek ahead by 10 seconds Num - Volume down
Ctrl Num 6 Seek ahead by 1 minute = Volume up
Num Del Remove Shift = Volume up
Z Stop - Volume down
X Pause Ctrl Tab Next Playlist
C Play Shift+Ctrl Tab Previous Playlist
V Next Ctrl N New Playlist
Shift V Previous Ctrl W Remove Playlist
Ctrl P Preferences Ctrl F4 Remove Playlist
Ctrl C Copy Name(s) Ctrl O Open…
Ctrl A Select All Ctrl S Save Playlist…
Ctrl Z Undo Ctrl U Add Location…
Shift+Ctrl Z Redo
F3 Search
Ctrl F Search

The above table faithfully reproduces what is shown in Foobar2000. There appears to be an error in nomenclature; “Num 4” is more correctly termed as 'right arrow,' and “Num 6” should be termed as 'left arrow'. The appellation “Num 4” only makes sense if you presuppose that NumLock is turned OFF. Most desktop users keep NumLock turned on.

Effect of additional plugins

Installing additional components to Foobar2000 does not affect existing keyboard shortcuts. A component will not add new keyboard shortcuts, nor will it modify existing shortcuts. However, new components often add menu items to the menu structure. You are allowed to assign keyboard shortcuts to new commands effected by additional plugins.

In the event a plugin is later removed, and its commands had been assigned to shortcuts, errors would be noted in corresponding entries in the keyboard shortcuts preferences pane (i.e. top portion).

Removing existing keyboard shortcuts

Any and all keyboard shortcuts may be removed. This includes shortcuts present in the Foobar2000 installation.

Should you remove a desired shortcut by accident, refer to the above table and redefine it. Alternatively, you might reset all shortcuts to their original state by clicking the “Reset Page” button.

It is recommended that you do NOT delete (or redefine) the Ctrl+P shortcut. In the event that you had disabled part of your interface, such as hiding the menu bar, you would want to open the preferences panel using Ctrl+P and restore the interface.

Defining new keyboard shortcuts

Multimedia keys

Note: This portion of the wiki page applies to a particular combination of hardware (keyboard w/ media keys) and software (IntelliType Pro keyboard driver). The instructions in this section may be useful, if not specifically applicable, to your installation.

You may wish to redefine the dedicated multimedia keys (stop, play, etc...) to control foobar2000 functions instead of the Windows Media Player. Here is one scenario where this is accomplished with a bit of effort.

  1. Problem: pressing media key for “play” starts Windows Media Player. Solution: disable the play key using the keyboard control panel (in Windows). Go ahead and disable the functions for other media keys as well.
  1. Next, we want to assign media key keyboard shortcuts in foobar2000. We will start by defining two keyboard shortcuts: stop and play. Open foobar2000 and call up the keyboard shortcuts preferences panel. Click “Add New” to define a new keyboard shortcut. Next, click in the field labeled “Key” at the bottom of the panel. Press the dedicated media key labeled with the stop icon.
  1. Problem: nothing appears in the “Key” field when we press the stop key. It appears as though foobar2000 cannot see that a key has been pressed—false: it can. Solution: terminate the keyboard driver process using the task manager. This is brutish, but effective. There are other ways to terminate this process, such as disabling the driver from loading when you logon to Windows.
  1. Once, type32.exe is no longer active, foobar200 can observe the media key keypress. Set up new keyboard shortcuts for stop and play. Make these keyboard shortcuts global, if you wish.
  1. Now, logoff from Windows, and login again. This will load the IntelliType Pro keyboard driver once again. You start foobar200 and begin playing an audio track. Minimize the foobar2000 window and make a different application the active window. Test your media keys stop and play. If they work, and Windows Media Player does not intrude upon your application, you have successfully reoriented your dedicated media keys to work with gfoobar2000 instead of WMP.

You may have a different combination of hardware and software. You may be able to adapt the above steps to use your media keys. A further enhancment to the above process allows you to launch foobar2000 by pressing your play media key:

  1. Remove the keyboard shortcut definition for the play key from your foobar2000 preferences. Definitions for the other keys will be left alone.
  1. We will assign a command line sequence to the Play media key using the IntelliType Pro software. The command line is:

C:\program files\foobar2000\foobar2000.exe /playpause

Avoiding conflicts

Foobar2000 does not prevent you from assigning a the same keyboard shortcut more than once. This is a good design decision (in my opinion) in that it doesn't unnecessarily encumber you while redefining shortcuts. When a redundant definition occurs within Foobar2000, you will see a warning below the list of definitions. Correcting this error is straightforward—scan through the list of assignments and delete the obsolete shortcut definition. The warning should disappear after internal conflicts have been eliminated.

It is possible that Windows could interfere with your intended Foobar2000 keyboard shortcuts. Troubleshooting this problem is beyond the scope of this wiki page.

Familiarize yourself with Windows shortcut properties, as well as the particulars of your keyboard driver (such as Microsoft's IntelliType software), and you should be able to track down keyboard assignment conflicts. Most of these conflicts are likely to stem from multimedia key assignments. It is often possible to disable use of the multimedia keys altogether—IntelliType permits this, for example—allowing Foobar2000 to make exclusive use of the key.