From: Ralf J. <jue...@cs...> - 2008-01-10 17:14:44
|
On Thu, 10 Jan 2008, L=E9on Bottou wrote: > On Jan 9, 2008, at 11:06 PM, Ralf Juengling wrote: >> signals, ok. But a hypothetic 'read-char' function that switches >> to tty raw mode, waits for one character, then switches back to >> cooked mode and returns the character, would not have to deal with >> errors. > > But you will still have to handle graphic events > and make sure the thing interacts nicely with readline. ugh, that's right. > Check the function console_wait_for_char() in unix.c. > This is called from within readline while the terminal is in raw mode > (readline uses raw mode to implement line editing). > The readline functions rl_prep_terminal() and rl_deprep_terminal() ok, thanks for the pointers. Ralf |