

def writekeyevent(self, keyevent, x=None, y=None, fgcolor=None, bgcolor=None):
    '\n        Writes a character to the PygcurseSurface that the Pygame key event object represents. A foreground and background color can optionally be supplied. An xy cell coordinate can also be supplied, but the current cursor position is used by default.\n\n        - keyevent is the KEYDOWN or KEYUP event that pygame.event.get() returns. This event object contains the key information.\n        '
    if ((x is None) or (y is None)):
        x = self._cursorx
        y = self._cursory
    if (not self.isonscreen(x, y)):
        return
    char = interpretkeyevent(keyevent)
    if (char is not None):
        self.putchar(char, x=x, y=y, fgcolor=fgcolor, bgcolor=bgcolor)

dataset/ETHPy150Open asweigart/pygcurse/pygcurse/__init__.py PygcurseSurface.writekeyevent/original