# OHOS::KeyEvent - [Overview](#section628384899165635) - [Summary](#section1291846480165635) - [Public Member Functions](#pub-methods) ## **Overview** **Related Modules:** [Graphic](Graphic.md) **Description:** Defines a key event, which indicates that a physical button is pressed or released. **Since:** 1.0 **Version:** 1.0 ## **Summary** ## Public Member Functions
KeyEvent (uint16_t keyId, uint16_t state) |
A constructor used to create a KeyEvent instance. |
~KeyEvent () |
A destructor used to delete the KeyEvent instance. |
GetKeyId () const |
|
GetState () const |
|
Event () |
A default constructor used to create an Event instance. |
|
A constructor used to create an Event instance. |
|
~Event () |
A destructor used to delete the Event instance. |
GetCurrentPos () const |
const Point & |
GetTimeStamp () const |
|
SetTimeStamp (const TimeType &timeStamp) |
|
operator new (size_t size) |
|
operator delete (void *p) |