Detect when just Shift key is down



in my desktop application I need to detect whenever the shift key is held down and whenever it is released (just Shift key, not in combination with other keys). I know it is not possible to handle this in the "KeyPressed()" function as Shift is a modifier and does not trigger key press event. I think the only way to catch this is in "keyStateChanged()" function. Does anybody know how this can be done?


Thanks for your helps


Maybe use Component::modifierKeysChanged()?


Yes, that solved the problem. I didn't know such a function exists. Thank you very much.