1XLookupKeysym(3)                XLIB FUNCTIONS                XLookupKeysym(3)
2
3
4

NAME

6       XLookupKeysym, XRefreshKeyboardMapping, XLookupString, XRebindKeysym -
7       handle keyboard input events in Latin-1
8

SYNTAX

10       KeySym XLookupKeysym(XKeyEvent *key_event, int index);
11
12       int XRefreshKeyboardMapping(XMappingEvent *event_map);
13
14       int XLookupString(XKeyEvent *event_struct, char *buffer_return, int
15              bytes_buffer, KeySym *keysym_return, XComposeStatus *sta‐
16              tus_in_out);
17
18       int XRebindKeysym(Display *display, KeySym keysym, KeySym list[], int
19              mod_count, unsigned char *string, int num_bytes);
20

ARGUMENTS

22       buffer_return
23                 Returns the translated characters.
24
25       bytes_buffer
26                 Specifies the length of the buffer.  No more than bytes_buf‐
27                 fer of translation are returned.
28
29       num_bytes Specifies the number of bytes in the string argument.
30
31       display   Specifies the connection to the X server.
32
33       event_map Specifies the mapping event that is to be used.
34
35       event_struct
36                 Specifies the key event structure to be used.  You can pass
37                 XKeyPressedEvent or XKeyReleasedEvent.
38
39       index     Specifies the index into the KeySyms list for the event's
40                 KeyCode.
41
42       key_event Specifies the KeyPress or KeyRelease event.
43
44       keysym    Specifies the KeySym that is to be .
45
46       keysym_return
47                 Returns the KeySym computed from the event if this argument
48                 is not NULL.
49
50       list      Specifies the KeySyms to be used as modifiers.
51
52       mod_count Specifies the number of modifiers in the modifier list.
53
54       status_in_out
55                 Specifies or returns the XComposeStatus structure or NULL.
56
57       string    Specifies the string that is copied and will be returned by
58                 XLookupString.
59

DESCRIPTION

61       The XLookupKeysym function uses a given keyboard event and the index
62       you specified to return the KeySym from the list that corresponds to
63       the KeyCode member in the XKeyPressedEvent or XKeyReleasedEvent struc‐
64       ture.  If no KeySym is defined for the KeyCode of the event, XLookup‐
65       Keysym returns NoSymbol.
66
67       The XRefreshKeyboardMapping function refreshes the stored modifier and
68       keymap information.  You usually call this function when a MappingNo‐
69       tify event with a request member of MappingKeyboard or MappingModifier
70       occurs.  The result is to update Xlib's knowledge of the keyboard.
71
72       The XLookupString function translates a key event to a KeySym and a
73       string.  The KeySym is obtained by using the standard interpretation of
74       the Shift, Lock, group, and numlock modifiers as defined in the X Pro‐
75       tocol specification.  If the KeySym has been rebound (see XRebind‐
76       Keysym), the bound string will be stored in the buffer.  Otherwise, the
77       KeySym is mapped, if possible, to an ISO Latin-1 character or (if the
78       Control modifier is on) to an ASCII control character, and that charac‐
79       ter is stored in the buffer.  XLookupString returns the number of char‐
80       acters that are stored in the buffer.
81
82       If present (non-NULL), the XComposeStatus structure records the state,
83       which is private to Xlib, that needs preservation across calls to
84       XLookupString to implement compose processing.  The creation of XCom‐
85       poseStatus structures is implementation-dependent; a portable program
86       must pass NULL for this argument.
87
88       The XRebindKeysym function can be used to rebind the meaning of a
89       KeySym for the client.  It does not redefine any key in the X server
90       but merely provides an easy way for long strings to be attached to
91       keys.  XLookupString returns this string when the appropriate set of
92       modifier keys are pressed and when the KeySym would have been used for
93       the translation.  No text conversions are performed; the client is
94       responsible for supplying appropriately encoded strings.  Note that you
95       can rebind a KeySym that may not exist.
96

SEE ALSO

98       XButtonEvent(3), XMapEvent(3), XStringToKeysym(3), XkbLookupKeySym(3),
99       XkbRefreshKeyboardMapping(3), XmbLookupString(3), XwcLookupString(3),
100       Xutf8LookupString(3), Compose(5)
101       Xlib - C Language X Interface
102
103
104
105X Version 11                     libX11 1.6.4                 XLookupKeysym(3)
Impressum