Disable Ctrl+O and Ctrl+S

Hello,

how to disable ^O and ^S commands in EditControl? I have not found the corresponding settings.

Cheers.


1 Reply

EM Elakkiya Muthukumarasamy Syncfusion Team November 8, 2021 11:18 AM UTC

Hi Slávek, 
 
Greetings from Syncfusion. 
 
We have checked your query and we suspect that you want to disable the ctrl+o and ctrl+s command in EditControl.For this you can use our PreviewKeyDown events to modify the commands(ctrl+o and ctrl+s) using the following code: 
 
Code example: 
 
private void Edit1_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e) 
{ 
if (e.Key == Key.O && (e.KeyboardDevice.Modifiers & ModifierKeys.Control) != 0) 
{ 
e.Handled = true; 
} 
 
if (e.Key == Key.S && (e.KeyboardDevice.Modifiers & ModifierKeys.Control) != 0) 
{ 
e.Handled = true; 
} 
} 
 
 
 
Please try it with the above solution and let us know if you need any further assistance on this. 
 
Regards, 
Elakkiya 


Loader.
Up arrow icon