Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XtTranslatB(3) — OSF1 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XtRegisterCaseConverter(1)

XtSetKeyTranslator(1)

XtTranslateKeycode(1)

XtKeyProc(2)

 

Name

XtTranslateKey — the default keycode-to-keysym translator. 

Synopsis

void XtTranslateKey(display, keycode, modifiers,
modifiers_return, keysym_return)

    Display ∗display;
    KeyCode keycode;
    Modifiers modifiers;
    Modifiers ∗modifiers_return;
    KeySym ∗keysym_return;

Arguments

displaySpecifies the display that the keycode is from. 

keycodeSpecifies the keycode to translate. 

modifiersSpecifies the modifiers to be applied to the keycode. 

modifiers_return
Returns a mask that indicates the modifiers actually used to generate the keysym (an AND of modifiers and any default modifiers applied by the currently registered translator). 

keysym_return
Returns the resulting keysym.

Description

XtTranslateKey is the default XtKeyProc.  It takes a keycode and returns the corresponding keysym, recognizing Shift and Lock modifiers.  XtTranslateKey is provided for two main reasons: so that new translators with expanded functionality can call it to get default keycode-to-keysym translations in addition to whatever they add, and so that the default translator can be reinstalled. 

The default key translator can be invoked directly by calling XtTranslateKeycode.  A new translator can be registered by calling XtSetKeyTranslator.  There is no way to remove a translator; to reinstall the default behavior, call XtSetKeyTranslator with XtTranslateKey as the proc argument. 

Structures

typedef unsigned int Modifiers; Modifiers will be made up of the bitwise OR of the following masks:

ShiftMaskShift key was depressed. 

LockMaskCaps Lock key was depressed. 

ControlMaskControl key was depressed. 

Mod1MaskKey defined as Mod1 was depressed. 

. 
.
.

Mod5MaskKey defined as Mod5 was depressed. 

StandardMask(ShiftMask | LockMask). 

See Also

XtRegisterCaseConverter(1), XtSetKeyTranslator(1), XtTranslateKeycode(1),
XtKeyProc(2). 

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