Name
XtSetKeyTranslator — register a key translator.
Synopsis
void XtSetKeyTranslator(display, proc)
Display ∗display;
XtKeyProc proc;
Arguments
displaySpecifies the display from which to translate the events.
procSpecifies the procedure that is to perform key translations.
Description
XtSetKeyTranslator registers the specified procedure as the current key translator. The default translator is XtTranslateKey, an XtKeyProc that uses the Shift, Lock, and group modifiers with the interpretations defined by the X11 protocol. XtTranslateKey is provided so that new translators can call it to get default keycode-to-keysym translations and so that the default translator can be reinstalled.
The only way to remove a translator is to register a new one. For example, the default key translator (XtTranslateKey) can be explicitly reinstalled. Another approach to deleting a converter would be for an application to register an identity translator that simply copied the input keysym to both output keysyms.
For a more detailed discussion of processing keyboard input, see Chapter 13, Miscellaneous Toolkit Programming Techniques, in Volume Four, X Toolkit Intrinsics Programming Manual.
See Also
XtConvertCase(1), XtGetKeysymTable(1), XtKeysymToKeycodeList(1), XtRegisterCaseConverter(1), XtTranslateKeycode(1), XtTranslateKey(1),
XtKeyProc(2).