Reputation: 1634
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
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
Reputation: 91
This is the way to go:
Don't forget to change Global to Text Editor.
Upvotes: 6
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
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:
Upvotes: 22
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