inputByName

fun inputByName(name: String): InputConstants.Key

Translates a key name to an InputUtil.Key using GLFW key codes. If the name is unrecognized, defaults to NONE.

The input can be provided in the following formats:

  • Full key name: "key.mouse.left", "key.keyboard.a", "key.keyboard.keypad.decimal"

  • Abbreviated: "a" -> "key.keyboard.a", "lshift" -> "key.keyboard.left_shift"

Return

The corresponding InputUtil.Key object.

Parameters

name

The key name as a string.