configure a queue for accepting characters and return the queue

def configInputQueue():
    """ configure a queue for accepting characters and return the queue
    """
    def captureInput(iqueue):
        while True:
            c = getch()
            if c == '\x03' or c == '\x04':    # end on ctrl+c / ctrl+d
                log.debug("Break received (\\x{0:02X})".format(ord(c)))
                iqueue.put(c)
                break
            log.debug(
                "Input Char '{}' received".format(
                    c if c != '\r' else '\\r'))
            iqueue.put(c)

    input_queue = queue.Queue()
    input_thread = threading.Thread(target=lambda: captureInput(input_queue))
    input_thread.daemon = True
    input_thread.start()
    return input_queue, input_thread