def get_type_strings(keyboard_events, allow_backspace=True):
    """
	Given a sequence of events, tries to deduce what strings were typed.
	Strings are separated when a non-textual key is pressed (such as tab or
	enter). Characters are converted to uppercase according to shift and
	capslock status. If `allow_backspace` is True, backspaces remove the last
	character typed. Control keys are converted into pywinauto.keyboard key codes
	"""
    backspace_name = 'backspace'
    shift_pressed = False
    capslock_pressed = False
    string = ''
    for event in keyboard_events:
        name = event.name
        if event.name == 'space':
            name = ' '
        if 'shift' in event.name:
            shift_pressed = event.event_type == 'down'
        elif event.name == 'caps lock' and event.event_type == 'down':
            capslock_pressed = not capslock_pressed
        elif allow_backspace and event.name == backspace_name and event.event_type == 'down':
            string = string[:-1]
        elif event.event_type == 'down':
            if len(name) == 1:
                if shift_pressed ^ capslock_pressed:
                    name = name.upper()
                string = string + name
            else:
                if string:
                    yield '"' + string + '"'
                if 'windows' in event.name:
                    yield '"' + '{LWIN}' + '"'
                elif 'enter' in event.name:
                    yield '"' + '{ENTER}' + '"'
                string = ''
