?? setterm.c
字號:
#include <curses.h>#include "curspriv.h"_PROTOTYPE( static void ttysetflags, (void) );static void ttysetflags(){ _tty.c_iflag |= ICRNL | IXON; _tty.c_oflag |= OPOST | ONLCR; _tty.c_lflag |= ECHO | ICANON | IEXTEN | ISIG; if (_cursvar.rawmode) { _tty.c_iflag &= ~(ICRNL | IXON); _tty.c_oflag &= ~(OPOST); _tty.c_lflag &= ~(ICANON | IEXTEN | ISIG); } if (_cursvar.cbrkmode) { _tty.c_lflag &= ~(ICANON); } if (!_cursvar.echoit) { _tty.c_lflag &= ~(ECHO | ECHONL); } if (NONL) { _tty.c_iflag &= ~(ICRNL); _tty.c_oflag &= ~(ONLCR); } tcsetattr(0, TCSANOW, &_tty);} /* ttysetflags */void raw(){ _cursvar.rawmode = TRUE; ttysetflags();} /* raw */void noraw(){ _cursvar.rawmode = FALSE; ttysetflags();} /* noraw */void echo(){ _cursvar.echoit = TRUE; ttysetflags();}void noecho(){ _cursvar.echoit = FALSE; ttysetflags();}void nl(){ NONL = FALSE; ttysetflags();} /* nl */void nonl(){ NONL = TRUE; ttysetflags();} /* nonl */void cbreak(){ _cursvar.cbrkmode = TRUE; ttysetflags();} /* cbreak */void nocbreak(){ _cursvar.cbrkmode = FALSE; ttysetflags();} /* nocbreak */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -