main () { system ("modprobe -r psmouse"); int x=714; int y=327; char mover[27]={'x','d','o','t','o','o','l',' ','m','o','u','s','e','m','o','v','e',' ','0','0','0','1',' ','0','0','0','1'}; int ch; IniVideo(); printw("Presione esc para terminar"); for(;;) { ch= getch(); switch(ch) { case 260: if(x>65) x-=8; break; case 261: if(x<786) x+=8; refresh(); break; case 259: if(y>54) y-=8; break; case 258: if(y<479) y+=8; break; case 27: Exit(); } sinc( mover, x, y); system("sleep 0.001"); system(mover); IniVideo(); } Exit(); }
main () { IniVideo(); move(7, 30); /* x , y */ printw("Ctrl-C para terminar"); for(;;) { move(12, 30); /* x , y */ printw("%3d", getch()); refresh(); } Exit(); }