Click here to Skip to main content
14,605,760 members
Rate this:
Please Sign up or sign in to vote.
See more:
I have set navigation among controls on the the basis of enter key 'Key Down event'. Now I want that if user press 'TAB' key, it should work as Enter Key.
I am using 2008
Updated 7-Sep-15 21:30pm
phil.o 8-Sep-15 5:55am
Then, in your KeyDown event handler, you just have to handle the case for the Tab key (just as you seemed to have done with the Enter key).
But, as OG suggested in Solution 1, you should not redefine the default behaviour of the tab key, unless users are informed of that fact and agree with it.

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Users are familiar with what TAB and ENTER do: TAB moves you to the next entry field, ENTER accepts a page (or form) full of information.

If your application subverts that then users get confused, and that's bad - because when things don't work as they expect, it causes them problems and they start to blame you.

Keep them separate: TAB has a specific function, don't try to change that.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100