def getKey(event):
    """Returns the Key Identifier of the given event.

    Available Codes: https://www.w3.org/TR/2006/WD-DOM-Level-3-Events-20060413/keyset.html#KeySet-Set
    """
    if hasattr(event, "key"):
        return event.key

    elif hasattr(event, "keyIdentifier"):
        if event.keyIdentifier in ["Esc", "U+001B"]:
            return "Escape"
        else:
            return event.keyIdentifier

    return None