By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,857 Members | 1,768 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,857 IT Pros & Developers. It's quick & easy.

Can anyone tell me when KeyPress event is raised

P: n/a
I noticed that I don't get KeyDown nor KetPress events if NumLock is not on.

I can probably find a workaround but it would be nice to know what the rules
are.

Can anyone tell me when KeyPress event is raised and when it isn't.

Thanks
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Key events occur in the following order:

1. KeyDown
2. KeyPress
3. KeyUp

The KeyPress event is not raised by noncharacter keys; however, the
noncharacter keys do raise the KeyDown and KeyUp events.

Do you have a more specific question than the order?

Chris

" Just Me" <gr****@a-znet.com> wrote in message
news:e5**************@TK2MSFTNGP15.phx.gbl...
I noticed that I don't get KeyDown nor KetPress events if NumLock is not
on.

I can probably find a workaround but it would be nice to know what the
rules are.

Can anyone tell me when KeyPress event is raised and when it isn't.

Thanks

Nov 21 '05 #2

P: n/a
Are you sure the keypad keys with NumLock off cause a KeyDown event?

I have a

Debug.WriteLine("KEYDOWN " & e.KeyValue.ToString)

at the top of the sub that handles and I see the effect of pressing the
keypad keys if NumLock is on but if I press NumLock to turn it off the
prints stop until I press it again to turn it on

Think I'm missing something?

Thanks a lot

"Chris, Master of All Things Insignificant" <chris@No_Spam_Please.com> wrote
in message news:Oi**************@TK2MSFTNGP12.phx.gbl...
Key events occur in the following order:

1. KeyDown
2. KeyPress
3. KeyUp

The KeyPress event is not raised by noncharacter keys; however, the
noncharacter keys do raise the KeyDown and KeyUp events.

Do you have a more specific question than the order?

Chris

" Just Me" <gr****@a-znet.com> wrote in message
news:e5**************@TK2MSFTNGP15.phx.gbl...
I noticed that I don't get KeyDown nor KetPress events if NumLock is not
on.

I can probably find a workaround but it would be nice to know what the
rules are.

Can anyone tell me when KeyPress event is raised and when it isn't.

Thanks


Nov 21 '05 #3

P: n/a
It not the entire keypad that does not cause a KeyDown event - only the
arrow keys 4, 8, 6 and 2
Which are, naturally, the ones I'm interested in.
" Just Me" <gr****@a-znet.com> wrote in message
news:OW**************@tk2msftngp13.phx.gbl...
Are you sure the keypad keys with NumLock off cause a KeyDown event?

I have a

Debug.WriteLine("KEYDOWN " & e.KeyValue.ToString)

at the top of the sub that handles and I see the effect of pressing the
keypad keys if NumLock is on but if I press NumLock to turn it off the
prints stop until I press it again to turn it on

Think I'm missing something?

Thanks a lot

"Chris, Master of All Things Insignificant" <chris@No_Spam_Please.com>
wrote in message news:Oi**************@TK2MSFTNGP12.phx.gbl...
Key events occur in the following order:

1. KeyDown
2. KeyPress
3. KeyUp

The KeyPress event is not raised by noncharacter keys; however, the
noncharacter keys do raise the KeyDown and KeyUp events.

Do you have a more specific question than the order?

Chris

" Just Me" <gr****@a-znet.com> wrote in message
news:e5**************@TK2MSFTNGP15.phx.gbl...
I noticed that I don't get KeyDown nor KetPress events if NumLock is not
on.

I can probably find a workaround but it would be nice to know what the
rules are.

Can anyone tell me when KeyPress event is raised and when it isn't.

Thanks



Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.