XLookupString man page on HP-UX

Man page or keyword search:  
man Server   10987 pages
apropos Keyword Search (all sections)
Output format
HP-UX logo
[printable version]

XLookupString()						       XLookupString()

Name
  XLookupString	 – map a key event to ASCII string, keysym, and ComposeS‐
  tatus.

Synopsis
  int	XLookupString(event_structure,	  buffer_return,    bytes_buffer,
  keysym_return,
  status_in_out)
	XKeyEvent *event_structure;
	char *buffer_return;
	int bytes_buffer;
	KeySym *keysym_return;
	XComposeStatus *status_in_out;		/* may not be implemented
     */

Arguments
  event_structure
	    Specifies the key event to be used.

  buffer_return
	    Returns the resulting string (not NULL-terminated).	 Returned
	    value of the function is the length of the string.

  bytes_buffer
	    Specifies  the length of the buffer.  No more than bytes_buf‐
	    fer of translation are returned.

  keysym_return
	    If this argument is not NULL, it specifies the keysym ID com‐
	    puted from the event.

  status_in_out
	    Specifies  the XComposeStatus structure that contains compose
	    key state information and that allows the  compose	key  pro‐
	    cessing to take place.  This can be NULL if the caller is not
	    interested in seeing compose key sequences.	 Not  implemented
	    in X Consortium Xlib through Release 5.

Returns
  Length of string in buffer_return argument.

Description
  XLookupString()  gets	 an  ASCII string and a keysym that are currently
  mapped to the keycode in a KeyPress or KeyRelease event, using the mod‐
  ifier	 bits in the key event to deal with shift, lock and control.  The
  XLookupString() return value is the length of the translated string and
  the  string's	 bytes	are copied into buffer_return.	The length may be
  greater than 1 if the event's keycode translates into a keysym that was
  rebound with XRebindKeysym().

  Note that the string returned in buffer is not NULL-terminated.  If you
  need a NULL-terminated string, copy buffer into another string as  fol‐
  lows:

     len = XLookupString((XKeyEvent *)event, buffer, 10, nil, nil);
     if (len)
	 (void) strncat (cmd_buf, buffer, len);

  The  compose	status.in.out  is not implemented in any release of the X
  Consortium version of Xlib through Release 5.

  In Release 4, XLookupString() implements the new  concept  of	 keyboard
  groups.   Keyboard  groups  support having two complete sets of keysyms
  for a keyboard.  Which set will be used can be toggled using a particu‐
  lar  key.   This  is	implemented by using the first two keysyms in the
  list for a key as one set, and the next two keysyms as the second  set.
  For  more  information  on keyboard groups, see Volume One, Appendix G,
  Release Notes.

  For more information on using XLookupString() in  general,  see  Volume
  One, Chapter 9, The Keyboard and Pointer.

Structures
     /*
      * Compose sequence status.in.out structure, used in calling XLookupString.
      */
     typedef struct _XComposeStatus {
	 char *compose_ptr;	   /* state table pointer */
	 int chars_matched;	   /* match state */
     } XComposeStatus;

     typedef struct {
	 int type;		   /* of event */
	 unsigned long serial;	   /* # of last request processed by server */
	 Bool send_event;	   /* true if this came from a SendEvent request */
	 Display *display;	   /* Display the event was read from */
	 Window window;		   /* "event" window it is reported relative to */
	 Window root;		   /* root window that the event occured on */
	 Window subwindow;	   /* child window */
	 Time time;		   /* milliseconds */
	 int x, y;		   /* pointer x, y coordinates in event window */
	 int x_root, y_root;	   /* coordinates relative to root */
	 unsigned int state;	   /* key or button mask */
	 unsigned int keycode;	   /* detail */
	 Bool same_screen;	   /* same screen flag */
     } XKeyEvent;

See Also
  XChangeKeyboardMapping(),	XDeleteModifiermapEntry(),     XFreeModi‐
  fiermap(), XGetKeyboardMapping(),  XGetModifierMapping(),  XInsertModi‐
  fiermapEntry(),    XKeycodeToKeysym(),   XKeysymToKeycode(),	 XKeysym‐
  ToString(), XLookupKeysym(),	XNewModifiermap(),  XQueryKeymap(),  XRe‐
  bindKeysym(),	    XRefreshKeyboardMapping(),	   XSetModifierMapping(),
  XStringToKeysym().

Xlib - Keyboard						       XLookupString()
[top]

List of man pages available for HP-UX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net