Need better way to input from keyboard
- From: enigmainorlando@xxxxxxx
- Date: 14 Mar 2006 03:24:42 -0800
I am working on an application which requires the user to press and
hold different keys on the keyboard in order to control the movements
of a model on the screen in real-time. This is under an MS Windows
operating system.
There are two problems. The first is the "pause" one receives when
pressing a key before the key starts its "repeat" (to see what I mean,
just bring up any text editor, then press and hold a key). That pause
causes an irritating hesitation in the movements of the model when a
key is pressed. I understand that I can go into a Windows setting and
shrink down that pause time, but there is still a small pause even on
the minimum setting. I tried writing a simple C program using
getchar(), thinking I could call it as a DLL from Smalltalk, but it
behaved the same, which tells me that getchar() is not bypassing
Windows.
The second problem is that I need to be able to properly detect when
multiple keys are pressed and held down, i.e. the model should move up
AND to the right if the up arrow and right arrow are pressed and held
simultaneously. This also seems problematic.
Does anyone have a solution for these problems? I'm game for anything,
whether it's some low-level OS-bypassing system call from C, or a
Smalltalk way to set up keyboard input (preferable), or whatever.
I'm currently using VisualWorks.
Thanks.
.
- Follow-Ups:
- Re: Need better way to input from keyboard
- From: Andre Schnoor
- Re: Need better way to input from keyboard
- Prev by Date: Re: Do you got it nor not Sqeakers? --> Re: OpenGL testbed in Squeak?
- Next by Date: Re: on using EsRandom in IBM Smalltalk
- Previous by thread: on using EsRandom in IBM Smalltalk
- Next by thread: Re: Need better way to input from keyboard
- Index(es):
Relevant Pages
|