diff options
author | Shawn <sabetts@juicebox> | 2008-02-06 14:16:37 -0800 |
---|---|---|
committer | Shawn <sabetts@juicebox> | 2008-02-06 14:16:37 -0800 |
commit | bd51b1705292845686f8f682d15f6b7b90ddc787 (patch) | |
tree | 17419004fb598453f019bc57cc1d33063a0f1327 /src/input.h | |
parent | cbcc8f2882ac8985a027b5c8423b5e764c51c158 (diff) | |
download | ratpoison-bd51b1705292845686f8f682d15f6b7b90ddc787.zip |
Change the way input is read
Before rp used xgrabkeyboard to read a key. Instead, the keyboard is
frozen when a top level key is read. Then when rp reads a key it first
sets the input focus to a suitable location such as key_window or
input_window, then thaws the keyboard and waits for a keypress. When a
key is pressed the keyboard is frozen again and the process repeats
until ratpoison is done reading input. At that point the keyboard is
thawed in a way that future keystrokes do not refreeze the keyboard.
Diffstat (limited to 'src/input.h')
-rw-r--r-- | src/input.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/input.h b/src/input.h index f3da6bc..676c6e7 100644 --- a/src/input.h +++ b/src/input.h @@ -26,6 +26,8 @@ char *keysym_to_string (KeySym keysym, unsigned int modifier); int cook_keycode (XKeyEvent *ev, KeySym *keysym, unsigned int *mod, char *keysym_name, int len, int ignore_bad_mods); char *get_input (char *prompt, completion_fn fn); char *get_more_input (char *prompt, char *preinput, completion_fn fn); +void read_any_key (); +int read_single_key (KeySym *keysym, unsigned int *modifiers, char *keysym_name, int len); int read_key (KeySym *keysym, unsigned int *modifiers, char *keysym_name, int len); unsigned int x11_mask_to_rp_mask (unsigned int mask); unsigned int rp_mask_to_x11_mask (unsigned int mask); |