gnu.x11
Class Input

java.lang.Object
  extended by gnu.x11.Input

public class Input
extends java.lang.Object

X keyboard and pointer.


Nested Class Summary
 class Input.InputFocusInfo
          Reply of input_focus()
static class Input.KeyboardControl
          X keyboard control.
 class Input.KeyboardControlInfo
          Reply of keyboard_control()
 class Input.ModifierMapping
           
 class Input.PointerControlInfo
          Reply of pointer_control().
 
Field Summary
static int ALT_MASK
           
static int ASYNC_BOTH
           
static int ASYNC_KEYBOARD
           
static int ASYNC_POINTER
           
static int BUSY
           
static int BUTTON1
           
static int BUTTON1_MASK
           
static int BUTTON2
           
static int BUTTON2_MASK
           
static int BUTTON3
           
static int BUTTON3_MASK
           
static int BUTTON4
           
static int BUTTON4_MASK
           
static int BUTTON5
           
static int BUTTON5_MASK
           
static int CONTROL_MASK
           
 Display display
           
static int FAILED
           
static java.lang.String[] KEYBUT_STRINGS
           
 int[] keysyms
           
 int keysyms_per_keycode
           
static int[] LOCK_COMBINATIONS
           
static int LOCK_MASK
           
 int max_keycode
           
static int META_MASK
           
 int min_keycode
           
static int MOD1_MASK
           
static int MOD2_MASK
           
static int MOD3_MASK
           
static int MOD4_MASK
           
static int MOD5_MASK
           
static int REPLY_KEYBOARD
           
static int REPLY_POINTER
           
static int SHIFT_MASK
           
static int SUCCESS
           
static int SUPER_MASK
           
static int SYNC_BOTH
           
static int SYNC_KEYBOARD
           
static int SYNC_POINTER
           
 
Constructor Summary
Input(Display display, int min_keycode, int max_keycode)
           
 
Method Summary
 void allow_events(int mode, int time)
           
 void change_active_pointer_grab(int event_mask, Cursor cursor, int time)
           
 void change_keyboard_control(Input.KeyboardControl control)
           
 void change_keyboard_mapping(int first_keycode, int keysyms_per_keycode, int[] keysyms)
           
 void change_pointer_control(boolean do_accel, boolean do_threshold, int accel_numerator, int accel_denominator, int threshold)
           
static void dump_keybut_mask(int m)
           
 byte[] get_pointer_mapping()
           
 Input.InputFocusInfo input_focus()
           
 Input.KeyboardControlInfo keyboard_control()
           
 void keyboard_mapping()
           
 int keycode_to_keysym(int keycode, int keystate)
          Maps a keycode to a keysym.
 int keycode_to_keysym(int keycode, int keystate, boolean ignore_modifiers)
          Maps a keycode to a keysym.
 int keysym_to_keycode(int keysym)
           
 Input.ModifierMapping modifier_mapping()
           
 Input.PointerControlInfo pointer_control()
           
 byte[] query_keymap()
           
 int set_modifier_mapping(int keycodes_per_modifier, byte[] keycodes)
           
 int set_pointer_mapping(byte[] map)
           
 void ungrab_keyboard()
          Input#ungrab_keyboard(int)
 void ungrab_keyboard(int time)
           
 void ungrab_pointer(int time)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHIFT_MASK

public static final int SHIFT_MASK
See Also:
Constant Field Values

LOCK_MASK

public static final int LOCK_MASK
See Also:
Constant Field Values

CONTROL_MASK

public static final int CONTROL_MASK
See Also:
Constant Field Values

MOD1_MASK

public static final int MOD1_MASK
See Also:
Constant Field Values

MOD2_MASK

public static final int MOD2_MASK
See Also:
Constant Field Values

MOD3_MASK

public static final int MOD3_MASK
See Also:
Constant Field Values

MOD4_MASK

public static final int MOD4_MASK
See Also:
Constant Field Values

MOD5_MASK

public static final int MOD5_MASK
See Also:
Constant Field Values

BUTTON1_MASK

public static final int BUTTON1_MASK
See Also:
Constant Field Values

BUTTON2_MASK

public static final int BUTTON2_MASK
See Also:
Constant Field Values

BUTTON3_MASK

public static final int BUTTON3_MASK
See Also:
Constant Field Values

BUTTON4_MASK

public static final int BUTTON4_MASK
See Also:
Constant Field Values

BUTTON5_MASK

public static final int BUTTON5_MASK
See Also:
Constant Field Values

META_MASK

public static final int META_MASK
See Also:
Constant Field Values

ALT_MASK

public static final int ALT_MASK
See Also:
Constant Field Values

SUPER_MASK

public static final int SUPER_MASK
See Also:
Constant Field Values

BUTTON1

public static final int BUTTON1
See Also:
Constant Field Values

BUTTON2

public static final int BUTTON2
See Also:
Constant Field Values

BUTTON3

public static final int BUTTON3
See Also:
Constant Field Values

BUTTON4

public static final int BUTTON4
See Also:
Constant Field Values

BUTTON5

public static final int BUTTON5
See Also:
Constant Field Values

LOCK_COMBINATIONS

public static final int[] LOCK_COMBINATIONS

display

public Display display

min_keycode

public int min_keycode

max_keycode

public int max_keycode

keysyms_per_keycode

public int keysyms_per_keycode

keysyms

public int[] keysyms

ASYNC_POINTER

public static final int ASYNC_POINTER
See Also:
Constant Field Values

SYNC_POINTER

public static final int SYNC_POINTER
See Also:
Constant Field Values

REPLY_POINTER

public static final int REPLY_POINTER
See Also:
Constant Field Values

ASYNC_KEYBOARD

public static final int ASYNC_KEYBOARD
See Also:
Constant Field Values

SYNC_KEYBOARD

public static final int SYNC_KEYBOARD
See Also:
Constant Field Values

REPLY_KEYBOARD

public static final int REPLY_KEYBOARD
See Also:
Constant Field Values

ASYNC_BOTH

public static final int ASYNC_BOTH
See Also:
Constant Field Values

SYNC_BOTH

public static final int SYNC_BOTH
See Also:
Constant Field Values

SUCCESS

public static final int SUCCESS
See Also:
Constant Field Values

BUSY

public static final int BUSY
See Also:
Constant Field Values

FAILED

public static final int FAILED
See Also:
Constant Field Values

KEYBUT_STRINGS

public static final java.lang.String[] KEYBUT_STRINGS
Constructor Detail

Input

public Input(Display display,
             int min_keycode,
             int max_keycode)
Method Detail

ungrab_pointer

public void ungrab_pointer(int time)
Parameters:
time - possible: Display.CURRENT_TIME
See Also:
XUngrabPointer

change_active_pointer_grab

public void change_active_pointer_grab(int event_mask,
                                       Cursor cursor,
                                       int time)
Parameters:
cursor - possible: Cursor.NONE
time - possible: Display.CURRENT_TIME
See Also:
XChangeActivePointerGrab

ungrab_keyboard

public void ungrab_keyboard(int time)
Parameters:
time - possible: Display.CURRENT_TIME
See Also:
XUngrabKeyboard

allow_events

public void allow_events(int mode,
                         int time)
Parameters:
mode - valid: ASYNC_POINTER, SYNC_POINTER, REPLY_POINTER, ASYNC_KEYBOARD, SYNC_KEYBOARD, REPLY_KEYBOARD, ASYNC_BOTH, SYNC_BOTH
time - possible: Display.CURRENT_TIME
See Also:
XAllowEvents

input_focus

public Input.InputFocusInfo input_focus()
See Also:
XGetInputFocus

query_keymap

public byte[] query_keymap()
Returns:
valid: Enum#next1()
See Also:
XQueryKeymap

change_keyboard_mapping

public void change_keyboard_mapping(int first_keycode,
                                    int keysyms_per_keycode,
                                    int[] keysyms)
See Also:
XChangeKeyboardMapping

keyboard_mapping

public void keyboard_mapping()
See Also:
XGetKeyboardMapping

change_keyboard_control

public void change_keyboard_control(Input.KeyboardControl control)
See Also:
XChangeKeyboardControl

keyboard_control

public Input.KeyboardControlInfo keyboard_control()
See Also:
XGetKeyboardControl

change_pointer_control

public void change_pointer_control(boolean do_accel,
                                   boolean do_threshold,
                                   int accel_numerator,
                                   int accel_denominator,
                                   int threshold)
See Also:
XChangePointerControl

pointer_control

public Input.PointerControlInfo pointer_control()
See Also:
XGetPointerControl

set_pointer_mapping

public int set_pointer_mapping(byte[] map)
Returns:
valid: SUCCESS, BUSY
See Also:
XSetPointerMapping

get_pointer_mapping

public byte[] get_pointer_mapping()
See Also:
XGetPointerMapping

set_modifier_mapping

public int set_modifier_mapping(int keycodes_per_modifier,
                                byte[] keycodes)
Returns:
valid: SUCCESS, BUSY, FAILED
See Also:
XSetModifierMapping

modifier_mapping

public Input.ModifierMapping modifier_mapping()
Returns:
valid: Enum#next1()
See Also:
XModifierKeymap

dump_keybut_mask

public static void dump_keybut_mask(int m)

keycode_to_keysym

public int keycode_to_keysym(int keycode,
                             int keystate)
Maps a keycode to a keysym.

Parameters:
keycode - the keycode
keystate - the modifiers
Returns:
the keysym for the specified key code and modifier mask

keycode_to_keysym

public int keycode_to_keysym(int keycode,
                             int keystate,
                             boolean ignore_modifiers)
Maps a keycode to a keysym. When ignore_modifiers is true then this returns the plain keysymbol, independent of the modifiers. Otherwise it returns the real symbol.

Parameters:
keycode - the keycode
keystate - the modifiers
ignore_modifiers - true for returning plain keysyms, false for taking the modifiers into account
Returns:
the keysym for the specified key code and modifier mask

keysym_to_keycode

public int keysym_to_keycode(int keysym)

ungrab_keyboard

public void ungrab_keyboard()
Input#ungrab_keyboard(int)