KeyEvent Class Reference

Generic description of a keyboard event. More...

#include <common/common.hh>

Public Types

enum  EventType { NO_EVENT, PRESS, RELEASE }
 Key event types enumeration. More...
 

Public Member Functions

 KeyEvent ()
 Constructor. More...
 

Public Attributes

bool alt
 Was alt held during this key event? More...
 
bool control
 Was control held during this key event? More...
 
int key
 The raw value of the key pressed. More...
 
bool shift
 Was shift held during this key event? More...
 
std::string text
 Formatted string of the key pressed (could be uppercase). More...
 
EventType type
 Event type. More...
 

Detailed Description

Generic description of a keyboard event.

Member Enumeration Documentation

◆ EventType

enum EventType

Key event types enumeration.

Enumerator
NO_EVENT 
PRESS 
RELEASE 

Constructor & Destructor Documentation

◆ KeyEvent()

KeyEvent ( )

Constructor.

Member Data Documentation

◆ alt

bool alt

Was alt held during this key event?

◆ control

bool control

Was control held during this key event?

◆ key

int key

The raw value of the key pressed.

◆ shift

bool shift

Was shift held during this key event?

◆ text

std::string text

Formatted string of the key pressed (could be uppercase).

◆ type

EventType type

Event type.


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