Author Posts

December 6, 2016 at 6:18 am

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?

December 6, 2016 at 11:26 am

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?

December 6, 2016 at 11:48 am

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.

December 6, 2016 at 12:05 pm

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?

December 6, 2016 at 12:21 pm

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.

December 6, 2016 at 1:46 pm

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.

December 8, 2016 at 1:29 pm

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

December 8, 2016 at 4:08 pm

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.

December 13, 2016 at 9:15 am

Thank you for the input. I tried, that didn't work either 🙁

December 13, 2016 at 10:01 am

Sounds like it is time for a clean reinstall. 😉