Next Prev Up

12.12.3 Keyboard and Pointer State Events

The keyboard and pointer state events are :keymap-notify and :mapping-notify.


:keymap-notify Event Type
     
Selected by:
:keymap-state.

The :keymap-notify event returns the current state of the keyboard. :keymap-notify is generated immediately after every :enter-notify and :focus-in .

window, event-window
Type window. The window receiving an :enter-notify or :focus-in event.
keymap
Type (bit-vector 256). A bit-vector containing the logical state of the keyboard. Each bit set to 1 indicates that the corresponding key is currently pressed. The vector is represented as 32 bytes. For n from 0 to 7, byte n (from 0) contains the bits for keys 8n to 8n +7, with the least significant bit in the byte representing key 8n.

:mapping-notify Event Type
     

The X server reports :mapping-notify events to all clients. There is no mechanism to express disinterest in this event. The X server generates this event type whenever a client application calls one of the following:

  • set-modifier-mapping to indicate which keycodes to use as modifiers (the status reply must be :mapping-success )
  • change-keyboard-mapping to change the keyboard mapping
  • set-pointer-mapping to set the pointer mapping (the status reply must be :mapping-success)
request
Type (member :modifier :keyboard :pointer). Indicates the kind of change that occurred--:modifier for a successful set-modifier-mapping, :keyboard for a successful change-keyboard-mapping, and :pointer for a successful set-pointer-mapping.
start
Type card8. If request is :keyboard, then start and count indicate the range of altered keycodes.
count
Type card8. If request is :keyboard, then start and count indicate the range of altered keycodes.

Next Prev Up
© 1988, 1989 Texas Instruments Incorporated
Conversion to HTML made by Gilbert Baumann.
Last build: Tue Dec 16 23:30:42 1997