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 - wrong events for key combos
Summary: wrong events for key combos
Status: RESOLVED INVALID
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: HG 2.0
Hardware: x86_64 Linux
: P2 critical
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-24 16:13 UTC by Stas Sergeev
Modified: 2015-06-26 21:29 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.