Reputation: 1749
How many codes can be returned by KeyEvent.getKeyCode()?
What is the range of the codes returned by KeyEvent.getKeyCode()?
Are the KeyCodes listed on the javadoc for KeyEvent (VK_?) the only KeyCodes that can be returned, or are there more?
Upvotes: 1
Views: 1551
Reputation: 30746
It doesn't look like there are any such guarantees, judging by this paragraph from the documentation:
WARNING: Aside from those keys that are defined by the Java language (VK_ENTER, VK_BACK_SPACE, and VK_TAB), do not rely on the values of the VK_ constants. Sun reserves the right to change these values as needed to accomodate a wider range of keyboards in the future.
Upvotes: 2