From 43f335c2061263105a0400f8b6416b5ff901fe33 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Tue, 19 Feb 2019 01:10:06 +0100 Subject: [PATCH] sdl: remove previous changes to the text input. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I was arguing that Enter and other keys should be part of the text input API, but it’s hard to decide what Tab actually does. I prefer to give more freedom to the client application. --- src/platform/sdl/sdlinput.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/platform/sdl/sdlinput.cpp b/src/platform/sdl/sdlinput.cpp index f06a3f03..1070f9eb 100644 --- a/src/platform/sdl/sdlinput.cpp +++ b/src/platform/sdl/sdlinput.cpp @@ -292,7 +292,7 @@ void SdlInputData::Tick(float seconds) default: if (ScanCodeIsValid(sc)) { - //Set key updates the corresponding key + // Set key updates the corresponding key m_keyboard->SetKey(sc, event.type == SDL_KEYDOWN); /* DEBUG STUFF @@ -300,17 +300,6 @@ void SdlInputData::Tick(float seconds) (int)m_keyboard, ScanCodeToText(sc).C(), ScanCodeToName(sc).C(), event.type == SDL_KEYDOWN ? "up" : "down", event.key.repeat); */ - - // These are arguably text input characters, too. - if (event.type == SDL_KEYDOWN && m_keyboard->IsTextInputActive()) - { - switch (sc) - { - case SDLOL_Return: m_keyboard->AddText("\n"); break; - case SDLOL_Tab: m_keyboard->AddText("\t"); break; - case SDLOL_Backspace: m_keyboard->AddText("\x08"); break; - } - } } /* DEBUG STUFF else