Arbortext Command Language > set Command Options > set keymap
  
set keymap
set keymap= { user | system | name}
This command attaches the specified keymap to the current window. name is the name of a keymap previously created by the define_keymap or copy_keymap commands, or is a keymap automatically created by a map command on a window with no attached keymap. In the latter case, the name of the keymap is the same as the window name, that is, as returned by window_name().
Any subsequent map commands in the current window not specifying a keymap argument will affect this keymap.
If the keymap is user, then the user keymap for the current window class is used. For example, the edit class map can be used for an Edit window. If the keymap is system, then the system level keymap for the current window class is used. The system map does not contain any user-level mappings. If a map command is issued with the system keymap attached, then map creates a new keymap with a name the same as the window name. This then becomes the current keymap. This automatically created keymap is deleted when the window is destroyed, if no other window has attached it.
If name specifies a prefix keymap, then the keymap remains attached only for the next key or button event. After the key or button event is looked up in the keymap, the keymap for the active window reverts to the previous keymap, unless the mapping for the event switches keymaps explicitly with another set keymap command. If the prefix keymap does not contain a mapping for the next key or button event, an error is signalled and the keymap reverts to the previous setting.
Examples
set keymap=user
define_keymap -prefix ctrl_x_map
define_keymap -prefix ctrl_x_4_map
map @ctrl_x_4_map d directory
map @ctrl_x_map 4 set keymap=ctrl_x_4_map
map control-x set keymap=ctrl_x_map
Related Topics
copy_keymap command
define_keymap command
keymap_exists() built-in function
map command
undefine_keymap command