In VS2012 is there a keyboard shortcut to give focus to the code editor? - visual-studio-2012

In VS2012 is there a keyboard shortcut to give focus to the code editor?
CTRL+TAB works most of the time, but on those occasions when the code editor already has focus but you didn't notice then this will switch windows instead.

I think ALT+0 is what you're finding.

Related

Can't activate shortcut on intellij products

Description
I'm using some intellij products (WebStorm, PHPStorm) and Android Studio and have the same issue with both of theses.
I have an azerty keyboard, with a french layout.
I can type without issue in these softs, but I can't activate shortcuts.
When I try to activate a shortcut (e.g ctrl+z), the activated shortcut is ctrl+w.
the shortcut is correctly triggered, but with the wrong keyboard layout. It seems that when I type, my french keyboard is used, but when I want to use a shortcut, the english layout seems to be used.
Is this a known bug (if so, I've not found any mentions about it), or did I miss something?
What I've tried
I'm running on Fedora 29, with Gnome 3.
I've tried to see if it wasn't reproductible with others softs (e.g firefox/ vscode), and I can't reproduce this.
I've tried to see if it wasn't based on my keyboard settings, so I ran xev to monitor the output of pressed keys. I can't reproduce this issue.
In intellij settings, I've tried to set Keymap > Prefer key position over key char with national layout both true and false, it doesn't seem to change anything.
Current situation
Here is an exemple of a shortcut definition in Android Studio.
I pressed A to Y keys on my french keyboard (which output A,Z,E,R,T,Y), and then press the same keys with ctrl (which output ctrl+Q instead of ctrl+A and so on)
https://imgur.com/a/U4aFd7F
Expected situation (tl;dr)
I expect that when I press ctrl+a, the shortcut triggered inside intellij products is ctrl+a instead of ctrl+q
It is indeed a known bug: https://youtrack.jetbrains.com/issue/IDEA-165950
In the bug report another workaround is mentioned for Gnome 3:
Re-order the languages in Settings > Language and Region tab, put English(US) first of the input source list.
I solved it by running setxkbmap fr. I don't know why this is required by intellij products, but it works.

How to disable/pass refactoring preview window in Android Studio

I'm using Android Studio for a long time and I always found annoying the fact that you have to manually move the mouse to click 'Do Refactor' when refactoring. Is there a way to do it by some keyboard shortcut or completely skip this preview window? When I'm refactoring I know what I'm doing and I don't feel like I need a preview in most cases.
I didn't find anything that could answer my question.
I had a similar issue with Android Studio. I couldn't find a way to disable preview, but I did find a keyboard shortcut workaround. Just press Alt+D and it will "do refactor".

Disabling mouse support on ideavim

Is there a way to disable mouse support in file edition on ideavim? It is really annoying that it enters into visual mode each time I click.
It isn't possible to have the same behavior as vim without mouse in terminal, but can I have it on pycharm's ideavim?
I also hate when the editor suddently goes into visual mode when I accidentally drag with the mouse. I ended up modifying the ideavim source and compiled my own version. I got the idea from another answer https://stackoverflow.com/a/24256022/598781
I just return immediately in the EditorMouseHandler.mouseDragged method. i.e. changed line 1772 in the file ideavim/src/com/maddyhome/idea/vim/group/MotionGroup.java to:
if (true || !VimPlugin.isEnabled()) return;
This change could have some consequences, but I don't use mouse select anyway.
It's not possible to disable mouse support in Vim emulation. Note however that IdeaVim switches to Visual selection mode only when you're selecting text with the mouse. Simple clicks shouldn't make IdeaVim enter visual selection mode.
You should try :set selectmode=mouse,ideaselection. It is a workaround but that worked for me.
https://github.com/JetBrains/ideavim/blob/master/doc/set-commands.md

Visual Basic 2013 - Pressing ALT gets me out of code

I just installed my Visual Basic and this is a problem I couldnt find an answer to. Everytime I press ALT it gets me out of code, and because I use SHIFT+ALT to change keyboards a lot while writing code, this is really disturbing to have to click in code again to be able to write.
Any ideas ?
Are you referring to the normal Windows way of accessing the menu via keyboard? This has nothing to do with Visual Studio; it will work similarly in almost any Windows application.
E.g. pressing Alt+F will open the File Menu etc. Just pressing Alt will highlight the menu (you should see the shortcut letters underlined for each item) and pressing a letter key will then open the menu. Instead, press Alt again to return to what you were doing before.

Is there a way to disable Quick Find in Visual Studio 2012?

I just upgraded to Visual Studio 2012 from 2010 and cannot stand the fact that Cntrl + F brings up the new Quick Find dialog in the upper right hand corner of the editor. I typically just dock the Find and Replace window and prefer to use that. Is there a way to disable Cntrl + F from bringing up the new Quick Find window and instead have it move focus to the Find and Replace window similar to how VS 2010 did it?
Yes there is. You can assign the keyboard shortcut ctrl+f to edit.findinfiles in tools>options>environment>keyboard. So far it works for me.
Instead of modifying the default keyboard shortcuts consider using
Ctrl+Shift+F for "Find in files"
Ctrl+Shift+H for "Replace in files"
Sometimes it's not always possible/advisable to change the default shortcuts. Like when working on another persons computer.

Resources