mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
SDL: Add SDL scancode -> ASCII value translation for the "key FIFO" for ESCAPE.
This fixes ESC in certain situations such as the editor map selection menu. git-svn-id: https://svn.eduke32.com/eduke32@4117 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
70f0100ac2
commit
65cdf97bfa
1 changed files with 2 additions and 0 deletions
|
@ -2043,6 +2043,7 @@ int32_t handleevents(void)
|
|||
if (ev.key.type == SDL_KEYDOWN &&
|
||||
(ev.key.keysym.scancode == SDL_SCANCODE_RETURN ||
|
||||
ev.key.keysym.scancode == SDL_SCANCODE_KP_ENTER ||
|
||||
ev.key.keysym.scancode == SDL_SCANCODE_ESCAPE ||
|
||||
ev.key.keysym.scancode == SDL_SCANCODE_BACKSPACE ||
|
||||
ev.key.keysym.scancode == SDL_SCANCODE_TAB) &&
|
||||
!keyascfifo_isfull())
|
||||
|
@ -2051,6 +2052,7 @@ int32_t handleevents(void)
|
|||
switch (ev.key.keysym.scancode)
|
||||
{
|
||||
case SDL_SCANCODE_RETURN: case SDL_SCANCODE_KP_ENTER: keyvalue = '\r'; break;
|
||||
case SDL_SCANCODE_ESCAPE: keyvalue = 27; break;
|
||||
case SDL_SCANCODE_BACKSPACE: keyvalue = '\b'; break;
|
||||
case SDL_SCANCODE_TAB: keyvalue = '\t'; break;
|
||||
default: keyvalue = 0; break;
|
||||
|
|
Loading…
Reference in a new issue