We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3033

Summary: wrong events for key combos
Product: SDL Reporter: Stas Sergeev <stsp2>
Component: eventsAssignee: Sam Lantinga <slouken>
Status: RESOLVED INVALID QA Contact: Sam Lantinga <slouken>
Severity: critical    
Priority: P2    
Version: HG 2.0   
Hardware: x86_64   
OS: Linux   

Description Stas Sergeev 2015-06-24 16:13:55 UTC
Hello.

Many key combinations, notable Alt-f1/Alt-f2,
do not generate right keydown even when f1/f2 is pressed.
This is a regression from SDL-1.2, which didn't have
any problems with that.

To reproduce, you need to modify the checkkeys test
this way:
---
diff -r b577c4753421 test/checkkeys.c
--- a/test/checkkeys.c	Sun Feb 22 20:34:08 2015 -0500
+++ b/test/checkkeys.c	Wed Jun 24 18:38:23 2015 +0300
@@ -189,6 +189,7 @@
     /* Creating the context creates the view, which we need to show keyboard */
     SDL_GL_CreateContext(window);
 #endif
+SDL_SetWindowGrab(window, SDL_TRUE);
 
     SDL_StartTextInput();
 
---

After that, run test, press Alt - the result is fine.
While holding Alt, press F1/F2 - it says that Alt was
repeated (hg version) or nothing at all happens (2.0.3 version).
Comment 1 Stas Sergeev 2015-06-26 21:29:50 UTC
Needed to do
SDL_SetHint(SDL_HINT_GRAB_KEYBOARD, "1")
Sorry for noise.