Archive for July 28th, 2008

Shift+Delete clipboard shortcut nuisance

Problem:

At times when I’m coding a lot, especially when moving multiple lines at once and doing a bit of code rearranging, the content of the clipboard gets lost (for instance the very part I was trying to cut and paste elsewhere).

Solution:

It took me some time to reproduce it. Now I know I was just careless – when selecting the lines to be erased (most of the time whitespaces) by “Shift-Arrowing”, once in a while I forget to depress the Shift button soon enough. Then deleting the lines gets combined with the old alternative Windows shortcut for cutting content into the clipboard (Shift+Delete). This way the yet to be pasted lines get replaced by their whitespace counterparts – and that’s the impression of losing clipboard contents. Knowing that, I can avoid it by being more careful, but I don’t like it. Unfortunately, having searched for a way to disable the old-style shortcuts, I still can’t find a once forever fix. I thought about writing a tiny override intercepting this kind of messages, but for the time being I’m still waiting for someone to come up with a more elegant fix. And hey, it’s not that painful either way.