libfakekey  0.3
Typedefs | Enumerations | Functions
FakeKey -

yada yada yada More...

Typedefs

typedef struct FakeKey FakeKey
 

Enumerations

enum  FakeKeyModifier
 

Functions

FakeKeyfakekey_init (Display *xdpy)
 Initiates FakeKey. More...
 
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. More...
 
void fakekey_repeat (FakeKey *fk)
 Repreats a press of the currently held key ( from fakekey_press ) More...
 
void fakekey_release (FakeKey *fk)
 Releases the currently held key ( from fakekey_press ) More...
 
int fakekey_reload_keysyms (FakeKey *fk)
 Resyncs the internal list of keysyms with the server. More...
 
int fakekey_press_keysym (FakeKey *fk, KeySym keysym, int flags)
 fakekey_press but with an X keysym rather than a UTF8 Char. More...
 
int fakekey_send_keyevent (FakeKey *fk, KeyCode keycode, Bool is_press, int modifiers)
 

Detailed Description

yada yada yada

Always remember to release held keys

Typedef Documentation

◆ FakeKey

Opaque structure used for all operations.

Definition at line 35 of file fakekey.h.

Enumeration Type Documentation

◆ FakeKeyModifier

enumerated types for #mb_pixbuf_img_transform

Definition at line 42 of file fakekey.h.

Function Documentation

◆ fakekey_init()

FakeKey* fakekey_init ( Display *  xdpy)

Initiates FakeKey.

Parameters
xdpyX Display connection.
Returns
new FakeKey reference on success, NULL on fail.

◆ 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.

Parameters
fkFakeKey refernce from fakekey_init
utf8_char_inPointer to a single UTF8 Character data.
len_bytesLenth in bytes of character, or -1 in ends with 0
modifiersOR'd list of FakeKeyModifier modifiers keys to press with the key.
Returns

◆ 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.

Parameters
fkFakeKey refernce from fakekey_init
keysymX Keysym to send
flags
Returns

◆ fakekey_release()

void fakekey_release ( FakeKey fk)

Releases the currently held key ( from fakekey_press )

Parameters
fkFakeKey refernce from fakekey_init

◆ fakekey_reload_keysyms()

int fakekey_reload_keysyms ( FakeKey fk)

Resyncs the internal list of keysyms with the server.

Should be called if a MappingNotify event is recieved.

Parameters
fkFakeKey refernce from fakekey_init
Returns

◆ fakekey_repeat()

void fakekey_repeat ( FakeKey fk)

Repreats a press of the currently held key ( from fakekey_press )

Parameters
fkFakeKey refernce from fakekey_init

◆ fakekey_send_keyevent()

int fakekey_send_keyevent ( FakeKey fk,
KeyCode  keycode,
Bool  is_press,
int  modifiers 
)
Parameters
fkFakeKey refernce from fakekey_init
keycodeX Keycode to send
is_pressIs this a press ( or release )
modifiers
Returns