You.i Engine
CYIKeyEvent Class Reference

Detailed Description

Class for key events.

#include <event/YiKeyEvent.h>

Inheritance diagram for CYIKeyEvent:

Public Types

enum  KEY_LOCATION {
  KEY_LOCATION_STANDARD,
  KEY_LOCATION_LEFT,
  KEY_LOCATION_RIGHT,
  KEY_LOCATION_NUMPAD,
  KEY_LOCATION_MOBILE,
  KEY_LOCATION_JOYSTICK
}
 

Public Member Functions

 CYIKeyEvent (YI_EVENT_TYPE eventType)
 
 CYIKeyEvent (const CYIKeyEvent &rOther)=default
 
virtual ~CYIKeyEvent ()
 
virtual std::unique_ptr< CYIEventClone () const override
 
- Public Member Functions inherited from CYIEvent
 CYIEvent (YI_EVENT_TYPE eventType)
 
 CYIEvent (const CYIEvent &rOther)
 
virtual ~CYIEvent ()
 
const CYIStringGetName () const
 
YI_EVENT_TYPE GetType () const
 
void SetType (YI_EVENT_TYPE eventType)
 
bool IsActionEvent () const
 
std::unique_ptr< CYIActionEventCloneAsActionEvent () const
 
bool IsKeyEvent () const
 
std::unique_ptr< CYIKeyEventCloneAsKeyEvent () const
 
bool IsFocusEvent () const
 
std::unique_ptr< CYIFocusEventCloneAsFocusEvent () const
 
bool IsTrackpadEvent () const
 
std::unique_ptr< CYITrackpadEventCloneAsTrackpadEvent () const
 
- Public Member Functions inherited from CYIScriptableObject
 CYIScriptableObject ()
 
 CYIScriptableObject (const CYIScriptableObject &other)
 
CYIScriptableObjectoperator= (const CYIScriptableObject &other)
 
virtual ~CYIScriptableObject ()
 
CYIBindingImplementationGetBindingImplementation () const
 
void SetBindingImplementation (CYIBindingImplementation *pBindingImplementation)
 
virtual const CYIRuntimeTypeInfoGetRuntimeTypeInfoForScriptObject () const
 

Public Attributes

char32_t m_cKeyValue
 
YI_KEY_CODE m_eKeyCode
 
YI_RECT_REL m_nScreenRect
 
bool m_bRepeat
 
bool m_bShiftKey
 
bool m_bControlKey
 
bool m_bAltKey
 
bool m_bMetaKey
 
KEY_LOCATION m_eKeyLocation
 
- Public Attributes inherited from CYIEvent
CYIEventTargetm_pTarget
 
CYIEventTargetm_pCurrentTarget
 
YI_EVENT_PHASE m_ePhase
 
bool m_bCanCancel
 
bool m_bCanBubble
 
bool m_bCanCapture
 
bool m_bStopPropagation
 
bool m_bHandled
 
uint64_t m_uEventTimeMs
 

Member Enumeration Documentation

Enum which indicates where the key is originating from.

Enumerator
KEY_LOCATION_STANDARD 

For keys that are not Left or Right and not from the Number pad.

KEY_LOCATION_LEFT 

For keys that have a left and right key, when the left key is pressed.

KEY_LOCATION_RIGHT 

For keys that have a left and right key, when the right key is pressed.

KEY_LOCATION_NUMPAD 

For keys on the number pad.

KEY_LOCATION_MOBILE 

For keys on a mobile or televion device either from a physical or virtual keyboard.

KEY_LOCATION_JOYSTICK 

For keys originating on a game controller or joystick.

Constructor & Destructor Documentation

CYIKeyEvent::CYIKeyEvent ( YI_EVENT_TYPE  eventType)
CYIKeyEvent::CYIKeyEvent ( const CYIKeyEvent rOther)
default
virtual CYIKeyEvent::~CYIKeyEvent ( )
virtual

Member Function Documentation

virtual std::unique_ptr<CYIEvent> CYIKeyEvent::Clone ( ) const
overridevirtual

Reimplemented from CYIEvent.

Member Data Documentation

bool CYIKeyEvent::m_bAltKey

True when Alt or Option key is pressed.

bool CYIKeyEvent::m_bControlKey

True when Control key is pressed.

bool CYIKeyEvent::m_bMetaKey

True when Meta key (Command key on Mac) is pressed.

bool CYIKeyEvent::m_bRepeat

True when a key is pressed and held resulting in multiple events.

bool CYIKeyEvent::m_bShiftKey

True when Shift key is pressed.

char32_t CYIKeyEvent::m_cKeyValue

The character value of the key pressed.

YI_KEY_CODE CYIKeyEvent::m_eKeyCode

The key code of the key pressed.

KEY_LOCATION CYIKeyEvent::m_eKeyLocation

Location of the key pressed.

YI_RECT_REL CYIKeyEvent::m_nScreenRect

If a soft keyboard, keys have a location and size.


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