@classmethod
def getch(cls):
    """
        Get the integer value for the keypress, such as 27 for escape.

        :return: integer keycode of keypress
        """
    if cls.KEY_EVENTS.empty():
        return None
    return cls.KEY_EVENTS.get()
