Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xgetkeyboab(3) [hpux man page]

XGetKeyboardMapping()													     XGetKeyboardMapping()

Name
  XGetKeyboardMapping - return symbols for keycodes.

Synopsis
  KeySym *XGetKeyboardMapping(display, first_keycode, keycode_count,
	    keysyms_per_keycode_return)
	Display *display;
	KeyCode first_keycode;
	int keycode_count;
	int *keysyms_per_keycode_return;

Arguments
  display  Specifies a connection to an X server; returned from XOpenDisplay().

  first_keycode
	   Specifies the first keycode that is to be returned.

  keycode_count
	   Specifies the number of keycodes that are to be returned.

  keysyms_per_keycode_return
	   Returns the number of keysyms per keycode.

Returns
  The list of KeySyms.

Description
  Starting  with  first_keycode, XGetKeyboardMapping() returns the symbols for the specified number of keycodes.  The specified first_keycode
  must be greater than or equal to min_keycode as returned by XDisplayKeycodes(), otherwise a BadValue error occurs.  In addition,  the  fol-
  lowing  expression  must  be	less than or equal to max_keycode (also returned by XDisplayKeycodes()) as returned in the Display structure,
  otherwise a BadValue error occurs:

       first_keycode + keycode_count - 1

  The number of elements in the keysyms list is:

       keycode_count * keysyms_per_keycode_return

  Then, keysym number N (counting from 0) for keycode K has an index (counting from 0) of the following (in keysyms):

       (K - first_keycode) * keysyms_per_keycode_return + N

  The keysyms_per_keycode_return value is chosen arbitrarily by the server to be large enough to report all  requested	symbols.   A  special
  KeySym value of NoSymbol is used to fill in unused elements for individual keycodes.

  Use XFree() to free the returned keysym list when you no longer need it.

  For more information, see Volume One, Chapter 9, The Keyboard and Pointer.

Errors
  BadValue  first_keycode less than display->min_keycode.
	    display->max_keycode exceeded.

See Also
  XChangeKeyboardMapping(),    XDeleteModifiermapEntry(),   XFreeModifiermap(),   XGetModifierMapping(),   XInsertModifiermapEntry(),	XKey-
  codeToKeysym(), XKeysymToKeycode(), XKeysymToString(), XLookupKeysym(), XLookupString(),  XNewModifierMap,  XQueryKeymap(),  XRebindKeySym,
  XRefreshKeyboardMapping(), XSetModifierMapping(), XStringToKeysym().

Xlib - Keyboard 													     XGetKeyboardMapping()

Check Out this Related Man Page

XChangeKeyboardMapping()												  XChangeKeyboardMapping()

Name
  XChangeKeyboardMapping - change the keyboard mapping.

Synopsis
  XChangeKeyboardMapping(display, first_keycode,
  keysyms_per_keycode, keysyms, num_codes)
	Display *display;
	int first_keycode;
	int keysyms_per_keycode;
	KeySym *keysyms;
	int num_keycodes;

Arguments
  display  Specifies a connection to an X server; returned from XOpenDisplay().

  first_keycode
	   Specifies the first keycode that is to be changed.

  keysyms_per_keycode
	   Specifies the number of keysyms that the caller is supplying for each keycode.

  keysyms  Specifies a pointer to the list of keysyms.

  num_keycodes
	   Specifies the number of keycodes that are to be changed.

Description
  Starting  with  first_keycode, XChangeKeyboardMapping() defines the keysyms for the specified number of keycodes.  The symbols for keycodes
  outside   this   range   remain   unchanged.	  The	number	 of    elements    in	 the	keysyms    list    must    be	 keysyms_per_
  keycode * num_keycodes (else a BadValue error).  The specified first_keycode must be greater than or equal to min_keycode returned by XDis-
  playKeycodes() (see Appendix C, Macros) or a BadValue error results.	In addition, the following expression must be less than or  equal  to
  max_keycode as returned by XDisplayKeycodes(), or a BadValue error results:

     first_keycode + num_keycodes  - 1

  The keysym number N (counting from 0) for keycode K has the following index in the keysyms array (counting from 0):

     (K - first_keycode) * keysyms_per_keycode + N

  The specified keysyms_per_keycode can be chosen arbitrarily by the client to be large enough to hold all desired symbols.  A special keysym
  value of NoSymbol should be used to fill in unused elements for individual keycodes.	It is legal for NoSymbol  to  appear  in  nontrailing
  positions of the effective list for a keycode.

  XChangeKeyboardMapping() generates a MappingNotify event, sent to this and all other clients, since the keycode to keysym mapping is global
  to all clients.

Errors
  BadAlloc

  BadValue  first.keycode less than display->min_keycode.
	    display->max_keycode exceeded (see above).

See Also
  XDeleteModifiermapEntry(), XFreeModifiermap(), XGetKeyboardMapping(), XGetModifierMapping(), XInsertModifiermapEntry(), XKeycodeToKeysym(),
  XKeysymToKeycode(),  XKeysymToString(),  XLookupKeysym(),  XLookupString(),  XNewModifierMap,  XQueryKeymap(),  XRebindKeySym, XRefreshKey-
  boardMapping(), XSetModifierMapping(), XStringToKeysym().

Xlib - Keyboard 													  XChangeKeyboardMapping()
Man Page