Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XRefreshKeyboardMapping(3X) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XButtonEvent(3X)

XMapEvent(3X)

XStringToKeysym(3X)




XLookupKeysym(3X) XLookupKeysym(3X)
NAME XLookupKeysym, XRefreshKeyboardMapping, XLookupString, XRebindKeySym - handle keyboard input events SYNOPSIS KeySym XLookupKeysym (key-event, index) XKeyEvent *key-event; int index; XRefreshKeyboardMapping(event-map) XMappingEvent *event-map; int XLookupString (event-struct, buffer-return, bytes-buffer, keysym-return, status-return) XKeyEvent *event-struct; char *buffer-return; int bytes-buffer; KeySym *keysym-return; XComposeStatus *status-return; XRebindKeysym (display, keysym, list, mod-count, string, bytes-string) Display *display; KeySym keysym; KeySym *list; int mod-count; unsigned char *string; int bytes-string; DESCRIPTION The XLookupKeysym function uses a given keyboard event and the specified index to return the keysym from the list that corresponds to the keycode member in the XKeyPressedEvent or XKeyReleasedEvent structure. If no keysym is defined for the keycode of the event, XLookupKeysym returns NoSymbol. The XRefreshKeyboardMapping function refreshes the stored modifier and keymap information. You can usually call this function when a MappingNotify event with a request member of MappingKeyboard or MappingModifier occurs. Xlib's knowledge of the keyboard is updated. The XLookupString function translates a key event to a keysym and a string. The keysym is obtained by using the standard interpretation of the Shift, Lock, and group modif- iers as defined in X Window System Protocol Specification. If the keysym has been rebound (see XRebindKeysym), the bound string is stored in the buffer. Otherwise, the keysym is mapped, if possible, to an ISO Latin-1 character or (if the Control modifier is on) to an ASCII control character, and that character is stored in the buffer. November, 1990 1



XLookupKeysym(3X) XLookupKeysym(3X)
If present and not NULL , the XComposeStatus structure records the state, which is private to Xlib, that needs preservation across calls to XLookupString to implement com- pose processing. XLookupString returns the number of char- acters that are stored in the buffer. The XRebindKeysym function can be used to rebind the meaning of a keysym for the client. It does not redefine any key in the X server but merely provides an easy way for long strings to be attached to keys. XLookupString returns this string when the appropriate set of modifier keys are pressed and when the keysym would have been used for the transla- tion. Note that you can bind a keysym that may not exist. Arguments These functions accept the following arguments: buffer-return Returns the translated characters. bytes-buffer Specifies the length of the buffer. No more than bytes-buffer of translation are returned. bytes-string Specifies the string length. display Specifies the connection to the X server. event-map Specifies the mapping event to be used. event-struct Specifies the key event structure to be used. You can pass XKeyPressedEvent or XKeyReleasedEvent. index Specifies the index into the keysym table to get the event's keycode. key-event Specifies the key event to be used. This event is either a KeyPress event or a KeyRelease event. keysym Specifies the keysym to be rebound. keysym-return If this argument is not null, returns the keysym computed from the event. list Specifies a pointer to an array of keysyms that are being used as modifiers. 2 November, 1990



XLookupKeysym(3X) XLookupKeysym(3X)
mod-count Specifies the number of modifiers in the modifier list. status-return Specifies either a pointer to the XCompose structure that is to contain compose key state information and that allows compose key processing to take place, or NULL. string Specifies a pointer to the string that is to be re- turned by XLookupString. SEE ALSO XButtonEvent(3X), XMapEvent(3X), XStringToKeysym(3X) X Window System Protocol Specification
Xlib - C Language Interface
November, 1990 3

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