Essentially I just want to press Ctrl+Tab, not Ctrl+A then Tab. I don't believe this can be accomplished with an alias, but have read some stuff about maybe using
stty? But I've never used
stty and not sure how this would be done.
Yes, but only with the cooperation of your terminal emulator. Terminal emulators send escape sequences (or in a few cases a single control character) to indicate the press of a function key. See the “terminal — input” section of How do keyboard input and text output work? for more details. You need to configure your terminal to send a unique escape sequence for Ctrl+Tab. Some terminals send the Tab character for both plain Tab and Ctrl+Tab, so that applications can't distinguish between them. To see what your terminal sends, press Ctrl+V then Ctrl+Tab. If you see a few spaces, that's bad and you need to reconfigure your terminal, if possible. How to do that depends entirely on the terminal software. If you see something like
5), that's fine.
Assuming that your terminal sends a unique escape sequence for Ctrl+Tab, you can tell Screen what to do with it with the command
bind for bindings that start with the “Screen key” Ctrl+A, and
bindkey for other key bindings). For example, with the control sequence above, put the following line in your
bindkey ^[O5 next
If you are using xterm, add this to your ~/.Xresources file:
*vt100.translations: #override \n\ Ctrl ~Shift <Key>Tab: string(0x1b) string("[27;5;9~") \n \ Ctrl Shift <Key>Tab: string(0x1b) string("[27;6;9~") \n
This goes in your screenrc configuration file:
bindkey "^[[27;5;9~" focus
Make sure to log out of your X session.