~ character does not invoke KeyPress event

D

Dan

We use ~ as a post amble character for our mobile device scanners. I am
trying to trap this event in the KeyPress event but pressing this key does
not invoke this event on our CE emulator or on our CE 4.2 device itself. I
can't trap it in the KeyDown or KeyUp events either because they just seem
to trap the "Shift" key as you have to hold [shift] and "`" together to get
the "~" character.

Using Framework 2.0 SP1.
 
E

Empi

Sorry, but this works fine for me:

private void Form1_KeyPress(object sender, KeyPressEventArgs e)

{

Debug.WriteLine(e.KeyChar.ToString());

}

Clicking shift + ~ prints on the debug window ~.
 

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