PowerTerm has 3 powerful and easy to
use methods for mapping keys:
- 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.
- '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
- 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:
- The 'Enter' key on the numeric
keypad of the PC should perform the function of the 'Do' key on the
VT220.
- The 'F2' key on the PC should send
<CTRL>X.
- The 'F7' key on the PC should run
the 'ELM' command.
- 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.
- 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].
- Drag this to the 'Enter' key on the
numeric keypad of the 'PC keyboard' of the screen.
- Release the mouse
button.
Example 2: The 'F2'
key on the PC should send <CTRL>X.
- 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].
- Left-click and hold the '^X'
key.
- Drag this to the 'F2' key on the
'PC keyboard' of the screen.
- 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.
- Right-click on the 'F7' key of the
'PC keyboard' portion of the screen.
- You will see the pop-up 'Function
Button window, "Enter Script Commands".
- Enter 'send elm^m' and click the OK
button.
- 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 ~'.
- Right-click on the 'F9' key of the
'PC keyboard' portion of the screen.
- You will see the pop-up 'Function
Button window, "Enter Script Commands".
- Enter 'send \[23~' and
click the OK button.
- 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:
- Choose the "script" menu
and then click on "edit script".
- 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].
- Notepad will open. Here are some
examples that you could use.
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
- 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