Subject RE: [IBO] Capturing keystrokes
Author Bill Morrison
Seems a bit OT, but if I were you I'd change the event to OnKeyUp. That way
you only get the event when their little fingers release the key.

FWIW


Bill M

-----Original Message-----
From: Riho-Rene Ellermaa [mailto:r.ellermaa@...]
Sent: Friday, December 14, 2001 2:35 AM
To: IBObject (E-mail)
Subject: [IBO] Capturing keystrokes


I created a game for children, where they must guess whats represented
in picture. I'm also using Micorosft Agent for guiding and comments.
When they press keys I check the key value and if the current key is
wrong, then Agent speaks a warning.
I'm using FormKeyPress(TObject *Sender, char &Key) to catch users
keypresses.

The problem is that when they press heavily on keys (like little
children do), then I get lot's of unnecessary keystrokes. And if for
HORSE they enter HHHHHOOOORRRRSSSSEEEE, my program takes each correct
first letter and then immediately tells for second letter that it's
wrong. for children it looks that each letter he enters is accepted but
still declared wrong.

Any ideas how to flush the unnecessary keystrokes?


Riho-Rene Ellermaa
senior programmer
Hansabank


___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/