From 7535bb261fa7ad2c4ab8db5991a526911875c42f Mon Sep 17 00:00:00 2001
From: Alam Arias <alam@srb2.org>
Date: Thu, 1 Jan 2015 07:09:23 +0000
Subject: [PATCH] Account for the separation of F11 and F12 in the keycodes
 list

---
 src/sdl/i_video.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c
index cddc9e83d..faee1bc69 100644
--- a/src/sdl/i_video.c
+++ b/src/sdl/i_video.c
@@ -271,12 +271,17 @@ static INT32 Impl_SDL_Scancode_To_Keycode(SDL_Scancode code)
 	{
 		return '0';
 	}
-	if (code >= SDL_SCANCODE_F1 && code <= SDL_SCANCODE_F12)
+	if (code >= SDL_SCANCODE_F1 && code <= SDL_SCANCODE_F10)
 	{
 		return KEY_F1 + (code - SDL_SCANCODE_F1);
 	}
 	switch (code)
 	{
+		case SDL_SCANCODE_F11: // F11 and F12 are
+			return KEY_F11;    // separated from the
+		case SDL_SCANCODE_F12: // rest of the function
+			return KEY_F12;    // keys
+
 		case SDL_SCANCODE_KP_0:
 			return KEY_KEYPAD0;
 		case SDL_SCANCODE_KP_1:
-- 
GitLab