Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable Shift+Delete Cutting in Visual Studio

I type fast. Often times when programming I will select a line with Shift+End and then press the delete key, but I do this so quickly that my finger hasn't come off of the shift key. This results in replacing clipboard item with what was selected.

This is bad because many times I am deleting code before pasting some other code.

Apparently shift+del is an old school way of cutting.

I am aware of ctrl+shift+v for cycling through clipboard history in visual studio, but this is still terribly annoying.

Is there a way to disable this shortcut in visual studio or windows in general?

like image 803
Ronnie Overby Avatar asked Oct 12 '11 19:10

Ronnie Overby


People also ask

How do I enable shortcut keys in Visual Studio?

On the menu bar, choose Tools > Options. Expand Environment, and then choose Keyboard. Optional: Filter the list of commands by entering all or part of the name of the command, without spaces, in the Show commands containing box. In the list, choose the command to which you want to assign a keyboard shortcut.

What is the shortcut key of step over in Visual Basic?

4. F11/Shift+F11 ⮕ Step into/out. This shortcut is to step into the breakpoint or step out of it. It starts the execution or ends the execution of the current breakpoint.


2 Answers

Good answer. Although I assume some people will still like to perform the delete operation.

To still perform the wipe of the entire line with SHIFT+DEL but don't add it to the clipboard:

remove (as explained above) the binding of SHIFT+DEL to the Edit.Cut command

AND

bind the SHIFT+DEL combination to the Edit.LineDelete command.

like image 62
stvn Avatar answered Oct 12 '22 01:10

stvn


The keyboard shortcuts are pretty thoroughly customizable in Visual Studio.

Go to Tools > Options then in the left select Environment > Keyboard

Select the command, select the shortcut you want to remove, click "Remove" and click "OK"

enter image description here

If you wanted to circumvent this across Windows, you can use a one-line AutoHotkey script to convert Shift+Delete to just plain Delete:

+DELETE::SendInput,{DELETE} 
like image 34
Jay Avatar answered Oct 12 '22 00:10

Jay