What are the built in shortcut keys for a RichTextBox

Jeff Gaines 291 Reputation points

I am writing a very simple RTF editor to keep formatted notes.

It seems some shortcuts are built in like Ctrl+C, Ctrl+I, Ctrl+Z but others I need to handle myself - essentially formatting like Ctrl+I, Ctrl+B etc.

Is there a definitive list available of the built in codes please so I don't duplicate things?

I am intrigued to know what Ctrl+I does, it's built in and seems to make the word under the cursor disappear which is interesting!

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,871 questions
0 comments No comments
{count} votes

Accepted answer
  1. Pinaki Ghatak 3,110 Reputation points Microsoft Employee

    Hello @Jeff Gaines

    Please know, the RichTextBox control in .NET has several built-in shortcut keys for formatting and navigation. Here are some common ones:

    1. Ctrl+C: Copy selected text.
    2. Ctrl+X: Cut selected text.
    3. Ctrl+V: Paste clipboard content.
    4. Ctrl+Z: Undo the last action.
    5. Ctrl+B: Toggle bold formatting.
    6. Ctrl+I: Toggle italic formatting.
    7. Ctrl+U: Toggle underline formatting.
    8. Ctrl+L: Align text left.
    9. Ctrl+E: Align text center.
    10. Ctrl+R: Align text right.

    For a comprehensive list, you can refer to the official documentation on Rich Edit shortcut keys. As for Ctrl+I specifically, itโ€™s indeed used for toggling italic formatting. If it appears to make the word under the cursor disappear, it might be related to the context or other custom handling in your application, or even depending on how the font rendering is happening.

    Feel free to explore further! ๐Ÿ˜Š๐Ÿ‘

    I hope that this response has addressed your query and helped you overcome your challenges. If so, please mark this response as Answered. This will not only acknowledge our efforts, but also assist other community members who may be looking for similar solutions.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Viorel 114.5K Reputation points

    If it is a Forms application, then check a list:

    Several shortcuts probably do not work in some versions of Rich Edit.

    1 person found this answer helpful.
    0 comments No comments