We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Non-Standard Menu Item Shortcut

I have a Syncfusion menu item that I want to assign a shortcut key combination of the Alt key and the Break key (Alt+Break). This is not a choice from the Syncfusion Shortcut key enumeration list. So how do you assign a key combination that is not listed in the standard listing?

3 Replies

AD Administrator Syncfusion Team September 8, 2004 12:53 AM UTC

Hi Orgbrat, I am afraid, there is no way of assigning a non-conventional key combination as a ShortCut to the BarItem. However, as a workaround you could override the host form''s ProcessCmdKey method as shown in the code below : protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == (Keys.Alt|Keys.Pause)) { this.barItem2.PerformClick(); } return base.ProcessCmdKey (ref msg, keyData); } Please refer to the test sample attached here that illustrates this here and let me know if this works for you. Thanks for choosing Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.


SG Steve Graddy September 9, 2004 10:14 AM UTC

Hi Guru, Thanks for the sample. I had already thought of that because I was already doing the same thing for the delete key to work around another problem. The problem now is setting the shortcut key text on the menu item to "Alt+Break". Without the shortcut key enumerator set on the bar item, even if the shortcut text is set the menu item displays no text ( blank ). Have you any suggestions for this problem. Steve Graddy


AD Administrator Syncfusion Team September 10, 2004 10:43 PM UTC

Hi Orgbrat, Thanks for the update. You could set the BarItem''s Text property to include the shortcut string as well. This way you would not have to set the ShortCutText. Please refer to the modified sample that illustrates this and let me know if this works for you. Regards, Guru Patwal Syncfusion, Inc.

Loader.
Live Chat Icon For mobile
Up arrow icon