Send a key down and key up event with optional modifier keys.
A 5 ms pause is inserted between the key-down and key-up events to improve
compatibility with applications that miss very fast synthetic keystrokes.
through the current keyboard layout (see hs.keycodes.map), or a numeric virtual key code,
which always presses the same physical key
Parameters
mods: string[]
An array of modifier names (e.g. ["cmd", "shift"])
key: string|number
A key name or character (e.g. "a", "space", "return"), resolved
Send a key down and key up event with optional modifier keys. A 5 ms pause is inserted between the key-down and key-up events to improve compatibility with applications that miss very fast synthetic keystrokes. through the current keyboard layout (see
hs.keycodes.map), or a numeric virtual key code, which always presses the same physical key