Monday, January 18, 2010

How do I control the keyboard using C?

I want to have a program that will space bar repeatedly when I press a certain key and stop when i press another one. I have very little knowledge of programming in C. Thank youHow do I control the keyboard using C?
#include%26lt;stdio.h%26gt;


#include%26lt;conio.h%26gt;


void main()


{


int i,j,k;


clrscr();


i=getche();


printf(';\n';);


if(i==13) // 13 is the ascii value of enter


{


while(!kbhit())


{


printf('; ';);


}


}


getch();


}


so the program will be printing spaces only if you press enter.How do I control the keyboard using C?
You do your mom!
  • face mask
  • No comments:

    Post a Comment