hid-keys key repetition....
Posted: Tue Apr 10, 2007 9:37 pm
Hello I'm building a keyboard emulator using avr-hid and the hid keys demo...
i can't find any way to stop the computer from repeating a key...
i just want to be able to fire only one character until I release and press again. they computer seems to be repeating the code all the time...
this is my main event loop stripped to the core...
wdt_reset();
usbPoll();
key = PINC & 0x01;
if (( key == 1) && (lastKey == 0) ) {
while (!usbInterruptIsReady()) ;
buildReport(1);
usbSetInterrupt(reportBuffer, sizeof(reportBuffer));
}
lastKey = key;
as anybody got any idea?
massimo
i can't find any way to stop the computer from repeating a key...
i just want to be able to fire only one character until I release and press again. they computer seems to be repeating the code all the time...
this is my main event loop stripped to the core...
wdt_reset();
usbPoll();
key = PINC & 0x01;
if (( key == 1) && (lastKey == 0) ) {
while (!usbInterruptIsReady()) ;
buildReport(1);
usbSetInterrupt(reportBuffer, sizeof(reportBuffer));
}
lastKey = key;
as anybody got any idea?
massimo