Public Member Functions | Static Public Attributes | Protected Attributes
pcl::visualization::KeyboardEvent Class Reference

#include <keyboard_event.h>

List of all members.

Public Member Functions

unsigned char getKeyCode () const
const std::string & getKeySym () const
bool isAltPressed () const
bool isCtrlPressed () const
bool isShiftPressed () const
 KeyboardEvent (bool action, const std::string &key_sym, unsigned char key, bool alt, bool ctrl, bool shift)
 Constructor.
bool keyDown () const
bool keyUp () const

Static Public Attributes

static const unsigned int Alt = 1
 bit patter for the ALT key
static const unsigned int Ctrl = 2
 bit patter for the Control key
static const unsigned int Shift = 4
 bit patter for the Shift key

Protected Attributes

bool action_
unsigned char key_code_
std::string key_sym_
unsigned int modifiers_

Detailed Description

/brief Class representing key hit/release events

Definition at line 49 of file keyboard_event.h.


Constructor & Destructor Documentation

pcl::visualization::KeyboardEvent::KeyboardEvent ( bool  action,
const std::string &  key_sym,
unsigned char  key,
bool  alt,
bool  ctrl,
bool  shift 
) [inline]

Constructor.

Parameters:
[in]actiontrue for key was pressed, false for released
[in]key_symthe key-name that caused the action
[in]keythe key code that caused the action
[in]altwhether the alt key was pressed at the time where this event was triggered
[in]ctrlwhether the ctrl was pressed at the time where this event was triggered
[in]shiftwhether the shift was pressed at the time where this event was triggered

Definition at line 120 of file keyboard_event.h.


Member Function Documentation

unsigned char pcl::visualization::KeyboardEvent::getKeyCode ( ) const [inline]
Returns:
the ASCII Code of the key that caused the event. If 0, then it was a special key, like ALT, F1, F2,... PgUp etc. Then the name of the key is in the keysym field.

Definition at line 156 of file keyboard_event.h.

const std::string & pcl::visualization::KeyboardEvent::getKeySym ( ) const [inline]
Returns:
name of the key that caused the event

Definition at line 162 of file keyboard_event.h.

Returns:
whether the alt key was pressed at the time where this event was triggered

Definition at line 138 of file keyboard_event.h.

Returns:
whether the ctrl was pressed at the time where this event was triggered

Definition at line 144 of file keyboard_event.h.

Returns:
whether the shift was pressed at the time where this event was triggered

Definition at line 150 of file keyboard_event.h.

Returns:
true if a key-press caused the event, false otherwise

Definition at line 168 of file keyboard_event.h.

Returns:
true if a key-release caused the event, false otherwise

Definition at line 174 of file keyboard_event.h.


Member Data Documentation

Definition at line 114 of file keyboard_event.h.

const unsigned int pcl::visualization::KeyboardEvent::Alt = 1 [static]

bit patter for the ALT key

Definition at line 53 of file keyboard_event.h.

const unsigned int pcl::visualization::KeyboardEvent::Ctrl = 2 [static]

bit patter for the Control key

Definition at line 55 of file keyboard_event.h.

Definition at line 116 of file keyboard_event.h.

Definition at line 117 of file keyboard_event.h.

Definition at line 115 of file keyboard_event.h.

const unsigned int pcl::visualization::KeyboardEvent::Shift = 4 [static]

bit patter for the Shift key

Definition at line 57 of file keyboard_event.h.


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


pcl
Author(s): Open Perception
autogenerated on Mon Oct 6 2014 03:20:33