def process_char(self, c):
        if ord(c) == 27: # Esc
            if OS == 'Linux':
                fitc1 = self.fast_input_test()
                if ord(fitc1) == 91:
                    fitc2 = self.fast_input_test()
                    if 65 <= ord(fitc2) <= 68:
                        self.process_direction_char(fitc2)
                        return
            sys.stdout.write('\r' + ' ' * 50 + '\r')
            sys.stdout.flush()
            self.reprint_input()
            self.outPip.append(c)
            time.sleep(0.02)
            if 'fitc1' in dir():
                self.process_char(fitc1)
                self.cursor += 1
            if 'fitc2' in dir():
                self.process_char(fitc2)
                self.cursor += 1
        elif ord(c) == 3: # Ctrl+C
            self.stop()
            self.isPause = True
            if raw_input('Exit?(y) ') == 'y':
                sys.stdout.write('Command Line Exit')
            else:
                self.start()
            self.isPause = False
        elif ord(c) in (8, 127): # Backspace
            if self.strBuff: 
                if ord(self.strBuff[-1]) < 128:
                    sys.stdout.write('\b \b')
                else:
                    sys.stdout.write('\b\b \b')
                    if OS == 'Linux':
                        self.strBuff.pop()
                        self.strBuff.pop()
                self.strBuff.pop()
                self.cursor -= 1
        elif c == '\n':
            if self.strBuff:
                if self.inputMaintain: 
                    sys.stdout.write(c)
                else:
                    sys.stdout.write('\r' + ' ' * 50 + '\r')
                sys.stdout.flush()
                self.reprint_input()
                self.output_command(''.join(self.strBuff))
                self.strBuff = []
            self.historyCmd = -1
        elif ord(c) == 224: # Windows direction
            if OS == 'Windows':
                direction = self.getch()
                self.process_direction_char(direction)
        else:
            sys.stdout.write(c)
            sys.stdout.flush()
            self.strBuff.append(c)
            self.cursor += 1