Howto disable code dragging

Hey Folks,

 I'm running into a problem with the IDE because i have the horrible habit of highlighting code to read it, and then I accidentally end up dragging that chunk of code somewhere else in the project. Obviously if I see it happen I can Ctrl-Z to undo it, but can this be disabled anywhere? And yes, I probably should train myself to read code without highlighting it first, but until I do... I prefer the Ctrl-X, Ctrl-V method of moving blocks of code around.

Thanks, -Dan.

1 Like

Didn't realize that was a windows wide issue. Thanks.

Well... sadly it turns out that the 2.1.0 IDE ignores that registry setting so... Back to the drawing board I guess.

Hi @Baderd. This behavior can be configured in the Arduino IDE 2.x advanced settings.

I'll provide instructions:

  1. Press the Ctrl+Shift+P keyboard shortcut (Command+Shift+P for macOS users) to open the "Command Palette".
    A menu will appear on the editor toolbar:
    image
  2. Select the "Preferences: Open Settings (UI)" command from the menu.
    You can scroll down through the list of commands to find it or type the name in the field.
    A "Preferences" tab will open in the Arduino IDE main panel.
  3. Type editor.dragAndDrop in the "Search Settings" field of the "Preferences" tab.
  4. Uncheck the box under the "Editor: Drag And Drop" setting.
  5. Close the Preferences tab by clicking its X icon.

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