27

I've started splitting window in GNU screen into different regions - rather than switching between windows.

Anyway, having split a window into 4 regions (2x2) it takes 3 C-a <Tab> to return focus to the original region. That is quite cumbersome...

Are there other keybindings to move up, down, left, right between regions?

I can't understand this: hitting C-a t gives me time, does not switch to top win.

Should I change keybindings?

2
  • 2
    Adding as a comment since it's not an answer but see if tmux is available for your distribution. It's a modern re-write of what screen is. Very nifty and cleanly supports exactly what you're asking for. tmux.sourceforge.net
    – Kyle Smith
    Commented Jun 1, 2011 at 13:12
  • @Kyle: thanks, I know of tmux and probably I'll check it out. Moreover I notice screen splits are lost if you detach and reattach or just lock. A the end swapping between full-screen windows using C-a C-a or C-a windownumber is way more comfortable...
    – neurino
    Commented Jun 1, 2011 at 13:17

2 Answers 2

16

screen commands for switching between regions are: actually focus up, focus down, focus right and focus left. To type these commands (or any other screen command, for that matter) you type C-a :focus up, for example.

These commands are tedious to type, that's why you must create key bindings in your ~/.screenrc file. Since I'm a Vim user I opted for these lines in my ~/.screenrc file:

bind j focus down
bind k focus up
bind l focus right
bind h focus left

To switch to the left region I type C-a h

1
  • I guess a vim user would have bind ; focus right and bind l focus left
    – Daan
    Commented Jul 29, 2016 at 7:59
6

Take a look at the manual (man screen) - search for focus (using / to search). There is an example for binding focus up/down/top/bottom keys there. Not sure about left/right - focus doesn't seem to accept those as parameters.

9
  • you are right about left and right, it was top and bottom, my fault. The link in my answer is same as man screen anyway. It would be useful to me having a C-a Shift <Tab> to go backwards in order...
    – neurino
    Commented Jun 1, 2011 at 11:14
  • 2
    if I only knew what to put in bind command for Shift and Tab...
    – neurino
    Commented Jun 1, 2011 at 11:27
  • Yes - that would make a load of sense - you could probably bind it to focus up. You may need to figure out a termcap name for shift + tab though. A quick google shows that may take a bit of fiddling. Commented Jun 1, 2011 at 11:28
  • Okay - names I've found (none which yet work with/without -k) backtab, shifted-tab, F91, kB. Commented Jun 1, 2011 at 11:37
  • 1
    This looks useful - staldal.nu/tech/2009/01/10/how-to-use-ctrl-tab-in-gnu-screen Commented Jun 1, 2011 at 11:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .