We have the ability to define shortcut keys for Windows Forms application menu items. That way I can tell a menu item File->Save to have the shortcut key Ctrl<
You must use Ctrl or Alt in shortcuts.
example:
//working:
toolStripMenuItem1.ShortcutKeys = Keys.Control | Keys.NumPad0;
//throws exception
toolStripMenuItem1.ShortcutKeys = Keys.NumPad0;
To answer the question about using Numpad *
and Numpad +
:
Numpad *
is called the multiply key. The enumeration name is Multiply
.
Numpad +
is called the add key. The enumeration name is Add
.
Numpad -
is called the subtract key. The enumeration name is Subtract
.
It is not possible to select these in Visual Studio's property window (at least not in Visual Studio 2008), but the corresponding source code can be edited; where property ShortcutKeys
is set. For example for Numpad +
for a menu item named mnuMoreTime
:
this.mnuMoreTime.ShortcutKeys =
((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control |
System.Windows.Forms.Keys.Add)));