I was using event.unicode for this task previously. If I hit shift+9, then the event for the key down has a unicode attribute of ‘(‘. And if I hit shift+alt+9, then the event for the key down has a unicode attribute of ‘(‘, and the keyboard also sends a keydown for an alt key, so that I know one was pressed.
If, however, I press ctrl+shift+9, then event.unicode == u''. How do I get u'(' back from that?
(similarly, for ctrl+shift+a, I get '\x01')
Well, all keystrokes you revieve while CTRL is pressed are “altered”, since this was the whole intention for creating the CTRL key: Sending control instructions instead of simply text.
If you look at a ASCII table, you’ll see e.g. how CTRL+H maps to the control character
BS (Backspace).So, no chance for you here to recieve
'('on CTRL+SHIFT+9 simply throughKEY_DOWN.You’ll have to go through
pygame.key.get_pressed()to check for pressed keys.