1681-engine / index / keyLabel
Function: keyLabel() ​
ts
function keyLabel(code, names?): string;Defined in: src/input/Keymap.ts:254
How a key code reads on screen: "KeyW" is W, "Digit1" is 1, "Numpad3" is "Num 3", a chord "Shift+Tab" each part in turn. names overrides any code or modifier (a game's own language for the arrows and modifiers).
Parameters ​
| Parameter | Type |
|---|---|
code | string |
names | Readonly<Record<string, string>> |
Returns ​
string