Ok, I've searched everywhere and simply can't find documentation on keylaunch. So I've pulled apart the code and worked it out. To save someone else the same frustration, here are my notes.
Firstly, for those who don't know, keylaunch is used to bind 'commands' to hotkeys. For example, pressing 'Calendar' can load Calendar, and pressing 'Fn 3' can lower the brightness.
Keylaunch uses /etc/keylaunchrc, and can also be (overridden? in addition?) by ~/.keylaunchrc.
A typical keylaunchrc may look like this: -
# Comment
key=....F9:-:command
key=...*1:chvt 1
key=....Released F9:anothercommand
Each line has the following format ([]'s means optional. {} means its a variable):
key={flag}[{option} ]{keyname}[ {combinekeyname}][:-]:[~]{command}
Lets look at each bit seperately: -
key= - This is always the same.
{flag} - 4 characters, normally ....
- Each character corresponds to a modifier. If the modifier is pressed at the same time, then this key will be triggered. IE, Control + 1 can give a chvt 1.
- If the FIRST character is '?', then all the flags are ignored, and it will trigger on ANY modifier
- OTHERWISE, each character can be '.' (not selected) or '*' (selected), and the modifiers are as follows: -
*... - Control
.*.. - Shift
..*. - Alt
...* - Fn
- I'm pretty sure you can have more than one modifier.
[{option} ] - Optional Option. Note the SPACE afterwards if used!
- This dictates on what event the key must trigger. If you don't specify an option it assumes when the key is pressed.
- The events can be one of the following: -
Pressed - Occurs when the key is pressed
Released - Occurs when the key is released
Held - Occurs if the key is held for a bit
Combine - Occurs when you press TWO keys (IE Calendar+AddressBook} You MUST provide {combinekeyname}.
- Don't forget the space!!!
{keyname} - The name of the key to trigger on
- The names are defined in /etc/keymap-2.6.map
[ {combinekeyname}] - Iff (if and only if) the Combine option is used you specify a second key here.
- Don't forget the space BEFORE this (ie, between key and combinekeyname}
[:-] - Try to raise an existing window
- If this exists then when the key is triggered keylaunch will first see if there is already a running instance of the command, and if so, just bring it into focus.
- If it is omitted, then it will load a new instance every time.
[~] - Disable startup notify
- If this exists (IE, a tilda before the commandname), then startup notify will not be used. I think this means that you won't see the hourglass in the corner.
{command} - Command to run
- What command to run.
Feel free to post your changes you've made to your keylaunchrc files. I'd be interested in getting some ideas.
- Bundabrg