title: GNU Screen: Reverse focus tabbing
body: <p>Is it possible to bind <kbd>Ctrl</kbd>+<kbd>a</kbd> <kbd>Shift</kbd>+<kbd>Tab</kbd> to switch focus to the previous window in the list (much like <kbd>Ctrl</kbd>+<kbd>a</kbd> <kbd>p</kbd> but changing the focus)? </p>
  
  <p>Specifically, I want to skip from the first to the last. For example, here is a screen profile:</p>
  
  <pre><code># Vertical split with two on right
  #
  # +---+---+
  # |   |   |
  # |   |---|
  # |   |   |
  # +---+---+
  #
  split -v
  screen bash
  title "main"
  focus
  split
  screen bash
  title "script"
  focus
  screen bash
  title "interpreter"
  focus left
  
  # ctrl+a navigating regions
  bind j focus down
  bind k focus up
  bind h focus left
  bind l focus right
  </code></pre>
  
  <p>Focus starts in the top left screen. I'd like to jump straight to the bottom right. I can do this by hitting <kbd>Ctrl</kbd>+<kbd>a</kbd> <kbd>Tab</kbd> twice. Is there a single command and, if so, how could I bind this to <kbd>Ctrl</kbd>+<kbd>a</kbd> <kbd>Shift</kbd>+<kbd>Tab</kbd>?</p>
  
  <h3>Edit</h3>
  
  <p>Have just found <kbd>Ctrl</kbd>+<kbd>a</kbd> <kbd>Ctrl</kbd>+<kbd>i</kbd> switches to the next window as well (strangely not <code>info</code>). I'm on <code>Screen version 4.01.00devel (GNU) 2-May-06</code></p>
  
  <h3>Good workaround</h3>
  
  <p>Add the following to your screen profile (or <code>~/.screenrc</code>)</p>
  
  <pre><code>## ctrl+a navigating regions
  bindkey "^j" focus down
  bindkey "^k" focus up
  bindkey "^h" focus left
  bindkey "^l" focus right
  </code></pre>
  
  <p>Now you can zip around quickly by holding <kbd>Ctrl</kbd> + <kbd>h</kbd>/<kbd>j</kbd>/<kbd>k</kbd>/<kbd>l</kbd> in a <code>vim</code>-esque style.</p>