Add a flag which specifies whether to wait for user input, or just read the last typed char, or first char of buffer