


XLookupKeysym(3X11)					  XLookupKeysym(3X11)
X11R5									X11R5



NAME
  XLookupKeysym, XRefreshKeyboardMapping, XLookupString, XRebindKeySym - han-
  dle keyboard input events in Latin-1

SYNTAX
  KeySym XLookupKeysym(_k_e_y__e_v_e_n_t, _i_n_d_e_x)
	XKeyEvent *_k_e_y__e_v_e_n_t;
	int _i_n_d_e_x;

  XRefreshKeyboardMapping(_e_v_e_n_t__m_a_p)
	XMappingEvent *_e_v_e_n_t__m_a_p;

  int XLookupString(_e_v_e_n_t__s_t_r_u_c_t, _b_u_f_f_e_r__r_e_t_u_r_n, _b_y_t_e_s__b_u_f_f_e_r, _k_e_y_s_y_m__r_e_t_u_r_n,
  _s_t_a_t_u_s__i_n__o_u_t)
	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;

  XRebindKeysym(_d_i_s_p_l_a_y, _k_e_y_s_y_m, _l_i_s_t, _m_o_d__c_o_u_n_t, _s_t_r_i_n_g, _n_u_m__b_y_t_e_s)
	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 Key-
	    Code.

  _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 searched	for.

  _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 Key-
  Code 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 key-
  map 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 Shift,
  Lock,	and group 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 con-
  trol 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	delim off

















