A modifier key is a key on a computer’s keyboard that is only used in conjunction with another key. Modifier keys are often used with other keys to perform computer keyboard shortcuts and other commands. For example, in many text editor programs pressing the Ctrl+A will select all text.

Below is the list of Keyboard Modifiers that can be used with the Keyboard.press() function in the Arduino keyboard library.

keyboard
Photo by Karol D from Pexels

CommandKey in WindowsKey in OSX
KEY_LEFT_CTRLLeft CTRL
KEY_LEFT_SHIFTLeft SHIFTLeft SHIFT
KEY_LEFT_ALTLeft ALTLeft OPTION
KEY_LEFT_GUILeft WIN KEYLeft COMMAND
KEY_RIGHT_CTRLRight CTRL
KEY_RIGHT_SHIFTRight SHIFTRight SHIFT
KEY_RIGHT_ALTRight ALTOPTION
KEY_RIGHT_GUIRight WIN KEYRight COMMAND
KEY_UP_ARROWUP ARROWUP ARROW
KEY_DOWN_ARROWDOWN ARROWDOWN ARROW
KEY_LEFT_ARROWLEFT ARROWLEFT ARROW
KEY_RIGHT_ARROWRIGHT ARROWRIGHT ARROW
KEY_BACKSPACEBACKSPACEDELETE
KEY_TABTABTAB
KEY_RETURNENTERRETURN
KEY_ESCESCESC
KEY_INSERTINSERT
KEY_DELETEDELETE
KEY_PAGE_UPPAGE_UP
KEY_PAGE_DOWNPAGE_DOWN
KEY_HOMEHOME
KEY_ENDEND
KEY_CAPS_LOCKCAPSLOCKCAPSLOCK
KEY_F1F1F1
KEY_F2F2F2
KEY_F3F3F3
KEY_F4F4F4
KEY_F5F5F5
KEY_F6F6F6
KEY_F7F7F7
KEY_F8F8F8
KEY_F9F9F9
KEY_F10F10F10
KEY_F11F11F11
KEY_F12F12F12
KEY_F13SHIFT + F1FN + F1
KEY_F14SHIFT + F2FN + F2
KEY_F15SHIFT + F3FN + F3
KEY_F16SHIFT + F4FN + F4
KEY_F17SHIFT + F5FN + F5
KEY_F18SHIFT + F6FN + F6
KEY_F19SHIFT + F7FN + F7
KEY_F20SHIFT + F8FN + F8
KEY_F21SHIFT + F9FN + F9
KEY_F22SHIFT + F10FN + F10
KEY_F23SHIFT + F11FN + F11
KEY_F24SHIFT + F12FN + F12

Example Codes

Program to open a new window. Taken from arduino.cc

Leave a Reply

×
×

Basket