Programs - KeyPush


Aim

Yes, I know there are other program that do the job better, but I wanted somthing simple. With a certain network program that we use at school - it will remain anonymous - you HAVE to type in a username as it starts. It is imposssible to tell it on the command line what username settings it must use. So what I did was write a program that puts a carecter into the keyboard buffer. This then fools the program into thinking you typed it in.

Method

The keyboard buffer resides in low memory at 0:41Eh (This value can be obtained by looking at 0:480h). The two words before the buffer define where the next key press must go, and where the computer must process keypresses from. If the two offsets are equal then there are no keys to process.

What the program does is find where the next spare spot is, put the keypress in there and then increase the pointer to the next spare spot. This is the same thing that happens when a key is pressed and therefore fools the computer into thinking on was acctually pressed.

FYI: There is a place in memory which defines the location of the keyboard buffer, if these numbers are changed then the keyboard buffer could be extended past the 16 key limit.