FAQ Pages Key Mapping
Support

Frequently Asked Questions

PowerTerm has 3 powerful and easy to use methods for mapping keys:

  1. Drag and Drop Key Mapping facility -- for 'simple' mappings.
    With the Drag and Drop Key Mapping facility you can assign a key on your PC to perform the action of any (single) key on the terminal being emulated.

  2. 'Function Button' Box Key Mapping facility -- for 'complex' mappings. This feature only applies to PowerTerm v5.0.1 and newer only. NOTE: Versions earlier than 5.0.1 can perform complex keymappings. In those versions, complex keymapping is done via the script language. Click here to see how

  3. Script language for 'simple' or 'complex' mappings. Using the script language, you can create any type of key mapping.

   MAPPING KEYS VIA 'DRAG-AND-DROP' OR 'FUNCTION BUTTON' BOX

Here are examples of the types of keymappings you can do:

  1. The 'Enter' key on the numeric keypad of the PC should perform the function of the 'Do' key on the VT220.
  2. The 'F2' key on the PC should send <CTRL>X.
  3. The 'F7' key on the PC should run the 'ELM' command.
  4. The 'F9' key on the PC should run send an 'escape [ 2 3 ~'.

Here are examples of how to do keymapping via 'drag-and-drop':

Note: Drag and Drop for single keystrokes. Run the Options|Keyboard Map menu command (or simply click on the keyboard icon near the right side of the PowerTerm ToolBar).

Example 1: The 'Enter' key on the numeric keypad of the PC should perform the function of the 'Do' key on the VT220.

  1. Left-click and hold the 'Do' key from 'VT Keyboard' [i.e., the top half of the screen, representing the keyboard of the terminal being emulated].
  2. Drag this to the 'Enter' key on the numeric keypad of the 'PC keyboard' of the screen.
  3. Release the mouse button.

Example 2: The 'F2' key on the PC should send <CTRL>X.

  1. Left-click the CTRL key on the 'VT Keyboard' [i.e., the top half of the screen, representing the keyboard of the terminal being emulated].
  2. Left-click and hold the '^X' key.
  3. Drag this to the 'F2' key on the 'PC keyboard' of the screen.
  4. Release the mouse button.

Here are examples of how to do keymapping via 'Function Button' box.:

Note: 'Function Button' box for complex keymappings. Run the Options|Keyboard Map menu command (or simply click on the keyboard icon near the right side of the PowerTerm ToolBar). Then, right-click on the desired PC key you wish to program.

Example 3: The 'F7' key on the PC should run the 'ELM' command.

  1. Right-click on the 'F7' key of the 'PC keyboard' portion of the screen.
  2. You will see the pop-up 'Function Button window, "Enter Script Commands".
  3. Enter 'send elm^m' and click the OK button.
  4. After you exit the Keyboard Map screen you will see that 'F7' on the screen has been replaced by 'Cmd'.

Example 4: The 'F9' key on the PC should run send an 'escape [ 2 3 ~'.

  1. Right-click on the 'F9' key of the 'PC keyboard' portion of the screen.
  2. You will see the pop-up 'Function Button window, "Enter Script Commands".
  3. Enter 'send \[23~' and click the OK button.
  4. After you exit the Keyboard Map screen you will see that 'F9' on the screen has been replaced by 'Cmd'.

MAPPING KEYS WITH THE POWERTERM SCRIPT LANGUAGE

Remapping keys on the PC Keyboard - These keys can be mapped via a '.psl' (PowerScript Language) file. Here are the step by step instructions:

  1. Choose the "script" menu and then click on "edit script".
  2. In the highlighted box, type a file name of your choice, but be sure to use the extension .psl, and supply a prefix. (So you will have a name like "mapkeys.psl".) Press [OK].
  3. Notepad will open. Here are some examples that you could use. 
    • key f1 do {send "Good Night<return>"}
    • key f6 do {send ^p} # the F6 button
    • key f7 do {send "-"}
    • key esc do {send <ESCAPE>OB}
    • key ctrl+f1 do {send \x80} # HEX 80
    • key shift+f5 do {send <ESCAPE>\[31~} # note the '\' before the '['
    • key alt+f3 do {exec notepad}
    • key numpad4 do {send "<ESCAPE>OB"}#num keypad 4(left arrow)
    • key delete do {send \x7F} # - or - {send ^?} the delete key for VT-series
    • key delete do {send <delete>} # the delete key for VT-series
    • key f1 do {send <alt+f2>}

      What the above examples do:

    • f1 will send 'Good Night' and a Carriage Return
    • f6 will send the CONTROL-P character
    • f7 will send the "-" character
    • ESCAPE will send <ESCAPE>OB
    • CONTROL + f1 will send the HEX \80 character
    • Shifted f5 will send the sequence "<ESCAPE>\[31~"
    • Alt f3 will start a Notepad session
    • The left arrow key on the numeric keypad will send the left arrow sequence (provided that the terminal has been put into 'application mode', often done via <ESCAPE>=)
    • The delete key will send the 'delete' code.
    • Another way to have the delete key send the 'delete' code.
    • F1 sends alt-f2
    Notes:
    A. If you want PowerTerm to send letters or words to the screen, be sure to enclose these in quotes. If you are sending a command, quotes are not needed.

    B. The Function keys MUST be in lower case, as in the examples.

    C. <return> and ^M are interchangeable

  4. Here are the commands necessary to bind arrow keys on a VT-type terminal.
    key numpad8 do {send "<ESCAPE>OA"} # up
    key numpad2 do {send "<ESCAPE>OB"} # down
    key numpad6 do {send "<ESCAPE>OC"} # right
    key numpad4 do {send "<ESCAPE>OD"} # left
    c) Remapping the KeyPad (This is the "floating Powerpad keypad" which you get from the Menu Options|Show Power Pad)

    The Floating PowerPad can be programmed either as in step (a) or step (b) above.

    note: The instructions for remapping the keyboard with the script language are the same as above, except that the keypad numbers are identified by numpad[n].

    example:

    key numpad1 do {send ls^M} #a Unix example
    key numpad2 do {exec notepad}
    key numpad3 do {send <f2><enter>} #a 3270 or 5250 example