A key name or character (e.g. "a", "space", "return", "f1"), resolved
true for key down, false for key up
Optionalmods: string[] | null
An array of modifier names (e.g. ["cmd", "shift"]), as accepted by hs.eventtap.keyStroke().
An HSEventTapEvent, or null if the key name is unknown
Create a keyboard event
If
modsis given, the event carries exactly those modifiers, whatever modifier keys are held when it's created. It is a single key event: to send a whole keystroke with modifiers to an application, including the modifier key presses some applications need to see, usehs.eventtap.keyStroke(mods, key, app).