Gestro
Public Member Functions | List of all members
UbuntuController::KeyboardEvent Class Reference

Used to send keyboard events. More...

#include <KeyboardEvent.h>

Collaboration diagram for UbuntuController::KeyboardEvent:
Collaboration graph

Public Member Functions

 KeyboardEvent (void)
 
XKeyEvent createKeyEvent (Display *display, Window &win, Window &winRoot, bool press, int keycode, int modifiers)
 
void keyPress (Display *display, int keycode)
 

Detailed Description

Used to send keyboard events.

Definition at line 10 of file KeyboardEvent.h.

Constructor & Destructor Documentation

◆ KeyboardEvent()

KeyboardEvent::KeyboardEvent ( void  )

Constructor

Definition at line 5 of file KeyboardEvent.cpp.

Member Function Documentation

◆ createKeyEvent()

XKeyEvent KeyboardEvent::createKeyEvent ( Display *  display,
Window &  win,
Window &  winRoot,
bool  press,
int  keycode,
int  modifiers 
)

It creates a key event that can be sent to the X server

Parameters
displayThe display that the event is occuring on.
winThe window that the event is occuring on.
winRootThe root window is the first window that all windows in the display are descended from.
presswhether the key is pressed or released
keycodeThe X11 defined code for the key that is simulated.
modifiersThis is a bitmask that specifies the modifier keys that are pressed.
Returns
A XKeyEvent object

Definition at line 7 of file KeyboardEvent.cpp.

Here is the caller graph for this function:

◆ keyPress()

void KeyboardEvent::keyPress ( Display *  display,
int  keycode 
)

It creates a fake key press event and sends it to the window which currently has the keyboard focus

Parameters
displayThe Display to send the event to.
keycodeThe keycode of the key to be pressed.

Definition at line 43 of file KeyboardEvent.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: