Using Set key mappings

You can use the Set key mappings action to overwrite the default mapping of keys to perform various operations on the terminal.

The set key mapping is instrumental to developers as it enables them to map from key lists, especially when keys behave differently on different terminals. For example, you can map KEY_PAGEUP to {Page Up}, {Roll Down}, or \\x1b[5~ based on the terminal host you connected with.

Procedure

  1. Enter the name of the session or select an existing variable that you have used to establish a connection with the terminal using the Connect action in the Terminal emulator session name field.
  2. Select the Add key mapping button to set a key and map it to a custom string or macro. The Add key mapping window opens:
    1. Select the key to map from the drop-down list.
    2. Add the custom string or macro to send it to the terminal.
    3. Click Add.
      The custom key value is added. The following table provide examples of custom values set for function keys.
      Key Custom string or macro
      F1 {F1} or \x1b[11~
      F2 \x1b[12~
      F3 \x1b[13~
      ENTER {Return}
    Note:
    • In the automation, if you have set custom key values and used subsequent actions such as Send key or Send text, the default values of keys are overridden with the new set of values.
    • You can set and use the custom key values in a particular session. If you create a new session and want to use the custom key values, you must set the keys and map them to a custom string or macro.
  3. Click Save.