Additional character

2 posts, 0 answers
  1. Dominik
    Dominik avatar
    82 posts
    Member since:
    Dec 2012

    Posted 20 Nov 2015 Link to this post



     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.

  2. Hristo
    Hristo avatar
    1522 posts

    Posted 25 Nov 2015 Link to this post

    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.

    Hristo Merdjanov
    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
Back to Top