14.4.3 Using Keycodes and Keysyms

The following paragraphs describe the CLX functions used to:



keycode->keysym display keycode keysym-index Function
        
display
A display.
keycode
A card8.
keysym-index
A card8.

Returns the keysym at the given keysym-index from the keysym list for the keycode in the current keyboard mapping for the display server. This function was called keycode-keysym in X11R4 and older versions of CLX.

keysym
Type keysym.


keysym->character display keysym &optional (state 0) Function
        
display
A display.
keysym
A keysym.
state
A mask16.

Returns the character associated with the keysym and the state. The state is a mask16 bit mask representing the state of the display modifier keys and pointer buttons. See state-mask-key in paragrpah 1.6, Data Types. If the keysym does not represent a Common Lisp character, then nil is returned. This function was called keysym-character in X11R4 and older versions of CLX.

The state determines the bits attribute of the returned character, as follows:

:control char-control-bit
:mod-1 char-meta-bit
:mod-2 char-super-bit
:mod-3 char-hyper-bit
character
Type character or null.