What is the keyboard shortcut navigate back to the last cursor position in Visual Studio Code?
You can go to File -> Preferences -> Keyboard Shortcut. Once you are there, you can search for navigate. Then, you will see all shortcuts set for your VS Code environment related to navigation. In my case, it was only Alt + - to get my cursor back.
As an alternative to the keyboard shortcuts, here's an extension named "Back and Forward buttons" that adds the forward and back buttons to the status bar:
https://marketplace.visualstudio.com/items?itemName=grimmer.vscode-back-forward-button
Alt+← / →
You can find here all shortcuts
https://code.visualstudio.com/docs/customization/keybindings
This will be different for each OS, based on the information at https://code.visualstudio.com/docs/customization/keybindings
Go Back: workbench.action.navigateBack Go Forward: workbench.action.navigateForward
Linux
Go Back: Ctrl+Alt+-
Go Forward: Ctrl+Shift+-
OSX ⌃- / ⌃⇧-
Windows Alt+ ← / →
The Keyboard Shortcut Commands are Go Forward
and Go Back
.
On Windows:
Alt+← .. navigate back
Alt+→ .. navigate forward
On Mac:
Ctrl+- .. navigate back
Ctrl+Shift+- .. navigate forward
On Ubuntu Linux:
Ctrl+Alt+- .. navigate back
Ctrl+Shift+- .. navigate forward
The answer for your question:
You can find out the current key-bindings following this link
You can even edit the key-binding as per your preference.