Skip to content

Commit

Permalink
Handle keyboard input asynchronously when text input is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Susko3 committed Jan 23, 2025
1 parent 804df9b commit 95f1aef
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions osu.Framework/Platform/SDL3/SDL3Window.cs
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,16 @@ protected virtual bool HandleEventFromFilter(SDL_Event e)
LowOnMemory?.Invoke();
break;

case SDL_EventType.SDL_EVENT_KEY_DOWN:
case SDL_EventType.SDL_EVENT_KEY_UP:
if (!SDL_TextInputActive(SDLWindowHandle))
{
handleKeyboardEvent(e.key);
return false;
}

break;

case SDL_EventType.SDL_EVENT_MOUSE_MOTION:
handleMouseMotionEvent(e.motion);
return false;
Expand Down

0 comments on commit 95f1aef

Please sign in to comment.