-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Description
Using SDL_KeyMod is always None on event SDL.EventType.KeyboardButtonUp
If I use this code:
internal override void OnEvent(SDL.Event e)
{
switch (e.type)
{
// Keyboard Up
case SDL.EventType.KeyboardButtonUp:
{
if (!e.keyboard.repeat)
{
var modifier = (Modifier)e.keyboard.keyModifier;
Debug.Log($"Release {modifier}");
}
break;
}
// Keyboard Down
case SDL.EventType.KeyboardButtonDown:
{
if (!e.keyboard.repeat)
{
var modifier = (Modifier)e.keyboard.keyModifier;
Debug.Log($"Press {modifier}");
}
break;
}
}
}
Whenever I check the modifier on KeyboardButtonDown I get the excepted modifier that is pressed for example Alt, Ctrl, etc. However on release it's always none. I would wonder if this is intended behaviour however CapsLock work as expected and is the only SDL_KeyMod that is present on KeyboardButtonUp
Why is this? Is this a bug or intentional behaviour?
Metadata
Metadata
Assignees
Labels
No labels