The Keyboard variable lets you interact with the currently active keyboard.
Properties
| Name |
Type |
Description |
Get |
Set |
| Name |
string |
Returns or sets the name of the current keyboard. |
Yes |
No |
| Slug |
string |
Returns or sets the slug (clean name) of the current keyboard. |
Yes |
No |
| Width |
int |
Returns the width of the current keyboard, each column represents a column of real-life keys. |
Yes |
No |
| Height |
int |
Returns the height of the current keyboard, each row represents a row of real-life keys. |
Yes |
No |
Functions
PressKeys
Presses each letter in the provided string
Syntax:
PressKeys(string keys);
Example:
Keyboard.PressKeys("Hello!");
GetKeyPosition
If found, returns the location of the given key. For a list of available keys see this article.
Note: This is case-sensitive
Syntax:
GetKeyPosition(string key);
Example:
local keyPosition = Keyboard.GetKeyPosition("A");
print("Position X: ".. keyPosition.X .. ", Y: " .. keyPosition.Y);
Result:
Position X: 5, Y: 4