How to stop using the arrow keys in Visual Studio Code - visual-studio

When I am using letter keys and move to arrow keys it's a waste of my time. For that, I use vim in vscode but problem is that I don't use h,j,k,l, etc letter when type. For example: when I type "j" my cursor down but I don't type the letter "j" ..how can I solve the problem?

you can give a try to touchcursor-linux. It basically provides arrow keys and other button functionalities by making space button work as shift. I think it's really intutive and easy....and you don't have to switch to vim keyboard layout as well.

Related

Standard (no third-party) way to get numeric keypad working as arrow keys on macOS (Xcode? hidutil?)

I always use numeric keypad as arrows, as I find it more convenient than using an separate arrow pad. Until recently I used a tool Karabiner Elements, but it stopped functionning at Big Sur.
Yes, The Karabiner developer is working on that issue, but it will be better to solve it without relying on a third-party tool.
It will be enough for me to either remap Xcode, or (which is preferred) to change key bindings in the system, using a tool like hidutil.
Xcode's Preferences - Key Binding has a section Text - Section. When I try to modify the binding for say Move Down by pressing Down arrow on numeric keypad it comes up as '2'. Now whereever I press '2', on keyboard or numeric keypad, it always works as Move Down which is certainly not what I am after.
About hidutil. I couldn't find a good manual or any example of keyboard mapping.
Any help?
Had another look at this article. Here is the answer:
hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x70000005A,"HIDKeyboardModifierMappingDst":0x700000051},
{"HIDKeyboardModifierMappingSrc":0x700000060,"HIDKeyboardModifierMappingDst":0x700000052},
{"HIDKeyboardModifierMappingSrc":0x70000005C,"HIDKeyboardModifierMappingDst":0x700000050},
{"HIDKeyboardModifierMappingSrc":0x70000005E,"HIDKeyboardModifierMappingDst":0x70000004F},
{"HIDKeyboardModifierMappingSrc":0x70000005F,"HIDKeyboardModifierMappingDst":0x70000004A},
{"HIDKeyboardModifierMappingSrc":0x700000061,"HIDKeyboardModifierMappingDst":0x70000004B},
{"HIDKeyboardModifierMappingSrc":0x700000059,"HIDKeyboardModifierMappingDst":0x70000004D},
{"HIDKeyboardModifierMappingSrc":0x70000005B,"HIDKeyboardModifierMappingDst":0x70000004E},
{"HIDKeyboardModifierMappingSrc":0x700000062,"HIDKeyboardModifierMappingDst":0x700000049},
{"HIDKeyboardModifierMappingSrc":0x700000063,"HIDKeyboardModifierMappingDst":0x70000004C}]}'
Still can't fugure out, how to do (if possible) complex mapping with modifier keys (eg Ctrl+PgUp to Home), but that's another topic.

Brakets keyboard shortcut to move focus to treeview

This should have been relatively easy to fine out , turns out its not, so actually all i really want is a shortcut with which i can toggle between the text editor and the treeview on the left.
The brackets documentation really don't mention any such shortcut see here.
In Atom text editor for example there is a shortcut ctrl+0 which shifts focus to the tree view , i can't seem to find such a shortcut in brackets though. I love all the features of brackets, but i just seem to be short of this one last shortcut to make my work flow awesome !!
Thank you.
Alex-z.

How do I move through intellisense suggestions with a keyboard shortcut?

When I write something like Console. I get suggestions like Console.Write and Console.WriteLine. I don't want to use the arrow keys, they are too far away, how do create a shortcut for that? I would prefer something like shift+o for moving up and shift+k for moving down.
Try TouchCursor, it lets you use the home keys as cursor key
TouchCursor
You can always remap the keyboard shortcuts to do what you want. See my answer here: https://stackoverflow.com/a/18744507/958809
I don't if there is an alternative for navigating one by one but you can use the first letters of every word to quickly find what you are looking for.
Typing Console.wl will quickly bring up Console.WriteLine. It's available by ReSharper I think.
You don't even have to type the first letters by the order. Typing avl can bring up SomeMethodWithAVeryLongName.
I don't know solutions within Visual Studio and ReSharper.
But maybe a remapping of keyboard keys can help, i.e. remap Caps Look key to Arrow Down key. See http://www.askdrtech.com/solutions/post/How-to-change-keyboard-mapping.aspx for explanation.
I think your problem is just this: Ctrl + Alt + Space
In VS Code, go to File > Preferences > Keyboard Shortcuts
Search for suggest select in the search bar
the ones you want to change are selectNextSuggestion and selectPrevSuggestion. I mapped mine to TAB and shift + TAB, respectively, to free my arrow keys.
There's plenty of cool stuff you can customize for Intelisense. Check the documentation page: https://code.visualstudio.com/docs/editor/intellisense

Remap keyboard combinations, not just single registry values

I'm getting real tired of pressing shift every time I want to type $ or #. I've checked out key remapping programs like SharpKeys and a few others, but they don't support the SHIFT+[key] actions. The problem is they modify the registry value for a single key only (I think).
I want to flip over my number keys so when I type 4, it outputs $, similar to a French keyboard. (I tried physically rotating the key so it's upside down, but that's not working).
There must be a solution for this - can you help?
The registry hackers move virtual keys around. What you need is a custom keyboard layout. You can easily create your own with the Microsoft KeyBoard Layout Creator utility.
In addition to the answer from #HansPassant, if you find trouble with the ctrl+KEY functions etc you might need to edit the .klc file manually.
See https://superuser.com/questions/171307/how-can-i-restore-ctrlkey-functionality-in-microsoft-keyboard-layout-creator :
You need to modify the .klc file manually.
Basically you just modify the VK_ column to match the value in
column 1.
So for example if you want to bind L to N, you
would create the keyboard as you normally would in KLC. Then you would
open the KLC file in a text editor. Find the value L in the VK_
column, and switch it to an N.
For more information, I wrote the complete steps on my blog.

Visual Studio keyboard shortcut to scroll method overloads tooltips?

Does anyone know what the keyboard shortcut to scroll a method's overloads that appears in the tooltip is? I presently have to resort to using the mouse to click the ^ and v labels in the tooltip, which isn't particularly effective.
Thanks!
A little late but maybe somebody else needs it too:
Place the cursor after the first bracket
Press Ctrl + Shift + Space
What's the command to bring up the tooltip? I know the shortcut in Eclipse (Ctrl + Space) but that's Eclipse...
In VS the tooltip shows when you type the first bracket but if I would like to see the different method overloads for a method that's been implemented already, how would I do that?
Press Ctrl + Shift + Space to see the list of overloads and arguments.
See the Visual C# 2008 Keybinding Reference Poster for more keyboard shortcuts.
The arrow keys work for me...
Sometimes I have to hit escape to get rid of the intellisence popup before using the arrow keys to scroll through the overload list.
What's the command to bring up the tooltip? I know the shortcut in Eclipse (ctrl+space) but that's Eclipse...
In VS the tooltip shows when you type the first bracket but if I would like to see the different method overloads for a method that's been implemented aldready, how would I do that?
There's got to be an easier way than this:
place the cursor just after the first bracket
erase it
re-type it (tada!)
navigate the methods using up and down arrows
when you're done, press ctrl+z to undo changes.
1. To Show Overloading Suggestions
Place the cursor after the first bracket and press CTRL + SHIFT + SPACE to bring it back.
Also, Erasing the opening bracket and writing it back can do the trick too.
2. To Scroll through Overloading Suggestions/Options
if your IntelliSense options are showing then press ESC which will hide it. Now, it's time to use the Up/Down arrow keys to see the charm.
if your IntelliSense is disabled, the Up/Down arrow keys will work directly.
Ctrl + Shift + Space in the "()" method brackets brings up the method overload context menu. The UP and DOWN arrows are used to navigate through.
The Visual Studio Keybindings definition is : Displays the name, number, and
type of parameters required for the specified method.
P.S. Jasper's link to Visual C# 2008 Keybinding Reference Poster is useful, check it out.
Arrow keys are the short cut keys i suppose as they work for me.
You can type a comma after the last parameter of the function. That will bring up the intelisense menu

Resources