Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XtConvertCase(1)

XtGetKeysymTable(1)

XtKeysymToKeycodeList(1)

XtRegisterCaseConverter(1)

XtTranslateKeycode(1)

XtTranslateKey(1)

XtKeyProc(2)

NAME

XtSetKeyTranslator − register a key translator. 

Synopsis

void XtSetKeyTranslator(display, proc)

    Display *display;
    XtKeyProc proc;

Inputs

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.  See XtKeyProc(2) for an explanation of the responsibilities of a key translator procedure. 

Usage

The key translator procedure is called by the Translation Manager to convert incoming keycodes and modifier bits to keysyms.  The only reason you would have to write and install your own key translator procedure is if you were working with non-standard keysyms.  The only way to remove a translator is to register a new one.  For example, the default key translator (XtTranslateKey()) can be explicitly reinstalled. 

See Also

XtConvertCase(1), XtGetKeysymTable(1), XtKeysymToKeycodeList(1), XtRegisterCaseConverter(1), XtTranslateKeycode(1), XtTranslateKey(1),
XtKeyProc(2). 

Copyright O’Reilly & Assoc.  —  X Toolkit Intrinsics Reference Manual © O’Reilly & Associates

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026