Class: Keyboard

Babylon. Keyboard


new Keyboard(desktop, options)

Keyboard is a 3d keyboard that sends emulated keyboard events for the computer

Parameters:
Name Type Description
desktop Computer

The desktop that the keyboard is connected to

options object

The options passed to the keyboard used for hiding & showing icons

Properties
Name Type Argument Default Description
initialPosition object <optional>
{ x: 0, y: -0.5, z: 0 }

The initial position of the keyboard

initialScalar number <optional>
0.5

The initial scale of the keyboard object

hideResizeIcon boolean <optional>
false

The boolean for hiding resize keyboard icon, set true to hide

hideMoveIcon boolean <optional>
false

The boolean for hiding the move keyboard icon, set true to hide

keyboardBGColor string <optional>
rgb(10, 10, 10)

The keyboard background color (the plate behind the keys)

keyColor string <optional>
rrgb(75, 75, 75)

The default color of the keyboard keys

activeKeyColor string <optional>
rgb(55, 55, 200)

The color of a key while being pressed

highlightColor string <optional>
rgb(10, 10, 10)

The color of the key when hovering over

iconActiveColor string <optional>
rgb(0, 255, 255)

The active icon color

iconColor string <optional>
rgb(255, 255, 255)

The default icon color

Properties:
Name Type Argument Default Description
scene scene <optional>
desktop.scene

The scene that the keyboard will be added to

room room <optional>
desktop.room

The room that the keyboard will send events to