Introduction

Actions are operations made by mucommander application to perform tasks asked by the user. Examples of actions:

  • Refresh current folder
  • Mark all files
  • Copy
  • Go to previous folder
  • Show the check for updates dialog
  • Create directory
  • Quit
  • etc

The majority of the actions can be assigned with keyboard shortcuts.

This page explains about keyboard shortcuts assignment for actions, and the action_keymap.xml customization file.

How mucommander handles keyboard shortcuts

Since version 0.8.4, mucommander stores its default shortcuts internally (hard-coded), and the action_keymap.xml configuration file contains the shortcuts that were customized by the user only.

On startup, the application first load the default shortcuts and then override the modified shortcuts defined in the action_keymap.xml file (if exists).

The actions shortcuts can be modified in two ways:

  • modify the action_keymap.xml file directly.
  • using mucommander's shortcuts editor (recommended).

action_keymap.xml file

The shortcuts that are modified by the shortcuts editor are saved in the action_keymap.xml file. The file can also be modified directly.

It's located in the user's properties directory (for more information read this).

The modified shortcuts file should look something like:

<?xml version="1.0" encoding="UTF-8" ?> 
<!--  See http://trac.mucommander.com/wiki/ActionKeyMap for information on how to customize this file --> 
<keymap version="0.8.4">
  <action id="ShowAbout" keystroke="ctrl B" /> 
  <action id="AddBookmark" /> 
  <action id="ToggleAutoSize" keystroke="T" alt_keystroke="2" /> 
</keymap>

For people who can read XML, this is fairly simple:

  • The root element is always keymap. It accept one attribute version. It can contain any number of action elements.
  • The action element accepts 3 attributes, id, keystroke and alt_keystroke.

For the others, it doesn't really matter. If you want to modify shortcuts of an action directly by editing the file, just copy one of the lines that start with <action... and edit it according to the rules I'll be outlining bellow.

version attribute

Indicates on which version of mucommander the file has been saved.

id attribute (compulsory)

Id of an action whose shortcuts would be defined. Since version 0.8.4, actions are no longer identified by their paths, but with an id that is build on the action class name without the 'Action' postfix.

keystroke attribute

This is a shortcut that would serve as the primary keyboard shortcut for the action.

alt_keystroke attribute

This is a shortcut that would serve as the secondary, alternative, keyboard shortcut for the action.

Notices

  • When removing action's shortcuts, the modified action would be saved as a row in the action_keymap.xml file with no keystroke nor alt_keystroke attribute.
  • While modifiying the shortcuts via the shortcuts editor, the editor ensures that no keystroke is assigned to more than one action. You should take care for it by yourself if you modify the action_keymap.xml file directly.
  • If an action is assigned with an alternative shortcut but with no primary shortcut, the alternative will serve as the primary shortcut and the action_keymap.xml file will be updated by the application on closing.