Quote Originally Posted by Kamikaze47 View Post
Hi,
I realize I am resurrecting an old thread here, but I'm trying to get an 18F4550 to act as a "virtual keyboard". I've used Merfy's KBDDESC.ASM (above) and i've managed to get the PC to detect it as a keyboard, and can send keystrokes, however when I do, it seems to send the keystroke over and over and over until I send another one.
If I do this for example (and keep in mind this line is only run once):
USBOut 1, buffer, 8, endgame
where buffer=[0,0,$14,0,0,0,0,0] ' ($14=q)
the pc types "qqqqqqqqqqqqqqqqqqqqqq....." and on forever.
any suggestions?
Not really sure if this has anything to do with your problem...
http://www.beyondlogic.org/keyboard/keybrd.htm

Looks to me like you you're on the right track...just not all the way there yet.
You've told the PC that you've pressed the 'q' key, but you haven't told the PC that you've released it, therefore, it repeats.
The first paragraph of the link above has some good info in it on the whole keyboard theory...should give you all the answers you need.