eli-bd
eli-bd

Reputation: 1634

Visual studio keyboard shortcut to go to end of line in Windows

I'm using visual studio community 2017. I want to remap the keyboard shortcut that moves the caret to the end of line (since I'm working on a laptop without the "End" key).

I know how to remap visual studio keys, but I can't find the menu item for it. Do you know what is the menu/action name for it so I can change it?

I can't find the answer on the web though it was asked several times.

Upvotes: 16

Views: 37637

Answers (5)

N Katz
N Katz

Reputation: 77

For me, fn + end (the reverse is fn + home button) moves the curser to the end of the current line of code, in visual studio.

Note, the fn button has to be enabled. For dell, you press the Esc + the fn button to enable/disable it.

Upvotes: 1

Muhammad Ali
Muhammad Ali

Reputation: 91

This is the way to go:

enter image description here

Don't forget to change Global to Text Editor.

Upvotes: 6

JustinC
JustinC

Reputation: 415

Using a circa 2018 macbook pro without explicit labels for home or end, no system or extra configuration is required:

Begin of Line: Fn+LeftArrow
End of Line: Fn+RightArrow
Top of Document/Home: Fn+UpArrow
Bottom of Document: Fn+DownArrow

This took a little bit of overdue google-research, but a solution or answer lies in this post: https://answers.microsoft.com/en-us/mac/forum/macoffice2011-macexcel/what-key-on-the-macbook-pro-is-the-end-key-to/2b3517d7-2cf5-4c33-a53e-9d229f6f36f9

While this is specific to MacBooks of a certain era, it may possibly apply more broadly.

Upvotes: 5

Sergey Vlasov
Sergey Vlasov

Reputation: 27890

The command name is Edit.LineEnd. You can assign a new shortcut to it in Visual Studio keyboard options.

Assign the shortcut in the "Text Editor" scope (rather than the default "Global" scope).

When done correctly, it should look like this:

enter image description here

Upvotes: 22

Misha
Misha

Reputation: 73

I've tried to do something similar with key mappings in Visual Studio before, and I couldn't find any options. What I ended up using was AutoHotkey, and with it you can set up a key bind really quickly. Hope this helps!

Upvotes: 3

Related Questions