X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=AcessNative%2Facesskernel_src%2Fui_sdl.c;h=2e56a647a1043a5c1a9d2280c33bd103af461254;hb=a6f11cb266052c58ae7e2d6d6e8abd34a9e93214;hp=3f3cb1397cf89b8009261209869792de95904c06;hpb=7f80ab30017689efe0aaaab18abc7ceda689d859;p=tpg%2Facess2.git diff --git a/AcessNative/acesskernel_src/ui_sdl.c b/AcessNative/acesskernel_src/ui_sdl.c index 3f3cb139..2e56a647 100644 --- a/AcessNative/acesskernel_src/ui_sdl.c +++ b/AcessNative/acesskernel_src/ui_sdl.c @@ -57,6 +57,10 @@ Uint32 UI_GetAcessKeyFromSDL(SDLKey Sym, Uint16 Unicode) // Fast return if( gUI_Keymap[shiftState][Sym] ) return gUI_Keymap[shiftState][Sym]; + + // Enter key on acess returns \n, but SDL returns \r + if( Sym == SDLK_RETURN ) + Unicode = '\n'; // How nice of you, a unicode value if( Unicode ) @@ -85,6 +89,7 @@ Uint32 UI_GetAcessKeyFromSDL(SDLKey Sym, Uint16 Unicode) case SDLK_F10: ret = KEY_F10; break; case SDLK_F11: ret = KEY_F11; break; case SDLK_F12: ret = KEY_F12; break; + case SDLK_RETURN: ret = '\n'; break; default: printf("Unhandled key code %i\n", Sym); break;