Is there a way to disable, keyboard shortcuts on the RichEditBox control in uwp app? I want to disable the Ctrl-A,Ctrl-2(change line spacing) , Ctrl-R(right alignment) etc. key combinations. RichEditBox is a part of UserControl.
I tried to use KeyDown Event of the richEditBox, but still Ctrl-A select all text:
private void OnRichEditBoxKeyDown(object sender, KeyRoutedEventArgs e)
{
var ctrl = Window.Current.CoreWindow.GetKeyState(Windows.System.VirtualKey.Control);
if (ctrl.HasFlag(CoreVirtualKeyStates.Down))
{
if (e.Key == VirtualKey.A)
{
e.Handled = true;
}
}
}
How can I disable default ctrl keyboard shortcuts in UWP App? I'm using Microsoft Windows [Version 10.0.14393].