Navigation: Language Reference > 13 - Built-in Functions >====== ALIAS (set alternate keycode) ====== | |
ALIAS( [keycode,[new keycode] ] )
ALIAS | Changes the keycode generated when the original key is pressed. |
keycode | A numeric keycode or keycode EQUATE. If both parameters are omitted, all ALIASed keys are reset to their original values. |
new keycode | A numeric keycode or keycode EQUATE. If omitted, the keycode is reset to its original value. |
ALIAS changes the keycode to generate the new keycode when the user presses the original key. ALIAS does not affect keypresses generated by PRESSKEY. The effect of ALIAS is global, throughout all execution threads, no matter where the ALIAS statement executes. Therefore, to only change the keycode locally, you must reset ALIASed keys when the window loses focus.
Keycode values 0800h through 0FFFFh are unassigned and may be used as a new keycode. The practical effect of this is to disable the original key if your program does not test for the new keycode.
Example:
ALIAS(EnterKey,TabKey) !Allow user to press enter instead of tab
ALIAS(F3Key,F1Key) !Move help to F3
ALIAS !Clear all aliased keys
See Also: