three-story-controls

Home > three-story-controls > KeyboardAdaptorProps > keyMapping

KeyboardAdaptorProps.keyMapping property

Default key mapping uses forward/backward/up/down/left/right as semanic labels, with WASD and arrow keys mapped appropriately:

Signature:

keyMapping?: KeyMapping;

Example

keyMapping

{
  forward: ['ArrowUp', 'w', 'W'],
  backward: ['ArrowDown', 's', 'S'],
  left: ['ArrowLeft', 'a', 'A'],
  right: ['ArrowRight', 'd', 'D'],
  up: ['u', 'U'],
  down: ['n', 'N'],
}