Cursor sometimes moves to the next line on its own?

I'm using Arduino IDE version 2.0 on Windows 10. Sometimes the cursor moves on its own to the next line. It's happened about 50 times over the course of a week or so but it happens so fast I can't figure out the conditions which cause it to happen. Does anyone know what I'm talking about?

you accidently press arrow keys on QWERTY or F keyboard

Hi @bimetallic82 This bug is being tracked by the Arduino developers here:

There is no true fix at this time, but there is a simple workaround. I'll provide instructions:

  1. Press the Ctrl+Shift+P keyboard shortcut (Command+Shift+P for macOS users) to open the "Command Palette".
  2. Select the "Preferences: Open Settings (UI)" command from the menu.
  3. A "Preferences" tab will now open in the Arduino IDE. In the "Search Settings" field of that tab, type editor.trimAutoWhitespace
  4. Uncheck the checkbox next to " Remove trailing auto inserted whitespace."
  5. Click the X icon on the "Preferences" tab.

The reason this is considered a workaround rather than a true fix is that the "Remove trailing auto inserted whitespace" is generally a convenient feature. However, I think it is an effective workaround because you are trading the loss of a minor convenience feature in exchange for avoiding a bug that seriously harms the usability of the IDE. The Tools > Auto Format will take care of removing the trailing whitespace anyway.

1 Like

I don't think so. It happens while I'm typing so my hand is not near the arrow keys.

Thanks very much.

You are welcome. I'm glad if I was able to be of assistance.

Regards,
Per

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.