Skip to content

Keyboard

anidivr edited this page Oct 21, 2022 · 4 revisions

Basic keyboard text, number and character input. Currently limited to English only.

image

keyboard code

Inputs

Name Type Default Description
text string blank Text value
allowenter boolean false Show Enter key and trigger event
selectable InteractiveObjects undefined Add to list of objects ray caster can test for overlap
keyboardcolor string Theme popup color (gray) Keyboard panel background color. Set to override theme color

Outputs

Name Type Description
pressed boolean Triggered when key button pressed
change number Triggered when text changed. Event contains new text
close boolean Triggered when interaction outside of keyboard. Event value is always true

Examples

<flat-ui-keyboard *ngIf="input.showkeyboard" [text]="input.method.text"
                  [position]="input.position" [rotation]="input.rotation" [scale]="scale" [selectable]="selectable"
                  (change)="input.method.text = $event" (close)="input.showkeyboard=false;input.closeinput()">
</flat-ui-keyboard>

Clone this wiki locally