snickers10m
snickers10m

Reputation: 1749

How many java KeyCodes are there in KeyEvent?

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

Answers (2)

Chris Martin
Chris Martin

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

xenteros
xenteros

Reputation: 15852

These are all KeyCodes that can be returned by Key* method.

Upvotes: 0

Related Questions