How do you determine if a character requires the shift key to be down to be typed?
问题 I am writing some code to type strings using the Robot class. Everything is mostly good (well, I have to use a big switch statement to get character keycodes), except some keys don't have keycodes, because they are actually a combination of Shift + some other key. For upper case letters, it is easy to check, using Character.isUpperCase(c) , but for all the symbols such as !@#$%^&*()_+ and various punctuation are not considered "upper case" although they do require shift to be pressed in order