libfakekey  0.1
fakekey.h
1 #ifndef _HAVE_LIBFAKEKEY_H
2 #define _HAVE_LIBFAKEKEY_H
3 
4 #include <stdio.h>
5 #include <stdlib.h>
6 #include <X11/X.h>
7 #include <X11/Xlib.h>
8 #include <X11/Xlibint.h>
9 #include <X11/Xutil.h>
10 #include <X11/cursorfont.h>
11 #include <X11/keysymdef.h>
12 #include <X11/keysym.h>
13 #include <X11/extensions/XTest.h>
14 #include <X11/Xos.h>
15 #include <X11/Xproto.h>
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
35 typedef struct FakeKey FakeKey;
36 
42 typedef enum
43 {
44  FAKEKEYMOD_SHIFT = (1<<1),
45  FAKEKEYMOD_CONTROL = (1<<2),
46  FAKEKEYMOD_ALT = (1<<3),
47  FAKEKEYMOD_META = (1<<4)
48 
50 
58 FakeKey*
59 fakekey_init(Display *xdpy);
60 
61 
74 int
76  const unsigned char *utf8_char_in,
77  int len_bytes,
78  int modifiers);
79 
85 void
87 
88 
94 void
96 
105 int
107 
117 int
119  KeySym keysym,
120  int flags);
121 
131 int
133  KeyCode keycode,
134  Bool is_press,
135  int modifiers);
136 
139 #ifdef __cplusplus
140 }
141 #endif
142 
143 #endif /* _HAVE_LIBFAKEKEY_H */
fakekey_repeat
void fakekey_repeat(FakeKey *fk)
Repreats a press of the currently held key ( from fakekey_press )
fakekey_press_keysym
int fakekey_press_keysym(FakeKey *fk, KeySym keysym, int flags)
fakekey_press but with an X keysym rather than a UTF8 Char.
fakekey_send_keyevent
int fakekey_send_keyevent(FakeKey *fk, KeyCode keycode, Bool is_press, int modifiers)
FakeKey
struct FakeKey FakeKey
Definition: fakekey.h:35
fakekey_reload_keysyms
int fakekey_reload_keysyms(FakeKey *fk)
Resyncs the internal list of keysyms with the server.
fakekey_init
FakeKey * fakekey_init(Display *xdpy)
Initiates FakeKey.
FakeKeyModifier
FakeKeyModifier
Definition: fakekey.h:42
fakekey_release
void fakekey_release(FakeKey *fk)
Releases the currently held key ( from fakekey_press )
fakekey_press
int fakekey_press(FakeKey *fk, const unsigned char *utf8_char_in, int len_bytes, int modifiers)
Sends a Keypress to the server for the supplied UTF8 character.