1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-12 21:38:38 +00:00
5
Keyboard
Robert Beekman edited this page 2017-01-05 11:42:50 +01:00

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