SpaceMonger Customization
 

[ Prev: 4. Menus | Up: Contents | Next: 6. Actions ]    
      
   5. Key-Bindings     

You can make certain keystrokes perform actions in SpaceMonger. For example, you can make SpaceMonger always Refresh its display when the "F5" key is pressed. Or if "F5" sounds strange to you, you can bind the action to something more comprehensible, like "Ctrl+R". Or "Ctrl+Shift+R". Or "Ctrl+Alt+Shift+F11". You can pick any keys you want for any action you want by naming the keys in the key-binding table.

(The key-binding table is part of the language file because different keys may make sense for different languages. For example, in English, Print would probably be bound to "Ctrl+P" because "Ctrl+P" is easy to remember. However, in French, the word "print" is translated as "imprimer", so in French, "Ctrl+I" might make more sense. It's up to you to decide what makes the most sense for you.)

 
   5a. The Key-Binding Table     

The key-binding table is a tag that looks like this:

<key-bindings> ... one key binding per line ... </key-bindings>

Unlike the menus, the key-binding table must not be contained within any <group> tag. You may have multiple <key-bindings> tags in one file. If the same key is defined more than once, the last definition will be the one that is used.

 
   5b. Individual Key-Bindings     

Each key binding consists of a named key and an action to perform, and looks like this:

<key name="F5" action="refresh"/>

The action can be any Action that SpaceMonger recognizes (see Section 6). The key's name is case-insensitive and can be any name in the following list:

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Tab Enter Escape Backspace Up Down Left Right Insert Delete Home End PageUp PageDown Tilde Comma Period Slash Colon Quote Space LeftBracket RightBracket Hyphen Equals Backslash Num0 Num1 Num2 Num3 Num4 Num5 Num6 Num7 Num8 Num9 NumDiv NumMul NumSub NumAdd NumEnter NumPeriod

Note that keys are considered to be the same whether shifted or unshifted; so on an English keyboard, the apostrophe key is the same as the "Quote" key whether the shift key is held down or not. This is why many shifted keystrokes are not listed. If your keyboard contains keys that are not on this list, they cannot be used for key-binding.

You may also prepend modifiers to the key name to define a composite keystroke:

  • Shift- or Shift+   ---   User must hold down either shift key.
  • Ctrl- or Ctrl+   ---   User must hold down either control key.
  • Alt- or Alt+   ---   User must hold down either alt key.

You should probably not bind plain keys like "C", or even "Shift+C", because bindings take precedence over all other keystrokes. This means that if you did bind "C" to do something (like close the program, for example), you would be unable to type "C:\" into the Location bar, because when you press the "C" key, SpaceMonger will perform its action rather than entering it into the Location bar. Thus if you want to bind common keys like "C", you should use a modifier like "Alt+" or "Ctrl+" also.

    
[ Prev: 4. Menus | Up: Contents | Next: 6. Actions ]    

Copyright © 2006 by Sixty-Five, Inc. All Rights Reserved.