Click here to Skip to main content
15,896,348 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hello,

i want to save data in table using keyboard shortcuts ctrl + save ... i tried some of javascripts bt those are not working in master page ...is there any solution for this ?

or

can we use ctrl instead of alt in access key property ?


thanks in advance sir :)
Posted

1 solution

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
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900