pushEvent insteado of putEvent

This commit is contained in:
Bertrand Songis
2021-03-12 11:07:31 +01:00
parent 59cef7ebc7
commit 889f645c1a
11 changed files with 23 additions and 23 deletions
+5 -5
View File
@@ -68,7 +68,7 @@ void Key::input(bool val)
// key is released
if (m_state != KSTATE_KILLED) {
// TRACE("key %d BREAK", key());
putEvent(EVT_KEY_BREAK(key()));
pushEvent(EVT_KEY_BREAK(key()));
}
m_state = KSTATE_OFF;
m_cnt = 0;
@@ -85,7 +85,7 @@ void Key::input(bool val)
case KSTATE_START:
// TRACE("key %d FIRST", key());
putEvent(EVT_KEY_FIRST(key()));
pushEvent(EVT_KEY_FIRST(key()));
inactivity.counter = 0;
m_state = KSTATE_RPTDELAY;
m_cnt = 0;
@@ -95,7 +95,7 @@ void Key::input(bool val)
if (m_cnt == KEY_LONG_DELAY) {
// generate long key press
// TRACE("key %d LONG", key());
putEvent(EVT_KEY_LONG(key()));
pushEvent(EVT_KEY_LONG(key()));
}
if (m_cnt == KEY_REPEAT_DELAY) {
m_state = 16;
@@ -117,7 +117,7 @@ void Key::input(bool val)
// this produces repeat events that at first repeat slowly and then increase in speed
// TRACE("key %d REPEAT", key());
if (!IS_SHIFT_KEY(key()))
putEvent(EVT_KEY_REPT(key()));
pushEvent(EVT_KEY_REPT(key()));
}
break;
@@ -197,6 +197,6 @@ bool waitKeysReleased()
}
memclear(keys, sizeof(keys));
putEvent(0);
pushEvent(0);
return true;
}