How to jump from Intellij terminal to editor with shortcut

intellij-idea, keyboard-shortcuts

Solution

UPDATE - March 2016

Since this question is getting some attention, I wanted to remind everyone that you can toggle between the editor and the terminal window easily enough with a built in action. By default it is mapped to Alt+F12 and ⌥F12. To check other mappings, view it in the menu at View > Tool Windows > Terminal. Alternatively go to the Working with Embedded Local Terminal web help page and change the Keymap option in the upper right corner and scroll to the very end (just above the "See also" section) where it says: "Toggle between the embedded local terminal and editor by pressing...". You can remap this action in Settings > Keymap > Other > Terminal

The main "issue" this question discusses is if there is a way to return from the terminal window to the editor without closing the terminal window.

[End March 2016 update]

===================================================

Some options I can think of at the moment.

- Alt+F12 a second time will take you back to the editor, but will hide the terminal window.

- Alt+Home will take you to the navigation bar, then hitting Esc will take you to the editor. If you do this often enough, to eliminate the need for the double sequence you could record a Macro (Edit > Macros) with the sequence. Then map it to a shortcut (Settings > [IDE Settings] > Keymap > Macros). The nice thing about this option is that it will work from any tool window. So you can get use to it as a consistent "Return to the Editor" shortcut.

- While there is no editor option in the Ctrl+Tab switcher that @vikingsteve mentions, you could do Ctrl+Tab, Ctrl+Shift+Tab. Again, you could record that to a macro.

If I think of any other ideas, I'll add them.

Problem

I know that you can jump from almost all windows in Intellij IDEA to the editor window with Esc. In Intellij's terminal window, this does not work. Does anyone know how to do this with a keyboard shortcut? This would be nice since I can jump from my editor to the terminal with Alt+F12 but I cannot do it the other way without using my mouse.

Original source