MCPcopy Create free account
hub / github.com/demoth/jake2 / KeynumToString

Method KeynumToString

client/src/main/java/jake2/client/Key.java:454–464  ·  view source on GitHub ↗

Returns a string (either a single ascii char, or a K_ name) for the given keynum.

(int keynum)

Source from the content-addressed store, hash-verified

452 * given keynum.
453 */
454 static String KeynumToString(int keynum) {
455 if (keynum < 0 || keynum > 255)
456 return "<KEY NOT FOUND>";
457 if (keynum > 32 && keynum < 127)
458 return Character.toString((char) keynum);
459
460 if (keynames[keynum] != null)
461 return keynames[keynum];
462
463 return "<UNKNOWN KEYNUM>";
464 }
465
466 /**
467 * Returns a key number to be used to index keybindings[] by looking at

Callers 6

DrawKeyBindingFuncMethod · 0.95
Keys_MenuKey_fMethod · 0.95
EventMethod · 0.95
Key_Bindlist_fMethod · 0.95
WriteBindingsMethod · 0.95
DrawInventoryMethod · 0.95

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected