Kbase P15889: How to Define Special Keys in PROTERMCAP
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  15/10/2008 |
|
Status: Verified
GOAL:
How to Define Special Keys in PROTERMCAP
GOAL:
PROTERMCAP key definition
GOAL:
Can a special key be defined in PROTERMCAP?
GOAL:
Customizing special keys in PROTERMCAP
FACT(s) (Environment):
Progress 8.x
Progress 9.x
OpenEdge 10.x
UNIX
FIX:
Overview:
In the UNIX and VMS environments keyboard keys vary from terminal to terminal and multiple keyboards can be used with one particular terminal. The PROTERMCAP file located in the DLC directory (where Progress was installed) defines which keys for a particular terminal activate which Progress functions. The user can modify PROTERMCAP to change existing definitions or assign additional Progress functions to specific keys.
Modification of the PROTERMCAP file is sometimes required based on your specific terminal or the terminal emulation package you are using.
The syntax for defining a special key is:
:progress-function(progress-key-label)=chars-transmitted-by-key:\
Getting to know your terminal:
You should check your terminal's documentation to determine the character(s) transmitted when a key is pressed.
Alternatively, in UNIX you can determine the character(s) transmitted by a particular key with the vi editor as follows:
- Edit a new file -- vi 'any file name'
- Press i for insert mode
- Press CTRL-V and a ^ appears
- Press the key and see what character it sends
Example:
On a Wyse 60 terminal with a VT200 keyboard there is a key which is labeled "Delete" which is not assigned to a Progress function in the PROTERMCAP file shipped with the product. This key transmits the characters \E7 (equivalent to Esc 7) when pressed. To assign the DELETE-CHARACTER function to this key you can enter the following in your wy60 PROTERMCAP entry:
:DELETE-CHARACTER(DEL)=\E7:\
In this case, DEL is a meaningful label that is not already assigned to another function.
Testing your customized PROTERMCAP:
To test and revise your PROTERMCAP, copy PROGRESS' default PROTERMCAP file from the directory where it was installed to your own working directory. Give it a new name so that it is apparent that it is a customized file. Then change your PROTERMCAP environment variable (on UNIX) or logical (on VMS) to point to this customized file.
Start up the Procedure Editor and/or your application and test that the new key definitions work as expected.
Putting your PROTERMCAP into production:
Once you have made sure that your PROTERMCAP works, you can deploy it. It does not really matter whereabouts you put it in your system, as long as you:
- Set the PROTERMCAP environment variable (on UNIX) or logical (on VMS) to point to it.
- For clarity's sake, you keep it with a different name from PROGRESS' default PROTERMCAP.
Please note that Progress Software does not support the modification of the PROTERMCAP file.