[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Re: loss of rapidly repeated keypresses (from a barcode gun keyboard)



On Wed, Dec 02, 2009 at 04:39:00PM -0800, Brian Fisher wrote:
>    On Wed, Dec 2, 2009 at 1:51 PM, James Paige <Bob@xxxxxxxxxxxxxxxxxxx>
>    wrote:
> 
>      I did a quick test with Pyglet, and it suffers from the same problem. I
>      take that to mean that using sdl event callbacks does not work around
>      this problem.
> 
>    What that suggests to me is that the problem lies with the way the USB
>    barcode scanner interacts with system components, well below the
>    application layer. So like maybe with the HID driver or windowing system
>    of your computer.

As I said before, the scanner never drops even a single char when the 
keyboard focus is on the console, a terminal, a text editor or a word 
processor. I think it is safe to say that neither HID or windowing 
system can be to blame.

>    I'd try it on a different platform, to confirm.

I will try Mac and Windows tomorrow, although I have to stick to Linux 
for the final product.

>    ... and as far as workarounds go, maybe you can build this into the game
>    design? Like make gameplay be about how digits change? or the number of
>    distinct digits found? something like that...

Heh, although making a "Barcode Battler" game sounds like fun, :) this 
is actually a business app for data-entry. I chose pygame for the job 
because of easy fullscreen support, easy sound effect support, and (I 
thought) easy keyboard input handling.

---
James Paige