You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating system and version:
Windows 10 Pro 64-bit (10.0, Build 18363)
Description of the bug (and if possible, steps to reproduce the bug):
SDL_Keymod mod = SDL_GetModState();
int shift = !!(mod & KMOD_SHIFT); // The reason of !! is to convert number into 0 or 1 and it's not a Boolean but an int.
// Steps:
//
// - The shift key is down.
// - I press the normal keys A or B or C or ...
// - The value of the variable 'shift' is 1 which is correct.
//
// - The shift key is down AND the numlock is ON.
// - I press the numpad keys 1 or 2 or 3 or ...
// - The value of the variable 'shift' is 0 which is wrong because what I expected is 1 but it's not.
What did you expect to happen instead?
I want to get the input [End] for [1], [↓] for [2], [PgDn] for [3], etc. but I can't because there is no reason to know if the shift is down with NumLock ON because as I explain above, the value of 'shift' is always 0 at the time when the numpad keys are down, but 'shift' will be 1 at the time when the numpad keys are up.
The text was updated successfully, but these errors were encountered:
mandaxyzw
changed the title
SDL - There is no reason to know if shift is down when pressing a numpad key
SDL - There is no reason to know if shift is down when pressing a numpad key with NumLock is ON
Apr 28, 2022
mandaxyzw
changed the title
SDL - There is no reason to know if shift is down when pressing a numpad key with NumLock is ON
SDL - There is no reason to know if shift is down when pressing a numpad key with NumLock ON
Apr 28, 2022
Operating system and version:
Windows 10 Pro 64-bit (10.0, Build 18363)
Description of the bug (and if possible, steps to reproduce the bug):
What did you expect to happen instead?
I want to get the input [End] for [1], [↓] for [2], [PgDn] for [3], etc. but I can't because there is no reason to know if the shift is down with NumLock ON because as I explain above, the value of 'shift' is always 0 at the time when the numpad keys are down, but 'shift' will be 1 at the time when the numpad keys are up.
The text was updated successfully, but these errors were encountered: