def send(hotkey, do_press=True, do_release=True):
_listener.is_replaying = True<EOL>parsed = parse_hotkey(hotkey)<EOL>for step in parsed:<EOL><INDENT>if do_press:<EOL><INDENT>for scan_codes in step:<EOL><INDENT>_os_keyboard.press(scan_codes[<NUM_LIT:0>])<EOL><DEDENT><DEDENT>if do_release:<EOL><INDENT>for scan_codes in reversed(step):<EOL><INDENT>_os_keyboard.release(scan_codes[<NUM_LIT:0>])<EOL><DEDENT><DEDENT><DEDENT>_listener.is_replaying = False<EOL>
Sends OS events that perform the given *hotkey* hotkey.

- `hotkey` can be either a scan code (e.g. 57 for space), single key
(e.g. 'space') or multi-key, multi-step hotkey (e.g. 'alt+F4, enter').
- `do_press` if true then press events are sent. Defaults to True.
- `do_release` if true then release events are sent. Defaults to True.

    send(57)
    send('ctrl+alt+del')
    send('alt+F4, enter')
    send('shift+s')

Note: keys are released in the opposite order they were pressed.