Previous: Keyboard Commands and the internal Message Editor, Up: MsgEd TE Keyboard Reference [Index]
If you are dissatisfied with the default keyboard bindings, you can easily
change the keyboard layout. Each of the message reader and message editor
keyboard functions that have been listed on the previous pages can be
assigned an arbitrary keystroke using the ReadKey
and EditKey
configuration keywords. The syntax of these commands is as follows:
EditKey keycode function-name ReadKey keycode function-name
The keycode parameter designates wich keystroke you want to redefine. In order to find out the key code matching a certain keystroke, invoke the executable of MsgEd TE with the ‘-k’ option. You can then press the desired keystroke, and MsgEd TE will print out the key code that you have to use as keycode parameter in the configuration file. Here is an example session:
[R:\mailer\msged]msgedp -k Displaying keyboard scan codes in hexadecimal form. Press any key or key combination, or 'q' (lowercase 'Q') to exit. Key: 0x2100 Key: 0x0071 (q)
I pressed Alt-F and q to reproduce this output. From the output, we can see that Alt-F has the keycode ‘0x2100’, and q has the keycode ‘0x0071’. Keycodes might vary depending on your hardware and operating system. Also, on UNIX consoles sometimes keys are not mapped correctly at all, in which case different key combinations might have the same key code. If you find one where this is problematic, contact me for a bug report.
Now that you know the proper keycode, you can assign it to any reader or editor function. See Keyboard Commands and Functions in Message Reading mode, for a complete list of available keyboard functions for message reading mode. See Keyboard Commands and Functions in the internal Message Editor, for a complete list of available keyboard functions in the built-in message editor.
As an example, let us assign the keystroke Alt-F to the ‘wordright’ editor function:
EditKey 0x2100 wordright
With this line in your configuration file, you will be able to press Alt-F in order to move the cursor to the beginning of the next word.