Next: , Previous: Output, Up: Curses


5.12.5 Input

— Function: read-char win

A character is read from the terminal associated with the window win. Depending on the setting of cbreak, this will be after one character (CBREAK mode), or after the first newline (NOCBREAK mode). Unless noecho has been set, the character will also be echoed into win.

When using read-char, do not set both NOCBREAK mode (nocbreak) and ECHO mode (echo) at the same time. Depending on the state of the terminal driver when each character is typed, the program may produce undesirable results.

— Function: winch win

The character, of type chtype, at the current position in window win is returned. If any attributes are set for that position, their values will be OR'ed into the value returned.

— Function: getyx win

A list of the y and x coordinates of the cursor position of the window win is returned