# Class TwinfinityTargetCameraKeyboardInput<TCamera>

Manage the keyboard inputs to control the movement of a TargetCamera.

#### See

http://doc.babylonjs.com/how_to/customizing_camera_inputs

#### Type Parameters

- TCamera extends Camera

#### Implements

- ICameraInput<TCamera>

##### Index

### Constructors

constructor

### Properties

camera
keysDown
keysLeft
keysRight
keysUp

### Methods

attachControl
checkInputs
detachControl
getClassName
getSimpleName

## Constructors

### constructor

- new TwinfinityTargetCameraKeyboardInput<TCamera extends TargetCamera>(
  _cameraOptions: CameraOptions,
  ): TwinfinityTargetCameraKeyboardInput<TCamera>

  #### Type Parameters

  - TCamera extends TargetCamera

  #### Parameters

  - _cameraOptions: CameraOptions

  #### Returns TwinfinityTargetCameraKeyboardInput<TCamera>

## Properties

### camera

camera: TCamera

Defines the camera the input is attached to.

Implementation of ICameraInput.camera

### keysDown

keysDown: number[] = ...

Gets or Set the list of keyboard keys used to control the backward move of the camera.

### keysLeft

keysLeft: number[] = ...

Gets or Set the list of keyboard keys used to control the left strafe move of the camera.

### keysRight

keysRight: number[] = ...

Gets or Set the list of keyboard keys used to control the right strafe move of the camera.

### keysUp

keysUp: number[] = ...

Gets or Set the list of keyboard keys used to control the forward move of the camera.

## Methods

### attachControl

- attachControl(noPreventDefault?: boolean): void

  Attach the input controls.

  #### Parameters

  - `Optional` noPreventDefault: boolean

    Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)

  #### Returns void

  Implementation of ICameraInput.attachControl

### checkInputs

- checkInputs(): void

  Update the current camera state depending on the inputs that have been used this frame. This is a dynamically created lambda to avoid the performance penalty of looping for inputs in the render loop.

  #### Returns void

  Implementation of ICameraInput.checkInputs

### detachControl

- detachControl(): void

  Detach the current controls from the specified dom element.

  #### Returns void

  Implementation of ICameraInput.detachControl

### getClassName

- getClassName(): string

  Gets the class name of the current intput.

  #### Returns string

  the class name

  Implementation of ICameraInput.getClassName

### getSimpleName

- getSimpleName(): string

  Get the friendly name associated with the input class.

  #### Returns string

  the input friendly name

  Implementation of ICameraInput.getSimpleName