-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
void KeyboardEventListener::onOSEvent(const Event &osEvent, const EventData *data) {
- if (data == nullptr) {
-
return;
- }
auto *keyData = static_cast<KeyboardButtonEventData *>(data);
if (osEvent == Platform::KeyboardButtonDownEvent) {
mKeyboardInputState.mKeymap[keyData->m_key] = 1;
mKeyboardInputState.mLast = keyData->m_key;
- } else {
- } else if (osEvent == Platform::KeyboardButtonUpEvent) {
mKeyboardInputState.mKeymap[keyData->m_key] = 0;
mKeyboardInputState.mLast = Platform::KEY_UNKNOWN;
}
}
Metadata
Metadata
Assignees
Labels
No labels