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

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:

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!

Below steps are worked for me.
Go to Tools > Options >Environment >General> Keyboard
Select visual C# 2005 in keyboard mapping scheme
In Show commands containing, search for Edit.Duplicate
Assign Ctrl + D in shortcut key

Reinstalling ReSharper fixed the issue for me

Just FYI, If you are VS 2019 User:
Extensions > Resharper > Options > Environment > Keyboard
Change Keyboard Scheme to None and save, then go back again and change it to Visual Studio
I was struggling with this problem for a while and this method fixed it.

Goto File->Preferances->keybord Shortcut->On the top search duplicate->Double click on duplicate Selection->ctrl+Shift+D->Press Enter

Related

CTRL+D doesn't work in Visual Studio 2022

CTRL+D (duplicates) It doesn't work in visual studio 2022 , How to change Ctrl+E,V To CTRL+D ?
I just had the same problem.
The issue for me was that Visual Studio 2022 had set the mapping scheme to Visual C# 2005 instead of (Default).
In the search bar at the top of Visual Studio 2022 (Ctrl+Q), search for key bindings, or go to Options->Environment->Keyboard.
Make sure the keyboard mapping scheme is (Default).
I hope it helps.
Duplicate line is implemented via Ctrl+E,V as explained here.
This operation does leave the clipboard untouched.
Command and respective keys are shown in the Edit Menu.
Go to TOOLS -> Options -> Environment -> Keyboard and then on 'Show commands containing:' search Edit.Duplicate and on 'Press shortcut keys:' press Ctrl+D and click on 'Assign' button.

Where is the ALT+UP/DOWN (move line) setting in Visual Studio 2017?

I installed Resharper 2017 for VS2017, in the first run it asked about hotkey setup and I chose VS hotkeys. I tried Resharper and decided to uninstall it. Now ALT + UP / DOWN doesn't move lines! How can I fix it? What option should I check.
Ok. I found it in Tools > Options > Environment > Keyboard > Edit.MoveSelectedLinesUp(Down)

How can I export Visual Studio shortkeys (Keymap) to IntelliJ IDEA

It's a long time that I use VS and I have fully customized its environment. Now I have to use IntelliJ. It's completely unfamiliar for me. I want to export VS short keys to IntelliJ. Is there any way to do that? I'd appreciate if someone can help me.
I use Visual Studio 2015 Ultimate and IntelliJ IDEA 15 Ultimate.
I use Resharper in Visual Studio. Does it help?
You can go to File | Settings, select the Keymap item in the left part of the dialog, and select "Visual Studio" in the Keymap combo box. This should give you keyboard shortcuts in IntelliJ IDEA that are similar to the default settings in Visual Studio.
To the right of the Keymap combo box, there is a small gears button that allows you to duplicate a keymap. After duplication, you can change keyboard shortcuts for almost every action and even add more shortcuts than what you get by default. This way, you can even add (most of) your personal customizations from Visual Studio to IntelliJ.
File > Settings > Keymap select Visual Studio from dropdown
For now, just install vscode keymap from plugin store:
And there is a VSCode keymap, many thanks to the uploder!

How to reapply IntelliJ IDEA keyboard scheme?

A couple of days ago I resetted Visual Studio settings. All keyboard shortcuts were assigned to their default values. I applied IntelliJ IDEA scheme back but it seems like some Visual Studio shortcuts are not removed and some ReSharper shortcuts are not added.
I had to remove a bunch of Visual Studio shortcuts starting with Ctrl+E to make the ReSharper Ctrl+E shortcut work(same issues with Ctrl+R shortcuts and more). How can I make sure those unwanted shortcuts are removed?
Try the following in succession:
Go to Tools > Options > Environment > Keyboard, and click Reset
for the default scheme.
Go to ReSharper > Options > Environment > Visual Studio
Integration, choose ReSharper 2.x or IntelliJ IDEA and click
Apply Scheme.
I ended up exporting keyboard settings from my computer at home. It seems like ReSharper can't apply its scheme back.

F12 no longer works in Visual Studio

This is driving me crazy. Ever since I installed ReSharper 4, F12 no longer seems to work. If you look at the all the ReSharper short cuts in the Goto sub menu Declaration doesn't have any assigned!
The only way I can go to declaration is by using Alt and ` and then selecting Declaration.
I have tried un-installing and re-installing ReSharper with no luck, I have also, in ReSharper option asked it to use the default Visual Studio Key Bindings but that doesn't to work either.
Interestingly, when I do use Alt and ` I actually get two entries for the Declaration option.
Has anyone come across this problem?
I am using Visual Studio 2005 SP1.
I ran into the same issue and resolved it by first resetting my Visual Studio keyboard mappings:
Tools > Options > Keyboard > Reset
Then going into the ReSharper options and applying the scheme:
Resharper > Options > Visual Studio Integration > Apply Scheme
Update:
For VS2017 onwards:
Tools > Options > Environment > Keyboard > Reset
For Resharper 2017.2:
Resharper > Options > Environment > Keyboard & Menus > Keyboard Shortcuts > Apply Scheme
I have had a few occasions where Resharper and Visual Studio keybindings got mixed up and I had problems sorting them out.
If it is only one or two bindings you care about then you can change them by going to the
Tools->Customize->Keyboard menu option.
For ReSharper 8 and Visual Studio 2012:
Tools > Options > Keyboard > Reset
Then going into the ReSharper options and applying the scheme:
Resharper > Options > Environment > Keyboard & Menus > (Select Visual Studio under Keyboard Shortcuts) > Apply Scheme > Save
I had this problem and it was resolved by following the steps described in the picture:
Open Visual Studio Tabs on the path: Tools>>Options>>Keyboard
Open Visual Studio Tabs on the path: Resharper>>Options>>Keyboard & Menus and Do the following:
And Then Reopen the path above and do the following:
Finally, close the Visual Studio and open it.
I had this issue in VS2015 using Resharper 9.1.3, I tried Ryan's answer but it still didn't work.
After doing the steps Ryan outlined, I clicked F12 where Resharper asks What do you want to do?, I select Use Visual Studio commands. Still doesn't work.
Tools > Options > Keyboard > Select ReSharper.ReSharper_GotoNextHighlight from command list box
Change Shortcuts for selected command to F12 (Text Editor), click Remove and OK.
After this it works!
Try simple way to enable it, press Fn + Esc key of the keyboard.
It is possible that you have enabled Fn mode (Blue Keys) on your keyboard which overrides default behavior of functional keys including F12.
I had the same problem with VS2013 and Resharper 9. I have a code like this:
gridList.Method1();
gridList.Method2();
I then right-click on any of gridList and click Find Usages (or just use Shift+F12) but it says "Usages not found" even though it is just one line away! Sometimes VS restart would help, sometimes it wouldn't. It looks like clearing the cache of Reshaper helps though: Resharper -> Options -> Environment -> General -> Clear Caches. This needs VS to be restarted, but then it started working as expected.
My problem was that I couldn't use the command "Alt + F12" when trying to "peek definition" in Visual Studio. I found out through another forum-thread that it was Nvidia's GeForce Experience that overrides some of the "Alt" shortcuts and uses them for their functionalities with screen recordings etc.
What solved it for me, was going into the GeForce Experience settings and switch off the use of in-game overlay:
Alternatively, if you want to use the overlay, you can just change the short cut commands.
For ReSharper Ultimate 2017.3.3 and Visual Studio 2017:
Tools > Options > Tools > External Sources > Default Visual Studio Navigation > Save
I ran into this problem after an organizational change that caused my windows profile to change. I tried the solutions listed above, but nothing seemed to work.
Here is how I fixed it (brute force worked!)
NOTE: Steps listed are for VS 2012 and ReSharper 7.1.3
Uninstalled Re-Sharper
Exit visual studio, ensure the process devenv.exe is no longer there in the running processes (was there in my case and I had to do a "End Process Tree" from Task Manager)
Fired up VS 2012, and from the menu Tools -> Options -> Environment -> Keyboard selected Visual C# 2005 (or any other setting you love) and pressed Reset
Shutdown VS again (and ensure devenv.exe has been killed in Task manager)
Re-installed re-sharper
Best of luck!
These steps solved it for me:
Uninstall keyboard in Device Manager
Re-insert your keyboard usb
"Web Essentials"
Add or update visual studio "Web Essentials" You can find it at:
Menu>>Tools>>Extensions and Updates
I hope this will save your time. It worked for me.
ReSharper added a crap 'good' new thing that they now call a feature: Smart Go To Declaration. As dumb as it may sound, it comes enabled by default: crap 'good'.
The feature is described on the link provided from here but honestly at least it should've keep it disabled, not reinvent the wheel. It also tells you how to disable that crap 'good' feature.
Sometimes it has noting to do with Visual Studio at all. Be sure your keyboard has its function key setting of the keyboard itself to send the F12 function to Visual Studio. It is an easy thing to miss.
I had just installed Pulover’s Macro Creator and F12 was set as the global hotkey to pause a macro. It was intercepting the keypress before it had a chance to get to VS.
Solution is to change that hotkey to something else. I chose Ctrl-F12. The input box is on the top right of the Pulover window.
Update 2020. I had the same problem and also tried a lot of ways, but that was still didn't working... [VS 2015, ReSharper 2019.3.1]
But, like Andrius said:
Resharper -> Options -> Environment -> General -> Clear Caches. This needs VS to be restarted, but then it started working as expected.
Summary is: (try steps above) + Resharper..-> Clear Caches + VS restart. Hope this will be useful

Resources