KeyBindingValue
KeyBindingValue is a union type that represents the keys associated with a particular KeyBindingType.
type KeyBindingValue = WebKeyboardKey[] | WebKeyboardKey | null;WebKeyboardKeyis an alias ofstring(case-insensitive). See the MDN key values (opens in a new tab) list for valid values.nullindicates no binding (the action will be disabled until a key is assigned).
Examples
Single key
game.keyMap.setKeyBinding(KeyBindingType.skipAction, " "); // Space keyMultiple keys
game.keyMap.setKeyBinding(KeyBindingType.skipAction, ["Control", "F3"]);Remove binding
game.keyMap.setKeyBinding(KeyBindingType.skipAction, null);See also: KeyBindingType, KeyMap.