Floobits / atom-term3

Open Terminal tabs in Atom. Fork of Term package
Other
88 stars 17 forks source link

using keyboard shortcut to switch focus from other pane to shell pane #23

Closed yimingli closed 8 years ago

yimingli commented 8 years ago

I use command + K, command + N to change the focus of the panes. When I switch the focus from the shell session pane to text panes, I can start type without issues. But when I use the same keyboard shortcut to switch from text panes to shell session panes, I lost the focus.

OS X: 10.11.1 Atom: 1.2.4 term3: 0.19.2

dustinblackman commented 8 years ago

I usually press tab once I switch to my shell.

bendavis78 commented 8 years ago

I'm seeing the same issue. I use the following shortcuts:

'ctrl-w l': 'window:focus-pane-on-right'
'ctrl-w h': 'window:focus-pane-on-left'
'ctrl-w k': 'window:focus-pane-above'
'ctrl-w j': 'window:focus-pane-below'

When the pane is focused/blurred, the corresponding terminal is not focused/blurred.

lebedov commented 8 years ago

I also have observed something similar with atom 1.5.4 and term3 0.21.2 on Ubuntu 14.04.3; focus is retained when I switch from an editor tab to a term3 tab using pane:show-next-item or pane:show-previous-item, but not when I switch from a term3 tab to an editor tab.

15cm commented 8 years ago

The same problem as bendavis78. I have to press tab once I switch to 'term3' pane.

lebedov commented 8 years ago

I should add that pressing the tab key after switching from a term3 tab back to an editor tab does not restore focus in the scenario I described.

lebedov commented 8 years ago

Still an issue with 0.21.4.

dasilvacontin commented 8 years ago

It does restore focus for me. Having to do tab is not ideal, but better than having to click to regain focus, which would be a deal-breaker.

ggreer commented 8 years ago

Yeah, this is annoying. It looks like the "switch pane" keyboard shortcut sets document.activeElement to the atom-pane, not the terminal div. Either the key handlers need to be installed on the pane, or focus needs to be set more specifically.

ggreer commented 8 years ago

OK, the latest release (v0.22.0) should have this fixed. Please update and give it a try.

dasilvacontin commented 8 years ago

Works! Much thanks @ggreer! :)

lebedov commented 8 years ago

I'm still not regaining focus when moving from a term3 pane back to an editor pane with term3 0.22.0 and atom 1.7.2 when I invoke pane:show-next-item (tested with a newly created ~/.atom directory and no third party packages other than term3 installed). Any idea why?

Edem95 commented 4 years ago

I used the code below in my keymap.con

'.platform-linux atom-workspace, .platform-win32 atom-workspace':
  'ctrl-alt-f': 'platformio-ide-terminal:focus'