Ie, how to get keystrokes send directly to my program without waiting for the user to press enter. Basicly I'm trying get something like curses's cbreak()
call. (But I can't use curses due a couple of bugs/misfeatures that I haven't been able to work around.) This seems like something that should just be a trival escape sequence, but I haven't been able find anything.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Lookup termios
and the tcsetattr
function.
回答2:
Isn't this called the "raw mode"? If so, this might help you.