It depends on how you do it. First of all, there is the
accesskey
attribute which you can apply to input controls:
http://www.w3schools.com/tags/att_global_accesskey.asp[
^].
As you can see, the actual access depends on the browser. You cannot do anything to it. But
this is the most recommended method. Please understand: each user is used to her/his favorite browser (at least many of them). Those users want to use the access methods typical for their browsers.
And you can introduce your own method(s) by directly handling, say,
onkeydown
events on whatever you want it. In a handler, you can use the
focus()
method to set a keyboard focus, so the behavior could be equivalent to the access key approach. Please see:
http://www.w3schools.com/jsref/event_onkeydown.asp[
^],
http://www.w3schools.com/jsref/met_html_focus.asp[
^].
I would
not recommend it.
—SA