Click here to Skip to main content
14,695,325 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

Is there a possibility to add a keyboard shortcut to menu ?

1 solution

You can use this jQuery plugin. Very easy to use:[^]

You can add more watch-keys (like ALT, CTRL etc)
this.wackyKeys = { '.': 190, ',': 188, ';': 59,	'Space': 32	};

Add shortcuts. Trigger click on your menuitems. You will have to find the ID of the a-tag in your menu.

// implement shortcuts 
  'Space+1' : function () { 
  'Space+2' : function () { 
Vinodh.B 4-Aug-12 15:33pm
I could not make it work . Can you pls suggest changes in following code.

<head runat="server">
<script type="text/javascript" src="Scripts/jquery.shortkeys.js">
<script type="text/javascript">
'Space+1': function () {
'Space+2': function () {
<form id="form1" runat="server">
<asp:Menu ID="menu" runat="server">
<asp:MenuItem Text="Home">
<asp:MenuItem Text="Sales">


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