def tilde(self, proto, handler, buf):
            map = {1: proto.HOME, 2: proto.INSERT, 3: proto.DELETE,
                   4: proto.END,  5: proto.PGUP,   6: proto.PGDN,

                   15: proto.F5,  17: proto.F6, 18: proto.F7,
                   19: proto.F8,  20: proto.F9, 21: proto.F10,
                   23: proto.F11, 24: proto.F12}

            if buf.startswith('\x1b['):
                ch = buf[2:]
                try:
                    v = int(ch)
                except __HOLE__:
                    handler.unhandledControlSequence(buf + '~')
                else:
                    symbolic = map.get(v)
                    if symbolic is not None:
                        handler.keystrokeReceived(map[v], None)
                    else:
                        handler.unhandledControlSequence(buf + '~')
            else:
                handler.unhandledControlSequence(buf + '~')
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/conch/insults/insults.py/ServerProtocol.ControlSequenceParser.tilde