def config_credentials(data):

    def write_user(user):

        def process(x):
            Keyboard.Type(user, len(x))
        return process

    def write_pass(password):

        def process(x):
            Keyboard.Type(password, len(x))
            Clipboard.Stage(password)
        return process
    hotkeys_user = HotKeys(Keyboard.CTRL, Keyboard.ALT, Keyboard.KEY('u'))
    hotkeys_pass = HotKeys(Keyboard.CTRL, Keyboard.ALT, Keyboard.KEY('p'))
    hotkeys_conf = {hotkeys_user: {}, hotkeys_pass: {}}
    for (key, entry) in data.items():
        hotkeys_conf[hotkeys_user][SeqKeys(*[Keyboard.KEY(x) for x in key])] = write_user(entry['user'])
        hotkeys_conf[hotkeys_pass][SeqKeys(*[Keyboard.KEY(x) for x in key])] = write_pass(entry['pass'])
    return hotkeys_conf
def config_credentials(data):

    def write_user(user):

        def process(x):
            Keyboard.Type(user, len(x))
        return process

    def write_pass(password):

        def process(x):
            Keyboard.Type(password, len(x))
            Clipboard.Stage(password)
        return process
    hotkeys_user = HotKeys(Keyboard.CTRL, Keyboard.ALT, Keyboard.KEY('u'))
    hotkeys_pass = HotKeys(Keyboard.CTRL, Keyboard.ALT, Keyboard.KEY('p'))
    hotkeys_conf = {hotkeys_user: {}, hotkeys_pass: {}}
    for (key, entry) in data.items():
        hotkeys_conf[hotkeys_user][SeqKeys(*[Keyboard.KEY(x) for x in key])] = write_user(entry['user'])
        hotkeys_conf[hotkeys_pass][SeqKeys(*[Keyboard.KEY(x) for x in key])] = write_pass(entry['pass'])
    return hotkeys_conf