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.
Unfortunately, activation email could not send to your email. Please try again.

Shortcuts disabling

Thread ID:

Created:

Updated:

Platform:

Replies:

127869 Dec 14,2016 11:05 AM Dec 19,2016 07:31 AM UWP 3
loading
Tags: SfRichTextBoxAdv
alexander
Asked On December 14, 2016 11:05 AM

Hello! Is there any way to disable default shortcuts or override them? 

I created class which inherits the SfRichTextBoxAdv control and overrides OnKeyDown handler.
if i handle default shortcut in that way:

==================================
if (e.Key == VirtualKey.Control)
{
       this.isCtrlPressed = true;
}
else if (this.isCtrlPressed)
{
. . . . .
case VirtualKey.O:
      e.Handled = true;
      //MyCommand here
. . . . .
}

 if (!e.Handled)
 {
        base.OnKeyDown(e);
 }

==================================

controls behavior is like Ctrl is always pressed, if i don't press it one more time.

I could set e.Handled = true on Ctrl key down (or Shift, if i would need shortcut with Shift), but it would break control selection behavior



Venkatesan Mani [Syncfusion]
Replied On December 15, 2016 03:48 AM

Hi Alexander,

We have prepared a sample to disable the open document shortcut in SfRichTextBoxAdv control. similarly, you can disable the other shortcuts as per your requirement. Please find the sample from following link.

Sample link:
DisableShortcut_UWP.zip

Please let us know if this helps you.

Regards,
Venkatesan M. 


alexander
Replied On December 19, 2016 05:32 AM

Thanks a lot, that works perfect!

Venkatesan Mani [Syncfusion]
Replied On December 19, 2016 07:31 AM

Hi Alexander,

Thank you for your update.

We are glad to know that our solution resolved your problem. Please let us know if you have any other questions. We will be happy to assist you.

Regards,
Venkatesan M.
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;