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 3055 - SDL_GetModState consumes SHIFT(L/R), when SHIFT + Numpad key(0-9) is pressed
Summary: SDL_GetModState consumes SHIFT(L/R), when SHIFT + Numpad key(0-9) is pressed
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: 2.0.3
Hardware: x86 Windows 7
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-10 09:26 UTC by Vikas
Modified: 2015-07-24 11:58 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 Vikas 2015-07-10 09:26:32 UTC
1. Enable the NUM lock key
2. Press the Shift(Left or right) key continuously
3. Simultaneously press 0-9 key from numpad 
4. SDL_GetModState returns 0(no modifier key pressed)

Note :
1. Press SHIFT + ALT + CTRL +  (0-9) numpad, SDL_GetModState returns 'ALT|CTRL' but not SHIFT
2. Disable the NUM lock, and it starts returning SHIFT modifier(for 0-9 num pad key)

For all other keys, SDL_GetModState returns SHIFT(if pressed)
Comment 1 Vikas 2015-07-24 11:58:47 UTC
I tested the same scenario in Linux and it works fine.

It seems its windows bugs. 
Consider the following scenario:
1. Enable NUM lock
2. Press SHIFT + 1(Num pad(0-9) key)

Here I get 3 events
1. SHIFT released(I didn't released the shift)
2. NUM 1
3. SHIFT pressed

instead of NUM 1 + modifier(SHIFT)

It looks like windows is sending one extra SHIFT released and pressed event.

Any workaround for this?