Skip to content

Commit

Permalink
add InputTextArea support for VirtualKeyboard
Browse files Browse the repository at this point in the history
  • Loading branch information
ycaptain committed Jul 14, 2022
1 parent ab72a23 commit 0f367c3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/dev/gui/src/2D/controls/virtualKeyboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type { TextBlock } from "./textBlock";
import type { InputText } from "./inputText";
import { RegisterClass } from "core/Misc/typeStore";
import type { AdvancedDynamicTexture } from "../advancedDynamicTexture";
import { InputTextArea } from "./inputTextArea";

/**
* Class used to store key control properties
Expand Down Expand Up @@ -212,7 +213,11 @@ export class VirtualKeyboard extends StackPanel {
this._currentlyConnectedInputText.processKey(13);
return;
}
this._currentlyConnectedInputText.processKey(-1, this.shiftState ? key.toUpperCase() : key);
if (this._currentlyConnectedInputText instanceof InputTextArea) {
(this._currentlyConnectedInputText as InputTextArea).alternativeProcessKey('', this.shiftState ? key.toUpperCase() : key);
} else {
this._currentlyConnectedInputText.processKey(-1, this.shiftState ? key.toUpperCase() : key);
}

if (this.shiftState === 1) {
this.shiftState = 0;
Expand Down

0 comments on commit 0f367c3

Please sign in to comment.