- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Exponent::GUI::Events::CKeyboardEvent Class Reference

Inheritance diagram for Exponent::GUI::Events::CKeyboardEvent:

List of all members.

## Detailed Description

Allows for responding to keyboard actions.

Date:
  21/08/2004

Author:
  Paul Chana

Version:
  1.0.0 Initial version

Note:
  All contents of this source code are copyright 2005 Exp Digital Uk.
  This source file is covered by the licence conditions of the Infinity API. You should have recieved a copy
  with the source code. If you didnt, please refer to http://www.expdigital.co.uk All content is the Intellectual property of Exp Digital Uk.
  Certain sections of this code may come from other sources. They are credited where applicable.
  If you have comments, suggestions or bug reports please visit http://support.expdigital.co.uk

Id
  CKeyboardEvent.hpp,v 1.3 2007/02/08 21:07:54 paul Exp

Definition at line 32 of file CKeyboardEvent.hpp.

## Public Member Functions

- CKeyboardEvent ()
- char getKey () const
- bool isAltDown () const
- bool isCtrlDown () const
- bool isShiftDown () const
- void setKey (const char key)
- void setModifiers (const bool shift, const bool alt, const bool ctrl)
- virtual ~CKeyboardEvent ()

## Protected Attributes

- bool m_altIsDown
- bool m_ctrlIsDown
- char m_key
- bool m_shiftIsDown

## Constructor & Destructor Documentation

Exponent::GUI::Events::CKeyboardEvent::CKeyboardEvent | ( |  | ) |

Construction

virtual Exponent::GUI::Events::CKeyboardEvent::~CKeyboardEvent | ( |  | ) | `[virtual]`

Destruction

## Member Function Documentation

char Exponent::GUI::Events::CKeyboardEvent::getKey | ( |  | ) | const

Get the virtual key code

Return values:

  | char | The key depressed

bool Exponent::GUI::Events::CKeyboardEvent::isAltDown | ( |  | ) | const

Is the alt key down

Return values:

  | bool | True if alt is down, false otherwise

bool Exponent::GUI::Events::CKeyboardEvent::isCtrlDown | ( |  | ) | const

Is ctrl down

Return values:

  | bool | True if ctrl is down, false otherwise

bool Exponent::GUI::Events::CKeyboardEvent::isShiftDown | ( |  | ) | const

Is shift down

Return values:

  | bool | True if shift is down, false otherwise

void Exponent::GUI::Events::CKeyboardEvent::setKey | ( | const char | key | ) |

SEt the key code

Parameters:

  | key | The key that was pressed

void Exponent::GUI::Events::CKeyboardEvent::setModifiers | ( | const bool | shift,
|  | const bool | alt,
|  | const bool | ctrl |
| ) |  |  |

Set the modifiers

Parameters:

  | shift | True if shift is down, false otherwise
  | alt | True if alt is down, false otherwise
  | ctrl | True if ctrl is down, false otherwise

## Member Data Documentation

bool Exponent::GUI::Events::CKeyboardEvent::m_altIsDown`[protected]`

Is the alt key depressed

Definition at line 102 of file CKeyboardEvent.hpp.

bool Exponent::GUI::Events::CKeyboardEvent::m_ctrlIsDown`[protected]`

Is the ctrl key depressed

Definition at line 103 of file CKeyboardEvent.hpp.

char Exponent::GUI::Events::CKeyboardEvent::m_key`[protected]`

The character that was pressed

Definition at line 100 of file CKeyboardEvent.hpp.

bool Exponent::GUI::Events::CKeyboardEvent::m_shiftIsDown`[protected]`

Is shift key depressed

Definition at line 101 of file CKeyboardEvent.hpp.