Next: 19.9 Status and History
Up: 19. RC Files
Previous: 19.7 Keyboard Bindings
Depending on your system and personal preferences, there may be times when you wish to have more than one key sequence bound to a command. For example, by default, the routine to input a character as a 2 character hexadecimal value is bound as:
Bind HEXINPUT "Enter hex value" "ESC-Backspace"
KEY_ESC KEY_BACKSPACE
Now, you may wish for this binding to continue to work, but also have the [Esc][=] do the same thing. Easy:
Alias HEXINPUT KEY_ESC '='
Now, pressing either combination calls up the same function.
A few notes:
- Up to a maximum of 50 alias combinations can be defined (this is a compile time constant, and could be increased if you really need it).
- If an alias key sequence duplicates an already defined command key sequence, the alias will never be executed.
- When defining alias keys, note the difference in syntax. There are no comment or keyname fields.
- There is no function in Ved to create an alias. It is only available as an RC file command (mind you, you can do this from the menu-options-enter-rc-command option).
- Alias key bindings are written to an RC file with menu-options-save_options if you respond ``yes'' to the ``keybindings'' prompt.
- Ved checks when defining an alias to make sure that the alias is not duplicating an existing alias; however, it does not check the alias against the normally bound key sequences.
Next: 19.9 Status and History
Up: 19. RC Files
Previous: 19.7 Keyboard Bindings
2004-05-02