Hello, I'm using devexpress richeditcontrol and
I have a problem with the key delete (in spanish keyboard 'Supr'). When I push it the caret delete letter before it, like backspace, but I need it works like spanish keyboard, deleting letters (or objects) after the caret. Is there any option on control?
Thanks and best regards.
RichEditControl: The delete key(Supr) acts like the backspace
Answers approved by DevExpress Support
Hi,
You can use the approach illustrated in the How to change the shortcut key assigned to a command code example to remap keys. For instance, this sample code illustrates how to force the BACKSPACE key to behave in the same manner as the DELETE key does:
C#richEditControl1.RemoveShortcutKey(Keys.Back, Keys.None); richEditControl1.AssignShortcutKeyToCommand(Keys.Back, Keys.None, RichEditCommandId.Delete);
I hope this information helps you.
Thanks,
Alessandro.
this not work for my code. I think you have understood bad my question. I don't need replace backspace key action. The problem is that when I push DELETE key, it works like BACKSPACE key and I haven't overrided any key shortkeycommand.
Do you understand?
Thanks and best regards
I understand your scenario. You can use the recommended approach to modify this behavior. I have illustrated how to modify the BACKSPACE key behavior. You can use the same approach to modify any other key behavior. For instance, try the following code:
C#richEditControl1.RemoveShortcutKey(Keys.Delete, Keys.None); richEditControl1.AssignShortcutKeyToCommand(Keys.Delete, Keys.None, RichEditCommandId.Delete);
Does this information help you?