Hi Nicolas, I forgot one tmux session inside my yakuake terminal after applying the patch and installing the latest checkout from git. I noticed this as I try to spawn a new tmux process with the enabled logging. So briefly summarized: Your patch is working! Thank's a lot for your help.
Regards Frank 2017-06-28 9:24 GMT+02:00 Nicholas Marriott <[email protected]>: > Please show me logs from running tmux -vv with this patch applied and > running one of the send-keys commands that doesn't work. Send me the > tmux-server*.log file created in the current directory. > > > > On Wed, Jun 28, 2017 at 06:15:13AM +0200, Franky Spamschleuder wrote: > > Hello Nicholas, > > no, this fix doesn'nt work for me. > > But I noticed that Alt Keys in Combination with "normal letters" do > work. > > I also remapped vim like navigation (hjkl) for navigating through the > > panes and Alt-i and Alt-o for cycling through the tabs. > > So when I configure tmux to send Alt Arrow Keys as Alt-hjkl and > > Alt-PageUp/PageDown as Alt-i and Alt-o inside a vim pane I got what I > > want. This does not fix the issue but is a good workaround. > > Cheers Frank > > 2017-06-22 20:47 GMT+02:00 Nicholas Marriott > > <[email protected]>: > > > > Yes special keys sent with send-keys will not have the xterm flag so > > they will be the old key style not the xterm key style which vim is > > expecting. > > > > Does this fix it? > > > > Index: cmd-send-keys.c > > =================================================================== > > RCS file: /cvs/src/usr.bin/tmux/cmd-send-keys.c,v > > retrieving revision 1.41 > > diff -u -p -r1.41 cmd-send-keys.c > > --- cmd-send-keys.cA A A 10 May 2017 10:46:59 -0000A A A 1.41 > > +++ cmd-send-keys.cA A A 22 Jun 2017 18:46:57 -0000 > > @@ -64,6 +64,8 @@ cmd_send_keys_inject(struct client *c, s > > A A A A struct key_bindingA A A *bd, bd_find; > > > > A A A A if (wp->mode == NULL || wp->mode->key_table == NULL) { > > +A A A A A A A A if (options_get_number(wp->window->options, > > "xterm-keys")) > > +A A A A A A A A A A A A key |= KEYC_XTERM; > > A A A A A A A A window_pane_key(wp, NULL, s, key, NULL); > > A A A A A A A A return; > > A A A A } > > Index: input-keys.c > > =================================================================== > > RCS file: /cvs/src/usr.bin/tmux/input-keys.c,v > > retrieving revision 1.61 > > diff -u -p -r1.61 input-keys.c > > --- input-keys.cA A A A 12 Jun 2017 07:04:24 -0000A A A 1.61 > > +++ input-keys.cA A A A 22 Jun 2017 18:46:57 -0000 > > @@ -177,7 +177,7 @@ input_key(struct window_pane *wp, key_co > > A A A A A * If this is a normal 7-bit key, just send it, with a > > leading escape > > A A A A A * if necessary. If it is a UTF-8 key, split it and > send > > it. > > A A A A A */ > > -A A A A justkey = (key & ~KEYC_ESCAPE); > > +A A A A justkey = (key & ~(KEYC_XTERM|KEYC_ESCAPE)); > > A A A A if (justkey <= 0x7f) { > > A A A A A A A A if (key & KEYC_ESCAPE) > > A A A A A A A A A A A A bufferevent_write(wp->event, > "\033", > > 1); > > Index: window.c > > =================================================================== > > RCS file: /cvs/src/usr.bin/tmux/window.c,v > > retrieving revision 1.198 > > diff -u -p -r1.198 window.c > > --- window.cA A 4 Jun 2017 09:02:36 -0000A A A A 1.198 > > +++ window.cA A 22 Jun 2017 18:46:57 -0000 > > @@ -1226,7 +1226,7 @@ window_pane_key(struct window_pane *wp, > > A A A A if (wp->mode != NULL) { > > A A A A A A A A wp->modelast = time(NULL); > > A A A A A A A A if (wp->mode->key != NULL) > > -A A A A A A A A A A A A wp->mode->key(wp, c, s, key, m); > > +A A A A A A A A A A A A wp->mode->key(wp, c, s, (key & > > ~KEYC_XTERM), m); > > A A A A A A A A return; > > A A A A } > > > > On Wed, Jun 21, 2017 at 06:43:52AM +0200, Franky Spamschleuder > wrote: > > >A A Hi Nicholas, > > >A A so I got once again some time left to play around and > figured out > > the > > >A A following: > > >A A Alt keys does work A as usual, the problem that I have got > ist > > with the > > >A A alt key via tmux send-keyes. As I mentioned I used a script > to > > switch > > >A A inside vim panes and tmux panes with the same key > combination. > > >A A When I'm inside vim and press alt Arrow key tmux triggers A a > > send-key > > >A A command which is not recognized correctly anymore like in > version > > 2.4.A > > >A A in .tmux.conf > > >A A bind -n M-Up AA A if "[ $(tmux display -p > > '#{pane_current_command}') = vim > > >A A ]" "send-keys M-Up" "select-pane -U" > > >A A bind -n M-Down A if "[ $(tmux display -p > > '#{pane_current_command}') = vim > > >A A ]" "send-keys M-Down" "select-pane -D" > > >A A bind -n M-Left A if "[ $(tmux display -p > > '#{pane_current_command}') = vim > > >A A ]" "send-keys M-Left" "select-pane -L" > > >A A bind -n M-Right if "[ $(tmux display -p > > '#{pane_current_command}') = vim > > >A A ]" "send-keys M-Right" "select-pane -R" > > >A A .vimrc > > >A A nnoremap <silent> <A-Up> :call TmuxMove('k')<cr> > > >A A noremap <silent> <A-Down> :call TmuxMove('j')<cr> > > >A A nnoremap <silent> <A-Left> :call TmuxMove('h')<cr> > > >A A nnoremap <silent> <A-Right> :call TmuxMove('l')<cr> > > >A A function! TmuxMove(direction) > > >A A let wnr = winnr() > > >A A silent! execute 'wincmd ' . a:direction > > >A A " If the winnr is still the same after we moved, it is the > last > > pane > > >A A if wnr == winnr() > > >A A call system('tmux select-pane -' . tr(a:direction, 'hjkl', > > 'LDUR')) > > >A A end > > >A A endfunction > > >A A This script is similar toA vim-tmux-navigator and was also > > noticed in > > >A A issue 907 in the last comment. I hope this information may > help > > you. > > >A A Regards Frank > > >A A 2017-05-31 12:37 GMT+02:00 Nicholas Marriott > > >A A <[email protected]>: > > > > > >A A A tmux uses xterm style escape sequences by default now for > meta > > + arrows, > > >A A A you will probably need to tell vim how to understand them. > > > > > >A A A If it doesn't get them from TERM=tmux then you will need > to > > configure it > > >A A A some other way, ask the vim developers? > > > > > >A A A On Wed, May 31, 2017 at 11:50:55AM +0200, Franky > Spamschleuder > > wrote: > > >A A A >AA AA Hi Nicholas, > > >A A A >AA AA so I tried export term=tmux; vimA > > >A A A >AA AA and test it again but it doesen't work. echo > &term > > inside vim > > >A A A shoes tmux > > >A A A >AA AA so it should set be A correct. > > >A A A >AA AA Regards Frank > > >A A A >AA AA 2017-05-31 10:46 GMT+02:00 Nicholas Marriott > > >A A A >AA AA <[email protected]>: > > >A A A > > > >A A A >AA AA AA You will need to configure vim to recognise > what > > tmux sends > > >A A A for these > > >A A A >AA AA AA keys. Setting TERM=tmux inside may do this, > or > > you may need to > > >A A A tell it > > >A A A >AA AA AA explicitly. > > >A A A > > > >A A A >AA AA AA On Wed, May 31, 2017 at 10:29:26AM +0200, > Franky > > Spamschleuder > > >A A A wrote: > > >A A A >AA AA AA >AAA AAA echo $TERM > > >A A A >AA AA AA >AAA AAA screen-256color > > >A A A >AA AA AA >AAA AAA 2017-05-31 10:26 GMT+02:00 > Nicholas > > Marriott > > >A A A >AA AA AA >AAA AAA <[email protected]>: > > >A A A >AA AA AA > > > >A A A >AA AA AA >AAA AAA AAA Do you have TERM=tmux inside > tmux > > or TERM=screen? > > >A A A >AA AA AA > > > >A A A >AA AA AA >AAA AAA AAA On Wed, May 31, 2017 at > > 10:17:57AM +0200, Franky > > >A A A Spamschleuder > > >A A A >AA AA AA wrote: > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA the Alt > mappings do > > not work in vim > > >A A A running inside > > >A A A >AA AA AA tmux > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA just try the > > following: > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA put these to > your > > vim config: > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA nnoremap > <silent> > > <A-Up> AAAAA A > > >A A A :execute 'wincmd A > > >A A A >AA AA AA k'<cr> > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA nnoremap > <silent> > > <A-Down> A :execute > > >A A A 'wincmd j'<cr> > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA nnoremap > <silent> > > <A-Left> A :execute > > >A A A 'wincmd h'<cr> > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA nnoremap > <silent> > > <A-Right> :execute > > >A A A 'wincmd l'<cr> > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA run vim, do a > split > > and try to switch > > >A A A with these > > >A A A >AA AA AA bindings through > > >A A A >AA AA AA >AAA AAA AAA the > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA windows > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA 2017-05-31 10:11 > > GMT+02:00 Nicholas > > >A A A Marriott > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA > > <[email protected]>: > > >A A A >AA AA AA >AAA AAA AAA > > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA Are you > saying > > the keys don't > > >A A A work in tmux > > >A A A >AA AA AA itself, or just in > > >A A A >AA AA AA >AAA AAA AAA vim inside > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA tmux? > > >A A A >AA AA AA >AAA AAA AAA > > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA On Wed, > May > > 31, 2017 at > > >A A A 10:06:33AM +0200, Franky > > >A A A >AA AA AA Spamschleuder > > >A A A >AA AA AA >AAA AAA AAA wrote: > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA >AAAAA > AAAAA > > konsole 17.04.1 > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA >AAAAA > AAAAA > > 2017-05-31 10:04 > > >A A A GMT+02:00 Nicholas > > >A A A >AA AA AA Marriott > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA >AAAAA > AAAA > > >A A A <[email protected]>: > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA > > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA >AAAAA > AAAAA > > AAAAA What terminal? > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA >AAAAA > AAAAA > > AAAAA On 31 May 2017 > > >A A A 9:02 am, "'Franky > > >A A A >AA AA AA Spamschleuder' > > >A A A >AA AA AA >AAA AAA AAA via > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA > tmux-users" > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA >AAAAA > AAAAA > > AAAA > > >A A A <[email protected]> > > >A A A >AA AA AA wrote: > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA > > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA >AAAAA > AAAAA > > AAAAA AAAAA Hi > > >A A A there, > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA >AAAAA > AAAAA > > AAAAA AAAAA I use > > >A A A alt arrow keys to > > >A A A >AA AA AA navigate inside > > >A A A >AA AA AA >AAA AAA AAA windows in vim and > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA the tmux > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA >AAAAA > AAAAA > > AAAAA AAAAA panes. > > >A A A Since I updated to > > >A A A >AA AA AA tmux 2.5 this does > > >A A A >AA AA AA >AAA AAA AAA not work > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA anymore. > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA >AAAAA > AAAAA > > AAAAA AAAAA Has it > > >A A A sth. to the with the > > >A A A >AA AA AA Issue #907 > > >A A A >AA AA AA >AAA AAA AAA mentioned in the > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA > changelog? How > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA >AAAAA > AAAAA > > AAAAA AAAAA can I > > >A A A fix this problem? > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA >AAAAA > AAAAA > > AAAAA AAAAA Thank > > >A A A you > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA >AAAAA > AAAAA > > AAAAA AAAAA Frank > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA > > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA >AAAAA > AAAAA > > AAAAA AAAAA -- > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA >AAAAA > AAAAA > > AAAAA AAAAA You > > >A A A received this message > > >A A A >AA AA AA because you are > > >A A A >AA AA AA >AAA AAA AAA subscribed to the > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA Google > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA >AAAAA > AAAAA > > AAAAA AAAAA Groups > > >A A A "tmux-users" group. > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA >AAAAA > AAAAA > > AAAAA AAAAA To > > >A A A unsubscribe from this > > >A A A >AA AA AA group and stop > > >A A A >AA AA AA >AAA AAA AAA receiving emails > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA from it, > send > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA >AAAAA > AAAAA > > AAAAA AAAAA an email > > >A A A to > > >A A A >AA AA AA >AAA AAA AAA > > [email protected]. > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA >AAAAA > AAAAA > > AAAAA AAAAA To post > > >A A A to this group, send > > >A A A >AA AA AA email to > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA > > [email protected]. > > >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA >AAAAA > AAAAA > > AAAAA AAAAA For more > > >A A A options, visit > > >A A A >AA AA AA >AAA AAA AAA > > https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "tmux-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
