Input.key_label
Input.key_label(key) -> string
Returns the name to show for key. The letter, digit and punctuation codes that Input.key_down reads are physical keys, named for what they type on a US layout: 'w' is the key above 's' on every keyboard, whatever layout, language, input method or Caps Lock state the player has. So WASD is always under the left hand, and the label is what that key types in the player's layout - "W" on QWERTY, "Z" on AZERTY. Space, Enter, Esc, Tab, Backspace, Shift, Ctrl, Alt and the arrows get words, and a code with no name returns "". The keys that type no character - F1-F12, Home, End, PageUp, PageDown, Insert, Delete, Caps Lock and the numpad, codes 132-166 - are named "F1", "Home", "CapsLock", "Num 0", "Num /" and so on, and the layout is not asked: a key that types nothing is called the same thing on every layout.
On Windows the label is read from the active layout. Headless, on macOS and in the browser it is the US character, upper case.
Example
program Demo {
entry {
print(Input.key_label('w'))
print(Input.key_label(32))
print(Input.key_label(Key.Left))
}
}