Skip to content
Snippets Groups Projects
Commit f7a0cff0 authored by deuce's avatar deuce
Browse files

Do not require sequences starting with an ESC to have a length of 1...

This results in an input hang if a lone ESC is received and nothing else
is received until the key latency is passed.
parent 1cb26d5a
No related branches found
No related tags found
No related merge requests found
...@@ -248,7 +248,9 @@ ODAPIDEF BOOL ODCALL od_get_input(tODInputEvent *pInputEvent, ...@@ -248,7 +248,9 @@ ODAPIDEF BOOL ODCALL od_get_input(tODInputEvent *pInputEvent,
{ {
if(TimeToWait != OD_NO_TIMEOUT || if(TimeToWait != OD_NO_TIMEOUT ||
(bTimerActive && ODTimerElapsed(&SequenceFailTimer) (bTimerActive && ODTimerElapsed(&SequenceFailTimer)
&& szCurrentSequence[0] == 27 && strlen(szCurrentSequence) == 1)) /* 04/05 You can't expect ESC to be pressed and nothing else to follow */
/* && szCurrentSequence[0] == 27 && strlen(szCurrentSequence) == 1)) */
&& szCurrentSequence[0] == 27))
{ {
/* If no input event could be obtained within the specified */ /* If no input event could be obtained within the specified */
/* then return with failure. */ /* then return with failure. */
...@@ -428,7 +430,10 @@ FunctionExit: ...@@ -428,7 +430,10 @@ FunctionExit:
{ {
/* If the sequence began with an escape key, then return an escape */ /* If the sequence began with an escape key, then return an escape */
/* key event. */ /* key event. */
if(szCurrentSequence[0] == 27 && strlen(szCurrentSequence) == 1) /* 04/05 - You need to store or dump the rest of the sequence... */
/* or it'll park here effectively forever! */
/* if(szCurrentSequence[0] == 27 && strlen(szCurrentSequence) == 1)*/
if(szCurrentSequence[0] == 27)
{ {
pInputEvent->bFromRemote = bSequenceFromRemote; pInputEvent->bFromRemote = bSequenceFromRemote;
pInputEvent->chKeyPress = szCurrentSequence[0]; pInputEvent->chKeyPress = szCurrentSequence[0];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment