on rajoute des vieux trucs
This commit is contained in:
26
ex_curses.c
Normal file
26
ex_curses.c
Normal file
@@ -0,0 +1,26 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ncurses.h>
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int key;
|
||||
|
||||
if (2 != argc) exit(1);
|
||||
|
||||
initscr(); /* first initialization */
|
||||
cbreak(); /* no line buffering */
|
||||
noecho(); /* be silent on input */
|
||||
keypad(stdscr, TRUE); /* acces touches curseur */
|
||||
|
||||
mvaddstr(10, 3, argv[1]);
|
||||
refresh();
|
||||
|
||||
key = getch();
|
||||
|
||||
endwin();
|
||||
printf("code touche %d\n", key);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user