Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2015 Ctrl + D (code duplication) not working (keyboard shortcut scheme issue with Resharper)

Ctrl + D in a Visual Studio 2015 Windows10 project is not working at all.. its working in Notepad++. I have tried to reboot my machine, and closed down Visual Studio but nothing works.

I have Windows 10 Threshold 2 and Visual Studio 2015 Version 14.0.23107.0

PS: it was working fine yesterday...

Edit1:

Keyboard mapping is looking good: enter image description here

like image 728
Damien Avatar asked Nov 20 '15 21:11

Damien


People also ask

Why Ctrl D is not working in VS Code?

reset all Visual Studio settings (Tools > Import and Export Settings > Reset all settings) then go to the Resharper > Options > Keyboard & Menus and re-apply the keyboard shortcut scheme.

What to do when Ctrl D is not working?

The main step are: File > Preferences > Keyboard Shortcuts. type "copy line",then you will see the related shortcuts. remember the new shortcut(e.g. Shift + Alt + Down) or modify the shortcut to ctrl + D.

How do I enable ReSharper shortcuts?

You can switch between two default keyboard shortcut schemes or choose None to configure ReSharper shortcuts yourself, in Visual Studio options (Tools | Options | Environment | Keyboard). Click Apply to apply the selected scheme.

How do I add Ctrl D code to Visual Studio?

How do you use Ctrl D in VS Code? Ctrl+D selects the word at the cursor, or the next occurrence of the current selection. Tip: You can also add more cursors with Ctrl+Shift+L, which will add a selection at each occurrence of the current selected text.


2 Answers

RESHARPER is/was the culprit

How to fix:

  • reset all Visual Studio settings (Tools > Import and Export Settings > Reset all settings)
  • then go to the Resharper > Options > Keyboard & Menus and re-apply the keyboard shortcut scheme.

and now its working again!

like image 186
Damien Avatar answered Sep 19 '22 14:09

Damien


Below steps are worked for me.

  1. Go to Tools > Options >Environment >General> Keyboard
  2. Select visual C# 2005 in keyboard mapping scheme
  3. In Show commands containing, search for Edit.Duplicate
  4. Assign Ctrl + D in shortcut key
like image 22
ankit Avatar answered Sep 20 '22 14:09

ankit