I want to find...

Search

Shares

Table of Content

Keyboard Modifiers

The Keyboard.write() and Keyboard.press() and Keyboard.release() commands don’t work with every possible ASCII character, only those that correspond to a key on the keyboard. For example, backspace works, but many of the other non-printable characters produce unpredictable results. For capital letters (and other keys), what’s sent is shift plus the character (i.e. the equivalent of pressing both of those keys on the keyboard).

A modifier key is a special key on a computer keyboard that modifies the normal action of another key when the two are pressed in combination.

For more on ASCII values and the characters or functions they represent, see asciitable.com.

For multiple key presses use Keyboard.press().

The 86Duino’s definitions for modifier keys are listed below:

KeyHexadecimal valueDecimal value
KEY_LEFT_CTRL0x80128
KEY_LEFT_SHIFT0x81129
KEY_LEFT_ALT0x82130
KEY_LEFT_GUI0x83131
KEY_RIGHT_CTRL0x84132
KEY_RIGHT_SHIFT0x85133
KEY_RIGHT_ALT0x86134
KEY_RIGHT_GUI0x87135
KEY_UP_ARROW0xDA218
KEY_DOWN_ARROW0xD9217
KEY_LEFT_ARROW0xD8216
KEY_RIGHT_ARROW0xD7215
KEY_BACKSPACE0xB2178
KEY_TAB0xB3179
KEY_RETURN0xB0176
KEY_ESC0xB1177
KEY_INSERT0xD1209
KEY_DELETE0xD4212
KEY_PAGE_UP0xD3211
KEY_PAGE_DOWN0xD6214
KEY_HOME0xD2210
KEY_END0xD5213
KEY_CAPS_LOCK0xC1193
KEY_F10xC2194
KEY_F20xC3195
KEY_F30xC4196
KEY_F40xC5197
KEY_F50xC6198
KEY_F60xC7199
KEY_F70xC8200
KEY_F80xC9201
KEY_F90xCA202
KEY_F100xCB203
KEY_F110xCC204
KEY_F120xCD205

Language Reference Home

The text of the 86Duino reference is a modification of the Arduino reference and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.

Leave a Comment

Scroll to Top