NAME
XLookupKeysym, XRefreshKeyboardMapping, XLookupString, XRebindKeysym - handle keyboard input events in Latin-1
SYNTAX
KeySym XLookupKeysym(XKeyEvent *_k_e_y___e_v_e_n_t, int _i_n_d_e_x);
int XRefreshKeyboardMapping(XMappingEvent *_e_v_e_n_t___m_a_p);
int XLookupString(XKeyEvent *_e_v_e_n_t___s_t_r_u_c_t, char
*_b_u_f_f_e_r___r_e_t_u_r_n, int _b_y_t_e_s___b_u_f_f_e_r, KeySym
*_k_e_y_s_y_m___r_e_t_u_r_n, XComposeStatus *_s_t_a_t_u_s___i_n___o_u_t);
int XRebindKeysym(Display *_d_i_s_p_l_a_y, KeySym _k_e_y_s_y_m, KeySym
_l_i_s_t[], int _m_o_d___c_o_u_n_t, unsigned char *_s_t_r_i_n_g, int
_n_u_m___b_y_t_e_s);
ARGUMENTS
-
_b_u_f_f_e_r___r_e_t_u_r_n
Returns the translated characters.
-
-
_b_y_t_e_s___b_u_f_f_e_r
Specifies the length of the buffer.
-
No more than bytes_buffer of translation are returned.
-
_n_u_m___b_y_t_e_s
Specifies the number of bytes in the string argument.
-
-
_d_i_s_p_l_a_y
Specifies the connection to the X server.
-
-
_e_v_e_n_t___m_a_p
Specifies the mapping event that is to be used.
-
-
_e_v_e_n_t___s_t_r_u_c_t
Specifies the key event structure to be used.
-
You can pass
_X_K_e_y_P_r_e_s_s_e_d_E_v_e_n_t
or
_X_K_e_y_R_e_l_e_a_s_e_d_E_v_e_n_t.
-
_i_n_d_e_x
Specifies the index into the KeySyms list for the event's KeyCode.
-
-
_k_e_y___e_v_e_n_t
Specifies the
-
_K_e_y_P_r_e_s_s
or
_K_e_y_R_e_l_e_a_s_e
event.
-
_k_e_y_s_y_m
Specifies the KeySym that is to be .mode-bold-on
-
(
)
-
_k_e_y_s_y_m___r_e_t_u_r_n
Returns the KeySym computed from the event if this argument is not NULL.
-
-
_l_i_s_t
Specifies the KeySyms to be used as modifiers.
-
-
_m_o_d___c_o_u_n_t
Specifies the number of modifiers in the modifier list.
-
-
_s_t_a_t_u_s___i_n___o_u_t
Specifies or returns the
-
_X_C_o_m_p_o_s_e_S_t_a_t_u_s
structure or NULL.
-
_s_t_r_i_n_g
Specifies the string that is copied and will be returned by
-
_X_L_o_o_k_u_p_S_t_r_i_n_g.
DESCRIPTION
The
_X_L_o_o_k_u_p_K_e_y_s_y_m
function uses a given keyboard event and the index you specified to return
the KeySym from the list that corresponds to the KeyCode member in the
_X_K_e_y_P_r_e_s_s_e_d_E_v_e_n_t
or
_X_K_e_y_R_e_l_e_a_s_e_d_E_v_e_n_t
structure.
If no KeySym is defined for the KeyCode of the event,
_X_L_o_o_k_u_p_K_e_y_s_y_m
returns
_N_o_S_y_m_b_o_l.
The
_X_R_e_f_r_e_s_h_K_e_y_b_o_a_r_d_M_a_p_p_i_n_g
function refreshes the stored modifier and keymap information.
You usually call this function when a
_M_a_p_p_i_n_g_N_o_t_i_f_y
event with a request member of
_M_a_p_p_i_n_g_K_e_y_b_o_a_r_d
or
_M_a_p_p_i_n_g_M_o_d_i_f_i_e_r
occurs.
The result is to update Xlib's knowledge of the keyboard.
The
_X_L_o_o_k_u_p_S_t_r_i_n_g
function translates a key event to a KeySym and a string.
The KeySym is obtained by using the standard interpretation of the
_S_h_i_f_t,
_L_o_c_k,
group, and numlock modifiers as defined in the X Protocol specification.
If the KeySym has been rebound (see
_X_R_e_b_i_n_d_K_e_y_s_y_m),
the bound string will be 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.
_X_L_o_o_k_u_p_S_t_r_i_n_g
returns the number of characters that are stored in the buffer.
If present (non-NULL),
the
_X_C_o_m_p_o_s_e_S_t_a_t_u_s
structure records the state,
which is private to Xlib,
that needs preservation across calls to
_X_L_o_o_k_u_p_S_t_r_i_n_g
to implement compose processing.
The creation of
_X_C_o_m_p_o_s_e_S_t_a_t_u_s
structures is implementation-dependent;
a portable program must pass NULL for this argument.
The
_X_R_e_b_i_n_d_K_e_y_s_y_m
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.
_X_L_o_o_k_u_p_S_t_r_i_n_g
returns this string when the appropriate set of
modifier keys are pressed and when the KeySym would have been used for
the translation.
No text conversions are performed;
the client is responsible for supplying appropriately encoded strings.
Note that you can rebind a KeySym that may not exist.
SEE ALSO
XButtonEvent(3X11),
XMapEvent(3X11),
XStringToKeysym(3X11)
_X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e