Ctrl+Drag not working in ISE

I always us to select code press and hold Ctrl button to drag and drop the code text as a shortcut for copying and pasting the code from one place to another in a PowerShell script.

However, suddenly this has stopped working. I don’t know why but now when I press and hold Ctrl and then try to drag the text, it changes the selection area instead of moving the code from one place to another.

Not sure how this has changed suddenly, can anyone explain why this might have happened?

I don’t know which version of ISE you use but I don’t have to press and hold the Ctrl key to grab a marked section of code, move it and drop it somewhere else. And it doesn’t make a difference when I do so. Have you tried that?

When you keep Ctrl key pressed, it will not move the original code, rather it will create a copy of the same code that you have marked (selected).

You can simulate/try this while you are in Microsoft word:

  • Select the text that you want to copy and paste
  • Press and hold Ctrl and drag the selected text anywhere on the page to drop it there
  • it will keep the original text there and will create a copy of it where you drop it.

This will keep your current clipboard data untouched since it does not use the clipboard for this kind of operation. This was a nice functionality which earlier use to work on my machine but suddenly stopped working.

BTW, I am using PowerShell v5.1 on Windows 10. It was working fine with the same earlier.

Now I know what you meant. You’re right. That’s how it works. Usually. So … it behaves for you like you press and hold the Shift key. What changed on your client?

Nothing has been changed from my side that I know of. There might be some updates (just guessing) but don’t know for sure, how to restore this functionality?

Does it still work for you? On my machine it currently work in Microsoft worD but not working in PowerShell.

Does it still work for you?
Yes it does. On my W7 client with PS version 5.0.10586.117 and on my W10 Insider Preview with PS version 5.1.14971.1000 it works just as expected.

Yeah, this is a small thing but not able to figure out how to make it work like that again.

I assume you are admin on your machine. Did you try to create a new profile and test it there in this new profile? If this works, you could ‘reset’ your profile.

Thank you for the input. I tried, that didn’t work either :frowning:

Sounds like it is time for a clean reinstall. :wink: