

def interpretkeyevent(keyEvent):
    'Returns the character represented by the pygame.event.Event object in keyEvent. This makes adjustments for the shift key and capslock.'
    key = keyEvent.key
    if (((key >= 32) and (key < 127)) or (key in (ord('\n'), ord('\r'), ord('\t')))):
        caps = bool((keyEvent.mod & KMOD_CAPS))
        shift = bool(((keyEvent.mod & KMOD_LSHIFT) or (keyEvent.mod & KMOD_RSHIFT)))
        char = chr(key)
        if (char.isalpha() and (caps ^ shift)):
            char = char.upper()
        elif (key and (char in _shiftchars)):
            char = _shiftchars[char]
        return char
    return None

dataset/ETHPy150Open asweigart/pygcurse/pygcurse/__init__.py interpretkeyevent/VarMisuse@129/208 `shift`->`key`