Discussion Overview
The discussion revolves around finding a substitute for the getch() function in C programming on Linux, particularly focusing on capturing user input without displaying it on the screen. Participants explore various methods and functions available in the Linux environment.
Discussion Character
- Technical explanation
- Conceptual clarification
- Debate/contested
Main Points Raised
- One participant notes that getch() is a DOS-based command and seeks a Linux equivalent for capturing input without display.
- Another participant suggests using getchar(), but mentions that for capturing input character by character without waiting for the enter key, terminal settings must be adjusted.
- A request for clarification on the acronym "K&R" leads to a reference to "The C Programming Language" book, which is suggested as a resource for learning C.
- A participant explains that using termios is necessary to set the terminal to non-canonical mode for reading keystrokes, indicating that this approach is OS dependent.
- Another participant provides a link to a resource discussing key press detection in Unix programming.
Areas of Agreement / Disagreement
Participants present multiple approaches to the problem, with no consensus on a single solution. The discussion remains unresolved regarding the best method to substitute getch() on Linux.
Contextual Notes
Participants mention that the solution is OS dependent and that specific terminal settings must be configured, which may not be straightforward for all users.