U_EDITKEYS

Edit a key map

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
xcall U_EDITKEYS([help_id])

help_id

(optional) The help identifier. (a)

U_EDITKEYS enables the user to create or modify the key map definitions for any terminal type. This subroutine is used by Proto to support the “Key mapping” function.

On Windows, shortcut keys are mapped to a native Windows accelerator table to enable their use. The key mapping function available through Proto or U_EDITKEYS has an effect only on the shortcut text displayed in the menus. The actual keystrokes required for each function code are fixed, and are reflected in the MSWINDOWS key map.

The current key map is initially loaded when you call U_EDITKEYS. Changes made to the current key map take effect after U_EDITKEYS returns.

Refer to Customizing key mapping for menu shortcuts for information on editing key maps.

This subroutine recognizes the following menu entry names if they are included in a placed menu column.

O_ACCEPT

Accept the shortcut sequence directly.

O_CANCEL

Cancel changes.

O_CHGTERM

Change which terminal key map is being modified.

O_COPYTERM

Copy a terminal key map definition.

O_DELTERM

Delete a terminal key map definition.

O_EXIT

Exit and save all changes.

O_HELP

Call the EHELP_METHOD subroutine and pass help_id.

S_UP

Move to the previous selection window item.

S_DOWN

Move to the next selection window item.

S_LEFT

Move to the selection item in the previous column.

S_RIGHT

Move to the selection item in the next column.

Any other menu entries cause U_EDITKEYS to return with g_select set to true and g_entnam set to the selected menu entry.

On Windows, U_EDITKEYS cannot time out.

On Unix and OpenVMS, if a time-out occurs, g_select is set to true and g_entnam is set to the entry name specified in tkctl.def for g_time_entry. See g_time_entry.

The following subroutine provides the entire “Key mapping” utility included in Proto.

subroutine keymap
.include "WND:tools.def"
record
       colid  ,i4
proc
       xcall e_enter                          ;Enter new environment
       xcall m_column(D_REMOVE, D_LOCAL)      ;Remove all local columns
       xcall m_ldcol(colid, g_utlib, "c_editkeys");Load key editing column
       xcall m_defcol(9)                      ;Make it default column
       xcall u_editkeys                       ;Call edit routine
       xcall e_exit                           ;Exit environment
       xreturn
endsubroutine