Kevin, Sorry my wording has perhaps been a bit miss leading, and my very first email had an inaccuracy (due to my own confusion) which I'll try to clarify again.
In plain old gnome-terminal, my TERM value is 'xterm-256color' and everything works correctly. In tmux, my TERM value is 'screen-256color', and my CTRL, ALT and SHIFT keys do not work correctly when modifying various special keys (such as the Arrow keys). I have attempted to use TERM value of 'screen' with the same results (other than a lack of 256 colours). I did attempt to use TERM=xterm-256color while in tmux, and the result was that Ctrl and Shift started to behave correctly, Alt did not. Although as you know this is not a viable solution as the screen fails to refresh correctly. For an experiment I also tried using xterm (the actual xterm terminal emulator): 1. Ran xterm 2. Checked my $TERM was equal to 'xterm' 3. Checked my Ctrl-Arrow keys - they worked 4. Ran tmux (from within xterm) 5. Checked my $TERM was equal to 'screen' 6. Checked my Ctrl-Arrow keys - they dont work Incidently, the same experiment, when done with screen instead of tmux, screen also fails to work correctly until TERM=xterm, at which point all 3 modify keys including Alt start working! Regards, Paul Excerpts from Kevin Goodsell's message of Fri Mar 25 16:50:16 +0000 2011: > On Fri, Mar 25, 2011 at 2:29 AM, Paul Grove <paul.a.gr...@gmail.com> wrote: > > Kevin, > > > > According to the tmux man page, TERM must be set to screen. > > You have misunderstood. tmux is a terminal which must be identified as > screen. gnome-terminal is a terminal which must also be identified by > TERM, but "screen" is incorrect for gnome-terminal. tmux can't possibly > dictate how the underlying terminal has to be identified -- on the > contrary, it depends on that terminal being identified correctly. > > The TERM variable tells terminal applications what terminal description > they should use -- effectively, what terminal they are running under. > They need this information to determine how to do things like position > the cursor, clear the screen, set colors, and interpret keycodes. As a > terminal application, tmux needs you to correctly tell it what terminal > it is running under. It's applications running under *tmux* that need > TERM to be set to screen, because the screen terminal description > describes the codes tmux itself uses to clear its screen, etc. > > In short, TERM will be different outside and inside of tmux. > > You really can't expect any terminal application to work correctly as > long as TERM is wrong. > > -Kevin
signature.asc
Description: PGP signature
------------------------------------------------------------------------------ Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users