Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Peek definition (Alt+F12) no longer does anything in Visual Studio

While Goto Defnition works as expected with key F12,
the hotkey Alt+F12 for Peek Definition no longer does anything.
How do I restore Alt+F12 functionality?

like image 868
Jim V Avatar asked Dec 03 '16 04:12

Jim V


People also ask

How do I enable F12 in Visual Studio?

Enter Tools > Options > Environment > Keyboard and press the Reset button. Click OK to save changes.

How do I enable definition in Visual Studio?

If you are a keyboard user, place your text cursor somewhere inside the symbol name and press F12. If you are a mouse user, either select Go To Definition from the right-click menu or use the Ctrl-click functionality described in the following section.

How do I enable to define code in Visual Studio?

Go to Definition If a language supports it, you can go to the definition of a symbol by pressing F12. Tip: You can jump to the definition with Ctrl+Click or open the definition to the side with Ctrl+Alt+Click.


3 Answers

One cause of this is Nvidia GeForce Experience intercepting Alt presses while listening for Alt+Z, which is the activation toggle for Nvidia ShadowPlay.

I fixed this by opening GeForce Experience and going Settings -> Share -> Off.

(Activating screen recording is left as an exercise for the reader.)

like image 153
Jim V Avatar answered Jan 01 '23 19:01

Jim V


Had similar issue and the fix was simply resetting the hotkey Alt+F12 to peek in Visual Studio with following steps:

  1. Go to Tools->Options->Environment->Keyboard
  2. Select (or search) the key Edit.PeekDefinition and click on Remove
  3. Inside the textbox near Assign button press Alt+F12
  4. Finish by pressing Assign and OK buttons

Here is an image for steps just in case you need:

enter image description here

PS. This solution also worked when Intel Graphics was opening on Alt+F12

like image 37
Just Shadow Avatar answered Jan 01 '23 19:01

Just Shadow


In GeForce Experience, remove the Alt+F12 keyboard mapping for Toggle FPS Counter on/off found in:

Settings -> General -> In-Game Overlay -> Settings -> Keyboard Shortcuts

This fixes this issue without disabling the whole In-Game Overlay feature.

like image 32
draganndi Avatar answered Jan 01 '23 21:01

draganndi