

def press(keys, presses=1, interval=0.0, pause=None, _pause=True):
    'Performs a keyboard key press down, followed by a release.\n\n    Args:\n      key (str, list): The key to be pressed. The valid names are listed in\n      KEYBOARD_KEYS. Can also be a list of such strings.\n      presses (integer, optiional): the number of press repetition\n      1 by default, for just one press\n      interval (float, optional): How many seconds between each press.\n      0.0 by default, for no pause between presses.\n      pause (float, optional): How many seconds in the end of function process.\n      None by default, for no pause in the end of function process.\n    Returns:\n      None\n    '
    if (type(keys) == str):
        keys = [keys]
    else:
        lowerKeys = []
        for s in keys:
            if (len(s) > 1):
                lowerKeys.append(s.lower())
            else:
                lowerKeys.append(s)
    interval = float(interval)
    for i in range(presses):
        for k in keys:
            _failSafeCheck()
            platformModule._keyDown(k)
            platformModule._keyUp(k)
        time.sleep(interval)
    _autoPause(pause, _pause)

dataset/ETHPy150Open asweigart/pyautogui/pyautogui/__init__.py press/original