# Keyboard

## `key`

This built-in variable stores the **value** of the **most recently pressed key.** For example, if the user presses **'m'**, then **'b'** :&#x20;

**key** will be equal to **'b'**&#x20;

## `keyIsPressed`

&#x20;This built-in variable has the value `True` **if any key is pressed at the moment**. It has the value `False` otherwise. (Boolean datatype)

## `keyCode`

This built-in variable stores the **key code** of the **last key** that was pressed.

Here are some **built-in constants** that can be used

```python
ENTER = 13
SHIFT = 16
UP_ARROW = 38
DOWN_ARROW = 40
LEFT_ARROW = 37
RIGHT_ARROW = 39
```

In general, you can search the web for: `key code of ###` or look at [this website](https://www.toptal.com/developers/keycode).

{% hint style="info" %}
Find these documents helpful? Let the people who made them help your child learn to code at [**Strivemath**](https://www.strivemath.com/)<mark style="color:blue;">**!**</mark>

We'd love to hear your Feedback/Comments [here](https://docs.google.com/forms/d/e/1FAIpQLSeqorBAGTya-YBRI-VFjJxtgQtCz3ucGDI96K96sNyuaGuvdw/viewform?usp=sf_link).
{% endhint %}
