How to detect final character selected

V

vbmark

I'm working on a Smartphone.

I need to take a certain action depending on the character the user entered
into a text box.

The problem is that the events for keydown, keypress, etc fire for every
press.

I only want to know what character they have settled on.

How is this done?

Thanks!
 
A

Alex Feinman [MVP]

Actually, the when the user finished with a multi-tap character entry, only
then a KeyPress event is fired, and not on every variaton. KeyDown on the
other hand is set on every button press.
 
V

vbmark

I can say for sure that that is not true. At least on the Smartphone. If
I put a break point in any key event then as soon as I push the 2 button,
for example, the program breaks in the key event no matter which it is.
 
A

Alex Feinman [MVP]

I am testing this on a smartphone and when I press 2 several times, I get
KeyDown/KeyUp several times and then KeyPress - once
WHich phone are you on?
 
V

vbmark

Oops. I had my test set up wrong. You're correct, KeyPress does indicate
the slected character.

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top