Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XLookupKeysym(3X11)

XStringToKeysym(3X11)  —  MIT X11R4

Name

XStringToKeysym, XKeysymToString, XKeycodeToKeysym, XKeysymToKeycode − convert keysyms

Syntax

KeySym XStringToKeysym(string)
   char *string;

char *XKeysymToString(keysym)
   KeySym keysym;

KeySym XKeycodeToKeysym(display, keycode, index)
   Display *display;
   KeyCode keycode;
   int index;

KeyCode XKeysymToKeycode(display, keysym)
   Display *display;
   KeySym keysym;

Arguments

displaySpecifies the connection to the X server. 

indexSpecifies the element of KeyCode vector. 

keycodeSpecifies the KeyCode. 

keysymSpecifies the KeySym that is to be searched for or converted. 

stringSpecifies the name of the KeySym that is to be converted. 

Description

Valid KeySym names are listed in <X11/keysymdef.h> by removing the XK_ prefix from each name. If the specified string does not match a valid KeySym, XStringToKeysym returns NoSymbol.

The returned string is in a static area and must not be modified.  If the specified KeySym is not defined, XKeysymToString returns a NULL.

The XKeycodeToKeysym function uses internal Xlib tables and returns the KeySym defined for the specified KeyCode and the element of the KeyCode vector. If no symbol is defined, XKeycodeToKeysym returns NoSymbol.

If the specified KeySym is not defined for any KeyCode, XKeysymToKeycode returns zero.

See Also

XLookupKeysym(3X11)
X Window System: The Complete Reference, Second Edition, Robert W. Scheifler and James Gettys

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