

def tty_signal_keys(self, intr=None, quit=None, start=None, stop=None, susp=None, fileno=None):
    "\n        Read and/or set the tty's signal character settings.\n        This function returns the current settings as a tuple.\n\n        Use the string 'undefined' to unmap keys from their signals.\n        The value None is used when no change is being made.\n        Setting signal keys is done using the integer ascii\n        code for the key, eg.  3 for CTRL+C.\n\n        If this function is called after start() has been called\n        then the original settings will be restored when stop()\n        is called.\n        "
    if (fileno is None):
        fileno = sys.stdin.fileno()
    if (not os.isatty(fileno)):
        return
    tattr = termios.tcgetattr(fileno)
    sattr = tattr[6]
    skeys = (sattr[termios.VINTR], sattr[termios.VQUIT], sattr[termios.VSTART], sattr[termios.VSTOP], sattr[termios.VSUSP])
    if (intr == 'undefined'):
        intr = 0
    if (quit == 'undefined'):
        quit = 0
    if (start == 'undefined'):
        start = 0
    if (stop == 'undefined'):
        stop = 0
    if (susp == 'undefined'):
        susp = 0
    if (intr is not None):
        tattr[6][termios.VINTR] = intr
    if (quit is not None):
        tattr[6][termios.VQUIT] = quit
    if (start is not None):
        tattr[6][termios.VSTART] = start
    if (stop is not None):
        tattr[6][termios.VSTOP] = stop
    if (susp is not None):
        tattr[6][termios.VSUSP] = susp
    if ((intr is not None) or (quit is not None) or (start is not None) or (stop is not None) or (susp is not None)):
        termios.tcsetattr(fileno, termios.TCSADRAIN, tattr)
        self._signal_keys_set = True
    return skeys

dataset/ETHPy150Open AnyMesh/anyMesh-Python/example/urwid/display_common.py RealTerminal.tty_signal_keys/original