Progress
Portability Guide


Keyboard Events

Although keyboards vary, Progress defines several hundred standard key codes that map to common key labels. The resource files for your environment determine what key sequences on your keyboard map to each Progress key label.

Progress key codes, key labels, and key functions are interrelated. Progress provides a set of built-in functions to convert from one keyboard event to another. The most portable way to specify keyboard events is to use high-level key function identifiers. For example, instead of using KEYLABEL, you can use the KEYFUNCTION function, which is portable across platforms. In place of F1 or F2, you can use the GO function key. See the Progress Programming Handbook for more information on Progress key translation functions.

Key Bindings on Windows (Graphical and Character)

Table 3–9 and Table 3–10 list the common key labels that are mapped to each Progress key function on Windows.

Table 3–9: Static Key Bindings on Windows (Graphical and Character) 
Key Function
Key Label
BACKSPACE
BACKSPACE
BACK-TAB
SHIFT-TAB
CURSOR-DOWN
CURSOR-DOWN
CURSOR-LEFT
CURSOR-LEFT
CURSOR-RIGHT
CURSOR-RIGHT
CURSOR-UP
CURSOR-UP
DELETE-CHARACTER
DEL
END
END
HOME
HOME
PAGE-DOWN
PAGE-DOWN
PAGE-UP
PAGE-UP
RETURN
ENTER
TAB
TAB

Table 3–10: User-definable Key Bindings on Windows (Graphical and Character)  
Key Function
Key Label
APPEND-LINE
No default
BLOCK
No default
BREAK-LINE
No default
CLEAR
No default
DEFAULT-POP-UP
SHIFT-F10
DELETE-LINE
No default
END-ERROR
ESC1
FIND
No default
GET
No default
GO
F21
HELP
F12
INSERT-MODE
INS
NEW-LINE
No default
NEXT-FRAME
F6
PREV-FRAME
SHIFT-F6
PUT
No default
RECALL
No default
  1. The ESC key is Windows specific; it is only a modifier key in UNIX
  2. The F1 and F2 keys are reversed in the Windows character client (F1=GO and F2 =HELP) but can be remapped.

NOTE: Certain keys such as ESC, HOME, and END (Windows specific, no functionality in UNIX) should not be used for porting.

You can change the user-definable key bindings by editing the [Keys] section (for graphical interfaces) or the [WinChar Keys] section (for character interfaces) of the registry or the progress.ini file. Use a single entry to create a key binding; additional entries for the same key function are ignored. Key binding entries have the following syntax:

SYNTAX
keyfunction=keylabel[,keylabel...] 

For example, the following entry maps the Help key function to the F2 and CTRL-H key labels, and the Go key function to the F1 and CTRL-X key label:

HELP=F2, CTRL-H
GO=F1, CTRL-X 

If you specify more than one key label, Progress uses the first instance where it needs to display a key label with a key function, as in “Enter data or press F1 to end.”

You can use any combination of CONTROL, SHIFT, and ALT keys. However, SHIFT only has an affect when used with ASCII keys.

Key Bindings in UNIX

Table 3–11 lists common key bindings in the PROTERMCAP file for UNIX character environments. The PROTERMCAP file maps key functions to key labels. Key bindings might differ for specific terminals.

Table 3–11: Progress PROTERMCAP Key Bindings
Key Function
Key Label
ABORT
CTRL-\
CTRL-ALT-DEL
APPEND-LINE
CTRL-A
BACKSPACE
BACKSPACE
CTRL-H
DEL-CHAR
BACK-TAB
BACK-TAB
CTRL-U
SHIFT-TAB
BELL
BELL
CTRL-G
BLOCK
CTRL-V
SELECT
BOTTOM-COLUMN
ESC-CTRL-B
BREAK-LINE
ESC-B
CANCEL-PICK
ESC-CTRL-X
CHOICES
ESC-CTRL-H
CLEAR
F8
CTRL-Z
CLOSE
ESC-Z
COMPILE
ESC-P
COPY
F11
ESC-C
CURSOR-DOWN
CURSOR-DOWN
CTRL-J
CURSOR-LEFT
CURSOR-LEFT
CTRL-O
CURSOR-RIGHT
CURSOR-RIGHT
CTRL-L
CURSOR-UP
CURSOR-UP
CTRL-K
CUT
F10
ESC-X
DEFAULT-POP-UP
ESC-U
DELETE-CHARACTER
DEL
DELETE-COLUMN
ESC-CTRL-Z
DELETE-END-LINE
ESC-K
DELETE-FIELD
ESC-CTRL-D
DELETE-LINE
CTRL-D
REMOVE
DELETE-WORD
ESC-D
EDITOR-BACKTAB
CTRL-B
EDITOR-TAB
CTRL-G
END
END
ESC ->
ESC-.
END-ERROR
F4
PF4
ESC
CTRL-E
ENTER-MENUBAR
F3
PF3
ESC-M
EXIT
ESC-Q
FIND
CTRL-F
FIND
FIND-NEXT
ESC-F
FIND-PREVIOUS
ESC-I
GET
F5
ESC-O
HELP
HELP
F2
ESC-?
PF2
HOME
HOME
ESC-H
ESC-h
ESC-<
ESC-,
INSERT-COLUMN
ESC-CTRL-N
INSERT-FIELD
ESC-CTRL-G
INSERT-FIELD-DATA
ESC-CTRL-F
INSERT-FIELD-LABEL
ESC-CTRL-E
INSERT-MODE
INS
F9
CTRL-T
CTRL-@
LEFT-END
ESC-LEFT-ARROW
MAIN-MENU
ESC-CTRL-M
MOVE
ESC-CTRL-V
NEW
ESC-N
NEW-LINE
CTRL-N
INSERT-HERE
NEXT-ERROR
ESC-E
NEXT-FRAME
ESC-CTRL-I
NEXT-WORD
CTRL-W
OPEN-LINE-ABOVE
ESC-L
OPTIONS
ESC-CTRL-O
PAGE-DOWN
PAGE-DOWN
ESC-CURSOR-DOWN
ESC-DOWN-ARROW
NEXT-PAGE
NEXT-SCRN
PAGE-LEFT
ESC-W
PAGE-RIGHT
ESC-Y
ESC-CTRL-J
PAGE-RIGHT-TEXT
ESC-CTRL-J
PAGE-UP
PAGE-UP
ESC-CURSOR-UP
ESC-UP-ARROW
PREV-PAGE
PREV-SCRN
PASTE
F12
ESC-V
PICK
ESC-CTRL-P
PICK-AREA
ESC-CTRL-W
PICK-BOTH
ESC-CTRL-Q
PREV-FRAME
ESC-CTRL-U
PREV-WORD
CTRL-P
PUT
F6
ESC-S
RECALL
F7
CTRL-R
REPLACE
ESC-R
REPORTS
ESC-CTRL-A
RESUME-DISPLAY
CTRL-Q
RETURN
RETURN
CTRL-M
RIGHT-END
ESC-CURSOR-RIGHT
ESC-RIGHT-ARROW
SAVE-AS
ESC-A
SCROLL-LEFT
ESC-CTRL-L
SCROLL-MODE
ESC-T
SCROLL-RIGHT
ESC-CTRL-R
SETTINGS
ESC-CTRL-@
STOP
CTRL-C
CTRL-BREAK
STOP-DISPLAY
CTRL-S
TAB
TAB
CTRL-I
TOP-COLUMN
ESC-CTRL-T

To change any of these mappings or create new ones, use the following syntax in the PROTERMCAP file:

SYNTAX
action(key-label)=code: 

action

The name of a key function.

key-label

The key label as it appears on the keyboard.

code

The characters transmitted when the key is pressed.

As in other sections of the PROTERMCAP file, string values are assigned using an equals sign (=) and the field is terminated with a colon (:). This field in a PROTERMCAP terminal entry defines F7 as transmitting a CTRL-A, followed by an uppercase F, followed by a carriage return, and associates use of F7 with the RECALL function:

RECALL(F7)=^AF\r: 

NOTE: If you create a control code sequence for a key beginning with CTRL that uses an existing Progress code sequence, you must assign a new code for that function. For example, if you specify CTRL-F in a control code sequence, you can no longer use CTRL-F for FIND. Map another key sequence to enable the FIND function.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095