SCENE C++ API  2.1.0
Public Member Functions | List of all members
LSKeyEvent Class Reference

The LSKeyEvent class represents events which indicate that a keystroke occurred in a view. More...

#include <lskeyevent.h>

+ Inheritance diagram for LSKeyEvent:

Public Member Functions

 LSKeyEvent (ref_ptr< LSView > view, unsigned keyCode, unsigned repCount, unsigned flags)
 Constructor. More...
 
unsigned getKeyCode () const
 Get the virtual key code of the associated key. More...
 
unsigned getRepCount () const
 Get the repeat count of the associated key. More...
 
unsigned getFlags () const
 Get the flags associated with the event. More...
 
- Public Member Functions inherited from LSViewEvent
 LSViewEvent (ref_ptr< LSView > view)
 Constructor. More...
 
ref_ptr< LSViewgetView () const
 Gets the view instance for which the event is triggered. More...
 
- Public Member Functions inherited from LSEvent
 LSEvent ()
 Constructor. More...
 
virtual ~LSEvent ()
 Destructor. More...
 
bool isConsumed () const
 Query whether this event has been consumed. More...
 
void consume ()
 Consumes this event if the event can be consumed. More...
 

Additional Inherited Members

- Protected Member Functions inherited from LSRefType
void ref () const
 Increments the internal reference counter. More...
 
void unref () const
 Decrements the internal reference counter. More...
 

Detailed Description

The LSKeyEvent class represents events which indicate that a keystroke occurred in a view.

Version
SCENE API Version 2.0.0.

Constructor & Destructor Documentation

◆ LSKeyEvent()

LSKeyEvent ( ref_ptr< LSView view,
unsigned  keyCode,
unsigned  repCount,
unsigned  flags 
)

Constructor.

Parameters
viewThe view for which the event was triggered
keyCodeSpecifies the virtual key code of the given key.
repCountRepeat count (the number of times the keystroke is repeated as a result of the user holding down the key)
flagsSpecifies the scan code, key-transition code, previous key state, and context code.
Version
SCENE API Version 2.0.0.

Member Function Documentation

◆ getKeyCode()

unsigned getKeyCode ( ) const

Get the virtual key code of the associated key.

Returns
The key code of the associated key.
Version
SCENE API Version 2.0.0.

◆ getRepCount()

unsigned getRepCount ( ) const

Get the repeat count of the associated key.

Returns
The repeat count of the associated key.
Version
SCENE API Version 2.0.0.

◆ getFlags()

unsigned getFlags ( ) const

Get the flags associated with the event.

Returns
The flags associated with the event.
Version
SCENE API Version 2.0.0.