(LOGO.JPG) Python for OpenVMS

(go to: table of contents, index, list of vms_smg, prev: INVALIDATE_DISPLAY, next: LABEL_BORDER)


KEYCODE_TO_NAME - Translate a Key Code into a Key Name

Translate the key code of a key on the keyboard into its associated key name. The opposite function is vms_smg.name_to_keycode().

Format:

    key_name = vms_smg.keycode_to_name (key_code)
Returns:
key_name
The name of the key into which key_code is to be translated. key_name is simply the name of the key (for example, COMMA, PERIOD, KP4, and so forth).
Arguments:
key_code
The key code to translate into a key name. Symbolic names like SMG_K_TRM_PF2 are in module 'vms_smgdef'.
Examples:
>>> import vms_smg
>>> import vms_smgdef

>>> print vms_smg.keycode_to_name (vms_smgdef.SMG_K_TRM_PF2)
PF2
>>>

----------------------------------------

>>> print vms_smg.keycode_to_name (-1)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
ValueError: argument 1: key_code - must be between 0..65535
>>>

>>> print vms_smg.keycode_to_name (30000)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
vms_smg.error: (1213466, '%SMG-E-INVKEYNAM, invalid key name')
>>>

(go to: table of contents, index, list of vms_smg, prev: INVALIDATE_DISPLAY, next: LABEL_BORDER)

10-SEP-2000 ZE.