What is the keyboard shortcut navigate back to the last cursor position in Visual Studio?
8 Answers
It Will not work for red color (-) key. For me it only works for blue color combination.

- 7,864
- 10
- 36
- 69

- 4,054
- 3
- 29
- 45
-
1It in fact doesn't work with numpad 'minus' because it's another key indeed, although the characters be the same – Moesio Aug 27 '14 at 14:52
-
In visual studio 6 ( Visual C++ ) Shortcut key is `F2` – Elshan May 30 '16 at 07:10
-
image is broken – Tobia Zambon May 30 '17 at 08:29
-
19And `ctrl` + `shift` + `-` for forward – Jim Aho May 09 '18 at 10:41
-
@JimAho Only in VS the opposite of "-" is "shift+-" – Gulzar Feb 22 '22 at 16:09
According to Visual C# 2008 Keybinding Reference Poster it is Ctrl + -. The name of the specific keybinding is View.NavigateBackward.
PS: While researching I also found that Ctrl + . is the same as Shift + Alt + F10. Nice!

- 3,057
- 2
- 24
- 36

- 88,211
- 155
- 421
- 625
-
9
-
18
-
-
@LosManos, no it’s `Ctrl` + `Shift` + `-` aka `Ctrl`, `Shift` and `-` pressed at the same time. – Dennis T --Reinstate Monica-- Sep 06 '16 at 16:12
-
@Ozkan The binding for 'next cursor position' is ctrl-+ or (as I just learned after a typo) ctrl-shift-- – LosManos Sep 07 '16 at 06:06
-
-
The default keyboard settings might depend on the answer you make at installation time when you're asked what kind of programmer you are. There's no right answer, but be careful that if you say you're a C++ dev, and you have a nonqwerty keyboard, you'll be left with a shortcut that's unaccessible (`ctrl` + `.`). Since VS wants you to press `shift` to send the key with the `.` symbol on it (2nd level), it renders navigate backward unaccessible. That bug has been striking millions of developers for nearly two decades (I don't recall what was the shortcut in VS6, sorry). No bugfix forseeable. – Johan Boulé Apr 08 '20 at 15:58
ctrl
+ -
(dash) navigates backward.
ctrl
+ shift
+ -
(dash) navigates forward.
These settings can be found under Environment -> Keyboard:

- 9,932
- 15
- 56
- 87
-
1Note that the default keyboard settings for the multiple installations i've done overs various versions have always been `ctrl` + `.` and `ctrl` + `shift` + `.`. The former (navigate backward) is unaccessible for many nonqwerty keyboards, since you need to press `shift` to make VS realise that the key you're trying to send is the one with the `.` symbol on it (it's on the 2nd level). So, my answer is that there's is no default shortcut and you need to define it yourself. – Johan Boulé Apr 08 '20 at 15:46
For Changing the setting in Visual Studio 2019:
- Search for view.navigate
- CHOOSE "Text Editor" from the "Use new shortcut in:" drop down menu
- Select your shortcut
Global doesn't catch for this.

- 23,452
- 27
- 113
- 201
For new VS Code(1.28.2)
Back: Ctrl+Alt+- (dash)
Forward: Ctrl+Shift+- (dash)

- 791
- 1
- 11
- 26

- 526
- 5
- 17
-
4Note that VS != VS Code. former is the IDE, other is an open source editor with plugins. – ratijas Mar 11 '20 at 20:30
The most generic answers is: there is no working default and you need to define your own keyboard shortcuts for View.NavigateBackward and View.NavigateForward.
Why? For most keyboards, the default shortcut is a broken, unusuable combination because VS badly handles the shift and altGr modifiers. MS did not pay attention to portability and internationalisation so much when they redeveloped VS after version 6, and this is still true today. This bug has been there for way more than a decade, nearly two decades. At this rate, it will never be fixed. And yes, I have filled a bug report, and I'm certainly not the only one.
However, their "VSCode" product line does have better keyboard handling as it doesn't depend on the shift or altGr modifiers to identify the key. For example, when you are in text writing mode and press the key that has the dash symbol, without using shift nor altGr, let's say it writes something else, like number 6. To VSCode when it comes to shortcut handling, that's still the dash key for its purpose. As long as a key has the symbol written on it, whether this is painted as the 1st, 2nd or 3rd level doesn't matter, it just that key.
Of course, it's never a good thing to make the default shortcuts use non-alphanumeric symbols, that's always confusing, whether it works or not. The good mature text editors have known that for a long time and should be taken as examples of things done right. In some ways, VS learned a few good things from emacs with shortcuts that are a sequence of two letters, but ultimately screwed up on other parts with the choice of non-alphanumeric bindings, combined with a broken low-level keyboard handling.

- 1,936
- 15
- 19
On the top menu bar, right click and it'll give you an option -> 'command center'. See the arrow after you select it.

- 1,435
- 19
- 19