Skip to content

Arrow keys moving caret in wrong direction in RTL mode #9730

@Bip901

Description

@Bip901

Description of the Issue

When in RTL (Right to Left) mode, pressing the left and right keyboard arrow keys in Notepad++ causes the caret to move in the opposite direction. Left moves right, right moves left.

Steps to Reproduce the Issue

  1. Open a new file in Notepad++.
  2. Write any text in any language, RTL or otherwise (try "Hello World", "שלום עולם")
  3. Switch to RTL mode (View->Text Direction RTL)
  4. Press the arrow keys to move the caret.
  5. The caret will move in the opposite direction

Expected Behavior

Pressing the left arrow key should move the caret left (as the right arrow key currently does).
Pressing the right arrow key should move the caret right (as the left arrow key currently does).
Other text editors flip the keys correctly, including the default Windows notepad.
The arrows should definitely be flipped in RTL languages, and maybe in LTR languages as well (subject to debate).

Actual Behavior

Pressing the right arrow key moves the caret left.
Pressing the left arrow key moves the caret right.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions