Key
case Leftcase Rightcase Upcase Downcase Spacecase Entercase Escapecase Backspacecase F3case Other(Int32)A key, named rather than numbered.
The runtime translates AWT's keyCode into these, so no game code ever mentions a key
code.
Instances
Definitions
The digit a key stands for, if it is one of the number keys.
AWT reports keyCode, and for the number row those values are ASCII digits, so this
is a subtraction rather than a table.
Translates an AWT key code.
The numbers are java.awt.event.KeyEvent's VK_ constants, which is also what
Processing reported -- it passed AWT's codes straight through -- so this table did not
have to change when the window did.
The letter a key stands for, if it is one of A-Z.
AWT reports keyCode, and for letters those values are ASCII uppercase, so this is a
conversion rather than a table. It is also why initials are uppercase only: keyCode
carries no shift state.
A character that may appear in a name: A-Z or 0-9.
Two separate lookups rather than one range, because keyCode puts the digits well
below the letters and nothing sensible lies between them. Scores.clean accepts the
same set on the way in from a file, so what can be typed and what can be stored agree.