From d0e86fb53419814071f0253123542b2ee43c4300 Mon Sep 17 00:00:00 2001 From: Zi Ree Date: Tue, 2 Aug 2022 13:57:46 +0200 Subject: [PATCH] re-apply the alt/ctrl filter in SDL_TEXTINPUT to prevent extra characters showing up in text boxes when using e.g. alt+h --- indra/llwindow/llwindowsdl2.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/indra/llwindow/llwindowsdl2.cpp b/indra/llwindow/llwindowsdl2.cpp index 082d2a93b5..4f7e58fd55 100644 --- a/indra/llwindow/llwindowsdl2.cpp +++ b/indra/llwindow/llwindowsdl2.cpp @@ -1783,7 +1783,13 @@ void LLWindowSDL::gatherInput() for( auto key: string ) { mKeyVirtualKey = key; - handleUnicodeUTF16( key, mKeyModifiers ); + + // filter ctrl and left-alt keypresses from line inputs so we don't end up with e.g. + // "h" in teleport history filter input after pressing alt+h to call up the floater + if (mKeyModifiers & (MASK_CONTROL | MASK_ALT)) + gKeyboard->handleKeyDown(mKeyVirtualKey, mKeyModifiers); + else + handleUnicodeUTF16(key, mKeyModifiers); } break; }