[SDL] USB Keyboard and Drive issue
kevin devries
kevin at verticalpower.com
Mon Jun 4 09:42:03 PDT 2007
Ryan C. Gordon <icculus <at> icculus.org> writes:
>
>
> I have a system that needs to 'hot swap' between a USB keyboard and thumb
drive.
> > I have a thread that waits for keyboard inputs via SDL_waitEvent(), and
> > occasionally, the thread will die a terrible death when a thumb drive is
being
> > accessed (typically on a write). Is there a way to 'disable' keyboard SDL
events
> > from occurring while the thumb drive is in place (or while there is no
keyboard
> > inserted)?
>
> To be clear, the thumb drive is generating keyboard events, or you just
> don't want keyboard events while the drive is inserted?
>
> (in the former case, that sounds like a kernel bug, and in the later,
> I'd say just ignore keyboard events while the drive is inserted.)
>
> --ryan.
>
It seems like the USB drive is generating keyboard events. Hard to tell
what as the system crashes pretty hard.
How can I disable the keyboard events and/or clear the queue? Seems like they
are activated when SDL is intialized and I haven't seen a function to
disable events. If I don't do the waitEvent(), I assume that the events
still get queued up - which doesn't help me any.
Thanks.
Kevin
More information about the SDL
mailing list