[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] loss of rapidly repeated keypresses (from a barcode gun keyboard)
- To: pygame-users <pygame-users@xxxxxxxx>
- Subject: [pygame] loss of rapidly repeated keypresses (from a barcode gun keyboard)
- From: Bob the Hamster <Bob@xxxxxxxxxxxxxxxxxxx>
- Date: Wed, 2 Dec 2009 09:40:04 -0800
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Wed, 02 Dec 2009 12:40:08 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=3meC9OfLTMKOZGKA5ZTUZuMsN98OLWNNxPewqDrw7IA=; b=vKeKRFNVUWJ82kbS/7ySJJdKD/pSytKLOMXRtDNPUh0uLrCUOOosW6hR+1P9aQu6aB uVhqBY78yC4lD6e2e6sv9YJJ9IGPqOtzAwgGBFxyo7D0oEqlbHSBjvREvI9pOje5EFNG O6Yg8NxtrtgxH1gweP1kfIMNSi8oOqLLljv7s=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=ZzXismQTn4IYykXQ+AEawUfJOoOTqQy6JPAQXJz/fJGAyDbd4zClfS11BKiJvXWghG FhcxvEAW08ty+ckSiD+R0apxXnT+3FLjG2T7GRjGIrqd4fGcOPuYtDJ3Oq7JIvktXK/L zRQLCO+vdokvoRn8PZEO2S8R0dQtpZHL4l85w=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
I am writing a pygame application that uses a USB barcode gun which
behaves as a keyboard. (AFAIK most barcode scanners behave as
keyboards)
When you scan a barcode, it rapidly types the text it reads from the barcode.
My application is listening for this keyboard input as pygame events,
and appending them to a string. This *mostly* works great.
The problem I am having is with input that has a lot of repeated
characters, such as "9999999" If such a barcode is the FIRST one I
scan, I usally only get "9" or "99" instead of the whole string. If I
have scanned other things, then I *usually* get the whole "9999999".
I am guessing that somehow pygame is throwing away key input events
because they are coming too fast and look like duplicates.
Has anybody else experienced a problem like this? Does anybody have
any ideas for workarounds or further avenues of testing?
I should note that when I use this same barcode scanner to scan the
same repetitious barcodes into a terminal, or a text editor, or a word
processor, I NEVER lose characters, so I am pretty sure this is not a
hardware issue with the scanner itself.
---
James Paige