SDL: Don't toggle modifier state for repeated keys (thanks @dalawren!)

From 836e6c1531baf9d3f9f65452d330e8b1604fdb86 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 24 May 2024 04:44:56 -0700
Subject: [PATCH] Don't toggle modifier state for repeated keys (thanks
 @dalawren!)

Closes https://github.com/libsdl-org/SDL/pull/9387
---
 src/events/SDL_keyboard.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/events/SDL_keyboard.c b/src/events/SDL_keyboard.c
index 210953bfae8e0..7e5accde64eea 100644
--- a/src/events/SDL_keyboard.c
+++ b/src/events/SDL_keyboard.c
@@ -1006,7 +1006,7 @@ static int SDL_SendKeyboardKeyInternal(Uint64 timestamp, Uint32 flags, SDL_Keybo
     }
 
     /* Update modifiers state if applicable */
-    if (!(flags & KEYBOARD_IGNOREMODIFIERS)) {
+    if (!(flags & KEYBOARD_IGNOREMODIFIERS) && !repeat) {
         switch (keycode) {
         case SDLK_LCTRL:
             modifier = SDL_KMOD_LCTRL;