SDL: Fixed the French numeric keycode from varying based on shift state

From 61441c2be930331928528523dbd343910d63f975 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 3 Jul 2024 10:33:08 -0700
Subject: [PATCH] Fixed the French numeric keycode from varying based on shift
 state

---
 src/events/SDL_keyboard.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/events/SDL_keyboard.c b/src/events/SDL_keyboard.c
index 6d058a50ef6b6..0b73d154dae5f 100644
--- a/src/events/SDL_keyboard.c
+++ b/src/events/SDL_keyboard.c
@@ -426,7 +426,6 @@ static SDL_Keycode SDL_ConvertNumpadKeycode(SDL_Keycode keycode, SDL_bool numloc
 
 static SDL_Keycode SDL_GetEventKeycode(SDL_Keyboard *keyboard, SDL_Scancode scancode, SDL_Keymod modstate)
 {
-    SDL_bool shifted = (modstate & SDL_KMOD_SHIFT) != 0;
     SDL_bool numlock = (modstate & SDL_KMOD_NUM) != 0;
     SDL_Keycode keycode;
 
@@ -441,12 +440,8 @@ static SDL_Keycode SDL_GetEventKeycode(SDL_Keyboard *keyboard, SDL_Scancode scan
         if ((keyboard->keycode_options & KEYCODE_OPTION_FRENCH_NUMBERS) &&
             keyboard->french_numbers &&
             (scancode >= SDL_SCANCODE_1 && scancode <= SDL_SCANCODE_0)) {
-            // Invert the shift state to generate the expected keycode
-            if (shifted) {
-                modstate &= ~SDL_KMOD_SHIFT;
-            } else {
-                modstate |= SDL_KMOD_SHIFT;
-            }
+            // Add the shift state to generate a numeric keycode
+            modstate |= SDL_KMOD_SHIFT;
         }
 
         keycode = SDL_GetKeyFromScancode(scancode, modstate);