From 1d00e1acad58db49035c8d0523b3f36a1ba65849 Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Fri, 18 Nov 2005 18:18:20 +0000
Subject: [PATCH] Ignore ALT-TAB keystrokes... weird things happen sometimes
 with them enabled on Win32.

---
 src/conio/sdl_con.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/conio/sdl_con.c b/src/conio/sdl_con.c
index 2918a03f93..0649ea6a65 100644
--- a/src/conio/sdl_con.c
+++ b/src/conio/sdl_con.c
@@ -1193,6 +1193,12 @@ int main(int argc, char **argv)
 						break;
 					case SDL_KEYDOWN:			/* Keypress */
 						if(ev.key.keysym.unicode > 0 && ev.key.keysym.unicode <= 0x7f) {		/* ASCII Key (Whoopee!) */
+							/* ALT-TAB stuff doesn't work correctly inder Win32,
+							 * seems ot pass a whole slew of TABs though here.
+							 * Kludge-fix 'em by ignoring all ALT-TAB keystrokes
+							 * that appear to be a tab */
+							if(ev.key.keysym.unicode=='\t' && ev.keykeysym.mode & KMOD_ALT)
+								break;
 							/* Need magical handling here... 
 							 * if ALT is pressed, run 'er through 
 							 * sdl_get_char_code() ANYWAYS unless
-- 
GitLab