This is a migrated thread and some comments may be shown as answers.

Additional character

1 Answer 47 Views
RichTextEditor
This is a migrated thread and some comments may be shown as answers.
konrad
Top achievements
Rank 1
konrad asked on 20 Nov 2015, 02:44 PM

Hi,

 

 When I want to enter the char 'ę' (right alt+e) editor insert additional '€' so in the end it look like '€ę'. The same situation is with 'ć'. After pressing alt+c it give me '©ć'.

I checked the CommandExecuting event and InsertText command is invoked twice.

That's the main problem. 

The following combinations also should not insert any character (at all): alt+r: ®, alt+t: ™, alt+u: €

 

I am using keyboard polish (programmers) and polish language in Windows 10.

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 25 Nov 2015, 01:55 PM
Hi Dominik,

Thank you for writing.

Pressing the right Alt key together with the E key, by design adds the symbol. You can override this by handling the PreviewEditorKeyDown event of the editor element and suppressing it. Please check my snippet below: 
private void RichTextBoxElement_PreviewEditorKeyDown(object sender, Telerik.WinForms.Documents.PreviewEditorKeyEventArgs e)
{
    if ((Control.ModifierKeys & Keys.Alt) == Keys.Alt )
    {
        e.SuppressDefaultAction = true;
        e.OriginalArgs.Handled = true;
    }
}

More information and examples are available here: Keyboard Support.

I hope this helps. Should you have further questions please do not hesitate to write back.

Regards,
Hristo Merdjanov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
RichTextEditor
Asked by
konrad
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or