# keyboard

{% hint style="info" %}
This uses <https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.keys?view=windowsdesktop-9.0> and we use it as a lowercase for keys.
{% endhint %}

### Is Key Down?

```javascript
keyboard.isKeyDown(Keys: key);
```

Example:

```javascript
if (keyboard.isKeyDown(keys.Space)) 
{
    client.print("space bar is pressed");
}
```

### Is Key Up?

```javascript
keyboard.isKeyUp(Keys: key)
```

### Press Key

```javascript
keyboard.pressKey(Keys: key);
```

### Press Key With Modifier

```javascript
keyboard.pressKeyWithModifier(Keys: modifer, Keys: key)
```

Example:

```javascript
keyboard.pressKeyWithModifier(keys.CTRl, keys.C)
```

### Hold Key

```javascript
keyboard.holdKey(Keys: key, int: time);
```

### Type

```javascript
keyboard.type(char: text);
```
