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

Summary: SDL_GetModState consumes SHIFT(L/R), when SHIFT + Numpad key(0-9) is pressed
Product: SDL Reporter: Vikas <vikas.ag>
Component: eventsAssignee: Sam Lantinga <slouken>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.3   
Hardware: x86   
OS: Windows 7   

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?