Component::keyPressed() --- How to make it ignore "Shift" key?

I want to be able to do the following using Component::keyPressed() method:

  • Read keys regularly like the method was designed for.
  • Read Shift + Number keys so that I get the number key instead of the special character that usually comes from Shift + Number.

For example when I press “5”, I want to get “5”.
When I press Shift + “5”, I want to get “5” and not “%”.

In other words I want to make Shift NOT affect the keyboard input at all, but to be able to read the state of the shift separately if needed.

Is this possible? If it is, how to achieve this?

It seems that keyStateChanged() method doesn’t catch this either, so it’s not possible to solve this issue by creating my own handler in keyStateChanged() ?

KeyPress::isKeyCurrentlyDown(‘5’) recognises only the key “5” when the Shift is not held down. If I press Shift and then “5”, isKeyCurrentlyDown() doesn’t seem to react at all.