Alt Arrow Keys do not work anymore im vim since tmux 2.5

957 views
Skip to first unread message

Franky Spamschleuder

unread,
May 31, 2017, 4:02:29 AM5/31/17
to tmux-...@googlegroups.com
Hi there,

I use alt arrow keys to navigate inside windows in vim and the tmux panes. Since I updated to tmux 2.5 this does not work anymore.
Has it sth. to the with the Issue #907 mentioned in the changelog? How can I fix this problem?

Thank you

Frank

Nicholas Marriott

unread,
May 31, 2017, 4:04:33 AM5/31/17
to Franky Spamschleuder, tmux-users
What terminal?


--
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 tmux-users+unsubscribe@googlegroups.com.
To post to this group, send email to tmux-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Franky Spamschleuder

unread,
May 31, 2017, 4:06:35 AM5/31/17
to Nicholas Marriott, tmux-users
konsole 17.04.1

Nicholas Marriott

unread,
May 31, 2017, 4:11:32 AM5/31/17
to Franky Spamschleuder, tmux-users

Are you saying the keys don't work in tmux itself, or just in vim inside
tmux?




On Wed, May 31, 2017 at 10:06:33AM +0200, Franky Spamschleuder wrote:
> konsole 17.04.1
> 2017-05-31 10:04 GMT+02:00 Nicholas Marriott
> <nicholas...@gmail.com>:
>
> What terminal?
> On 31 May 2017 9:02 am, "'Franky Spamschleuder' via tmux-users"
> <tmux-...@googlegroups.com> wrote:
>
> Hi there,
> I use alt arrow keys to navigate inside windows in vim and the tmux
> panes. Since I updated to tmux 2.5 this does not work anymore.
> Has it sth. to the with the Issue #907 mentioned in the changelog? How
> can I fix this problem?
> Thank you
> Frank
>
> --
> 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 tmux-users+...@googlegroups.com.

Franky Spamschleuder

unread,
May 31, 2017, 4:17:59 AM5/31/17
to Nicholas Marriott, tmux-users
the Alt mappings do not work in vim running inside tmux

just try the following:

put these to your vim config:

nnoremap <silent> <A-Up>    :execute 'wincmd  k'<cr>
nnoremap <silent> <A-Down>  :execute 'wincmd j'<cr>
nnoremap <silent> <A-Left>  :execute 'wincmd h'<cr>
nnoremap <silent> <A-Right> :execute 'wincmd l'<cr>

run vim, do a split and try to switch with these bindings through the windows



2017-05-31 10:11 GMT+02:00 Nicholas Marriott <nicholas...@gmail.com>:

Are you saying the keys don't work in tmux itself, or just in vim inside
tmux?




On Wed, May 31, 2017 at 10:06:33AM +0200, Franky Spamschleuder wrote:
>    konsole 17.04.1
>    2017-05-31 10:04 GMT+02:00 Nicholas Marriott
>    <nicholas...@gmail.com>:
>
>      What terminal?
>      On 31 May 2017 9:02 am, "'Franky Spamschleuder' via tmux-users"
>      <tmux-...@googlegroups.com> wrote:
>
>        Hi there,
>        I use alt arrow keys to navigate inside windows in vim and the tmux
>        panes. Since I updated to tmux 2.5 this does not work anymore.
>        Has it sth. to the with the Issue #907 mentioned in the changelog? How
>        can I fix this problem?
>        Thank you
>        Frank
>
>        --
>        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 tmux-users+unsubscribe@googlegroups.com.

Nicholas Marriott

unread,
May 31, 2017, 4:26:15 AM5/31/17
to Franky Spamschleuder, tmux-users

Do you have TERM=tmux inside tmux or TERM=screen?



On Wed, May 31, 2017 at 10:17:57AM +0200, Franky Spamschleuder wrote:
> the Alt mappings do not work in vim running inside tmux
> just try the following:
> put these to your vim config:
> nnoremap <silent> <A-Up> A A :execute 'wincmd A k'<cr>
> nnoremap <silent> <A-Down> A :execute 'wincmd j'<cr>
> nnoremap <silent> <A-Left> A :execute 'wincmd h'<cr>
> nnoremap <silent> <A-Right> :execute 'wincmd l'<cr>
> run vim, do a split and try to switch with these bindings through the
> windows
> 2017-05-31 10:11 GMT+02:00 Nicholas Marriott
> <nicholas...@gmail.com>:
>
> Are you saying the keys don't work in tmux itself, or just in vim inside
> tmux?
>
> On Wed, May 31, 2017 at 10:06:33AM +0200, Franky Spamschleuder wrote:
> >A A konsole 17.04.1
> >A A 2017-05-31 10:04 GMT+02:00 Nicholas Marriott
> >A A <nicholas...@gmail.com>:
> >
> >A A A What terminal?
> >A A A On 31 May 2017 9:02 am, "'Franky Spamschleuder' via
> tmux-users"
> >A A A <tmux-...@googlegroups.com> wrote:
> >
> >A A A A Hi there,
> >A A A A I use alt arrow keys to navigate inside windows in vim and
> the tmux
> >A A A A panes. Since I updated to tmux 2.5 this does not work
> anymore.
> >A A A A Has it sth. to the with the Issue #907 mentioned in the
> changelog? How
> >A A A A can I fix this problem?
> >A A A A Thank you
> >A A A A Frank
> >
> >A A A A --
> >A A A A You received this message because you are subscribed to the
> Google
> >A A A A Groups "tmux-users" group.
> >A A A A To unsubscribe from this group and stop receiving emails
> from it, send
> >A A A A an email to tmux-users+...@googlegroups.com.
> >A A A A To post to this group, send email to
> tmux-...@googlegroups.com.
> >A A A A For more options, visit https://groups.google.com/d/optout.

Franky Spamschleuder

unread,
May 31, 2017, 4:29:28 AM5/31/17
to Nicholas Marriott, tmux-users
echo $TERM
screen-256color


>      >A  A  A  A  an email to tmux-users+unsubscribe@googlegroups.com.

Nicholas Marriott

unread,
May 31, 2017, 4:46:39 AM5/31/17
to Franky Spamschleuder, tmux-users
You will need to configure vim to recognise what tmux sends for these
keys. Setting TERM=tmux inside may do this, or you may need to tell it
explicitly.


On Wed, May 31, 2017 at 10:29:26AM +0200, Franky Spamschleuder wrote:
> echo $TERM
> screen-256color
> 2017-05-31 10:26 GMT+02:00 Nicholas Marriott
> <nicholas...@gmail.com>:
>
> Do you have TERM=tmux inside tmux or TERM=screen?
>
> On Wed, May 31, 2017 at 10:17:57AM +0200, Franky Spamschleuder wrote:
> >A A the Alt mappings do not work in vim running inside tmux
> >A A just try the following:
> >A A put these to your vim config:
> >A A nnoremap <silent> <A-Up> AA A :execute 'wincmd A k'<cr>
> >A A nnoremap <silent> <A-Down> A :execute 'wincmd j'<cr>
> >A A nnoremap <silent> <A-Left> A :execute 'wincmd h'<cr>
> >A A nnoremap <silent> <A-Right> :execute 'wincmd l'<cr>
> >A A run vim, do a split and try to switch with these bindings through
> the
> >A A windows
> >A A 2017-05-31 10:11 GMT+02:00 Nicholas Marriott
> >A A <nicholas...@gmail.com>:
> >
> >A A A Are you saying the keys don't work in tmux itself, or just in
> vim inside
> >A A A tmux?
> >
> >A A A On Wed, May 31, 2017 at 10:06:33AM +0200, Franky Spamschleuder
> wrote:
> >A A A >AA AA konsole 17.04.1
> >A A A >AA AA 2017-05-31 10:04 GMT+02:00 Nicholas Marriott
> >A A A >AA AA <nicholas...@gmail.com>:
> >A A A >
> >A A A >AA AA AA What terminal?
> >A A A >AA AA AA On 31 May 2017 9:02 am, "'Franky Spamschleuder'
> via
> >A A A tmux-users"
> >A A A >AA AA AA <tmux-...@googlegroups.com> wrote:
> >A A A >
> >A A A >AA AA AA AA Hi there,
> >A A A >AA AA AA AA I use alt arrow keys to navigate inside
> windows in vim and
> >A A A the tmux
> >A A A >AA AA AA AA panes. Since I updated to tmux 2.5 this does
> not work
> >A A A anymore.
> >A A A >AA AA AA AA Has it sth. to the with the Issue #907
> mentioned in the
> >A A A changelog? How
> >A A A >AA AA AA AA can I fix this problem?
> >A A A >AA AA AA AA Thank you
> >A A A >AA AA AA AA Frank
> >A A A >
> >A A A >AA AA AA AA --
> >A A A >AA AA AA AA You received this message because you are
> subscribed to the
> >A A A Google
> >A A A >AA AA AA AA Groups "tmux-users" group.
> >A A A >AA AA AA AA To unsubscribe from this group and stop
> receiving emails
> >A A A from it, send
> >A A A >AA AA AA AA an email to
> tmux-users+...@googlegroups.com.
> >A A A >AA AA AA AA To post to this group, send email to
> >A A A tmux-...@googlegroups.com.
> >A A A >AA AA AA AA For more options, visit
> https://groups.google.com/d/optout.

Franky Spamschleuder

unread,
May 31, 2017, 5:50:58 AM5/31/17
to Nicholas Marriott, tmux-users
Hi Nicholas,

so I tried export term=tmux; vim 
and test it again but it doesen't work. echo &term inside vim shoes tmux so it should set be  correct.

Regards Frank

Nicholas Marriott

unread,
May 31, 2017, 6:37:04 AM5/31/17
to Franky Spamschleuder, tmux-users
tmux uses xterm style escape sequences by default now for meta + arrows,
you will probably need to tell vim how to understand them.

If it doesn't get them from TERM=tmux then you will need to configure it
some other way, ask the vim developers?


On Wed, May 31, 2017 at 11:50:55AM +0200, Franky Spamschleuder wrote:
> Hi Nicholas,
> so I tried export term=tmux; vimA
> and test it again but it doesen't work. echo &term inside vim shoes tmux
> so it should set be A correct.
> Regards Frank
> 2017-05-31 10:46 GMT+02:00 Nicholas Marriott
> <nicholas...@gmail.com>:
>
> You will need to configure vim to recognise what tmux sends for these
> keys. Setting TERM=tmux inside may do this, or you may need to tell it
> explicitly.
>
> On Wed, May 31, 2017 at 10:29:26AM +0200, Franky Spamschleuder wrote:
> >A A echo $TERM
> >A A screen-256color
> >A A 2017-05-31 10:26 GMT+02:00 Nicholas Marriott
> >A A <nicholas...@gmail.com>:
> >
> >A A A Do you have TERM=tmux inside tmux or TERM=screen?
> >
> >A A A On Wed, May 31, 2017 at 10:17:57AM +0200, Franky Spamschleuder
> wrote:
> >A A A >AA AA the Alt mappings do not work in vim running inside
> tmux
> >A A A >AA AA just try the following:
> >A A A >AA AA put these to your vim config:
> >A A A >AA AA nnoremap <silent> <A-Up> AAA A :execute 'wincmd A
> k'<cr>
> >A A A >AA AA nnoremap <silent> <A-Down> A :execute 'wincmd j'<cr>
> >A A A >AA AA nnoremap <silent> <A-Left> A :execute 'wincmd h'<cr>
> >A A A >AA AA nnoremap <silent> <A-Right> :execute 'wincmd l'<cr>
> >A A A >AA AA run vim, do a split and try to switch with these
> bindings through
> >A A A the
> >A A A >AA AA windows
> >A A A >AA AA 2017-05-31 10:11 GMT+02:00 Nicholas Marriott
> >A A A >AA AA <nicholas...@gmail.com>:
> >A A A >
> >A A A >AA AA AA Are you saying the keys don't work in tmux
> itself, or just in
> >A A A vim inside
> >A A A >AA AA AA tmux?
> >A A A >
> >A A A >AA AA AA On Wed, May 31, 2017 at 10:06:33AM +0200, Franky
> Spamschleuder
> >A A A wrote:
> >A A A >AA AA AA >AAA AAA konsole 17.04.1
> >A A A >AA AA AA >AAA AAA 2017-05-31 10:04 GMT+02:00 Nicholas
> Marriott
> >A A A >AA AA AA >AAA AAA <nicholas...@gmail.com>:
> >A A A >AA AA AA >
> >A A A >AA AA AA >AAA AAA AAA What terminal?
> >A A A >AA AA AA >AAA AAA AAA On 31 May 2017 9:02 am, "'Franky
> Spamschleuder'
> >A A A via
> >A A A >AA AA AA tmux-users"
> >A A A >AA AA AA >AAA AAA AAA <tmux-...@googlegroups.com>
> wrote:
> >A A A >AA AA AA >
> >A A A >AA AA AA >AAA AAA AAA AAA Hi there,
> >A A A >AA AA AA >AAA AAA AAA AAA I use alt arrow keys to
> navigate inside
> >A A A windows in vim and
> >A A A >AA AA AA the tmux
> >A A A >AA AA AA >AAA AAA AAA AAA panes. Since I updated to
> tmux 2.5 this does
> >A A A not work
> >A A A >AA AA AA anymore.
> >A A A >AA AA AA >AAA AAA AAA AAA Has it sth. to the with the
> Issue #907
> >A A A mentioned in the
> >A A A >AA AA AA changelog? How
> >A A A >AA AA AA >AAA AAA AAA AAA can I fix this problem?
> >A A A >AA AA AA >AAA AAA AAA AAA Thank you
> >A A A >AA AA AA >AAA AAA AAA AAA Frank
> >A A A >AA AA AA >
> >A A A >AA AA AA >AAA AAA AAA AAA --
> >A A A >AA AA AA >AAA AAA AAA AAA You received this message
> because you are
> >A A A subscribed to the
> >A A A >AA AA AA Google
> >A A A >AA AA AA >AAA AAA AAA AAA Groups "tmux-users" group.
> >A A A >AA AA AA >AAA AAA AAA AAA To unsubscribe from this
> group and stop
> >A A A receiving emails
> >A A A >AA AA AA from it, send
> >A A A >AA AA AA >AAA AAA AAA AAA an email to
> >A A A tmux-users+...@googlegroups.com.
> >A A A >AA AA AA >AAA AAA AAA AAA To post to this group, send
> email to
> >A A A >AA AA AA tmux-...@googlegroups.com.
> >A A A >AA AA AA >AAA AAA AAA AAA For more options, visit
> >A A A https://groups.google.com/d/optout.

Franky Spamschleuder

unread,
Jun 1, 2017, 4:01:27 AM6/1/17
to Nicholas Marriott, tmux-users
Ok, thank you - I will look what I can do. At first I will stay at 2.4.
I'm using zsh with ohmyzsh with the powerlevel9k theme, which acutally requires as term setting screen-256color or xterm-256color so I have to figure out another solution.

Regards Frank

Suraj N. Kurapati

unread,
Jun 1, 2017, 12:51:33 PM6/1/17
to 'Franky Spamschleuder' via tmux-users, Franky Spamschleuder, Nicholas Marriott
On Wed, 31 May 2017 10:17:57 +0200, 'Franky Spamschleuder' via
tmux-users wrote:
> the Alt mappings do not work in vim running inside tmux
>
> nnoremap <silent> <A-Up> :execute 'wincmd k'<cr>

Use this Vim plugin: https://github.com/drmikehenry/vim-fixkey

Franky Spamschleuder

unread,
Jun 20, 2017, 7:42:36 AM6/20/17
to Suraj N. Kurapati, 'Franky Spamschleuder' via tmux-users, Nicholas Marriott
Hi Suraj,

thanks for your suggestion, but this script does also not help. If I have time the next days I think I will try some playing around again.

Regards Frank

Franky Spamschleuder

unread,
Jun 21, 2017, 12:43:54 AM6/21/17
to Nicholas Marriott, tmux-users
Hi Nicholas,

so I got once again some time left to play around and figured out the following:
Alt keys does work  as usual, the problem that I have got ist with the alt key via tmux send-keyes. As I mentioned I used a script to switch inside vim panes and tmux panes with the same key combination.
When I'm inside vim and press alt Arrow key tmux triggers  a send-key command which is not recognized correctly anymore like in version 2.4. 


in .tmux.conf
bind -n M-Up    if "[ $(tmux display -p '#{pane_current_command}') = vim ]" "send-keys M-Up" "select-pane -U"
bind -n M-Down  if "[ $(tmux display -p '#{pane_current_command}') = vim ]" "send-keys M-Down" "select-pane -D"
bind -n M-Left  if "[ $(tmux display -p '#{pane_current_command}') = vim ]" "send-keys M-Left" "select-pane -L"
bind -n M-Right if "[ $(tmux display -p '#{pane_current_command}') = vim ]" "send-keys M-Right" "select-pane -R"

.vimrc

nnoremap <silent> <A-Up> :call TmuxMove('k')<cr>
noremap <silent> <A-Down> :call TmuxMove('j')<cr>
nnoremap <silent> <A-Left> :call TmuxMove('h')<cr>
nnoremap <silent> <A-Right> :call TmuxMove('l')<cr>

function! TmuxMove(direction)
let wnr = winnr()
silent! execute 'wincmd ' . a:direction
" If the winnr is still the same after we moved, it is the last pane
if wnr == winnr()
call system('tmux select-pane -' . tr(a:direction, 'hjkl', 'LDUR'))
end
endfunction


This script is similar to vim-tmux-navigator and was also noticed in issue 907 in the last comment. I hope this information may help you.

Regards Frank



Nicholas Marriott

unread,
Jun 22, 2017, 2:47:27 PM6/22/17
to Franky Spamschleuder, tmux-users
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.c 10 May 2017 10:46:59 -0000 1.41
+++ cmd-send-keys.c 22 Jun 2017 18:46:57 -0000
@@ -64,6 +64,8 @@ cmd_send_keys_inject(struct client *c, s
struct key_binding *bd, bd_find;

if (wp->mode == NULL || wp->mode->key_table == NULL) {
+ if (options_get_number(wp->window->options, "xterm-keys"))
+ key |= KEYC_XTERM;
window_pane_key(wp, NULL, s, key, NULL);
return;
}
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.c 12 Jun 2017 07:04:24 -0000 1.61
+++ input-keys.c 22 Jun 2017 18:46:57 -0000
@@ -177,7 +177,7 @@ input_key(struct window_pane *wp, key_co
* If this is a normal 7-bit key, just send it, with a leading escape
* if necessary. If it is a UTF-8 key, split it and send it.
*/
- justkey = (key & ~KEYC_ESCAPE);
+ justkey = (key & ~(KEYC_XTERM|KEYC_ESCAPE));
if (justkey <= 0x7f) {
if (key & KEYC_ESCAPE)
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.c 4 Jun 2017 09:02:36 -0000 1.198
+++ window.c 22 Jun 2017 18:46:57 -0000
@@ -1226,7 +1226,7 @@ window_pane_key(struct window_pane *wp,
if (wp->mode != NULL) {
wp->modelast = time(NULL);
if (wp->mode->key != NULL)
- wp->mode->key(wp, c, s, key, m);
+ wp->mode->key(wp, c, s, (key & ~KEYC_XTERM), m);
return;
}





On Wed, Jun 21, 2017 at 06:43:52AM +0200, Franky Spamschleuder wrote:
> Hi Nicholas,
> so I got once again some time left to play around and figured out the
> following:
> Alt keys does work A as usual, the problem that I have got ist with the
> alt key via tmux send-keyes. As I mentioned I used a script to switch
> inside vim panes and tmux panes with the same key combination.
> When I'm inside vim and press alt Arrow key tmux triggers A a send-key
> command which is not recognized correctly anymore like in version 2.4.A
> in .tmux.conf
> bind -n M-Up A A if "[ $(tmux display -p '#{pane_current_command}') = vim
> ]" "send-keys M-Up" "select-pane -U"
> bind -n M-Down A if "[ $(tmux display -p '#{pane_current_command}') = vim
> ]" "send-keys M-Down" "select-pane -D"
> bind -n M-Left A if "[ $(tmux display -p '#{pane_current_command}') = vim
> ]" "send-keys M-Left" "select-pane -L"
> bind -n M-Right if "[ $(tmux display -p '#{pane_current_command}') = vim
> ]" "send-keys M-Right" "select-pane -R"
> .vimrc
> nnoremap <silent> <A-Up> :call TmuxMove('k')<cr>
> noremap <silent> <A-Down> :call TmuxMove('j')<cr>
> nnoremap <silent> <A-Left> :call TmuxMove('h')<cr>
> nnoremap <silent> <A-Right> :call TmuxMove('l')<cr>
> function! TmuxMove(direction)
> let wnr = winnr()
> silent! execute 'wincmd ' . a:direction
> " If the winnr is still the same after we moved, it is the last pane
> if wnr == winnr()
> call system('tmux select-pane -' . tr(a:direction, 'hjkl', 'LDUR'))
> end
> endfunction
> This script is similar toA vim-tmux-navigator and was also noticed in
> issue 907 in the last comment. I hope this information may help you.
> Regards Frank
> 2017-05-31 12:37 GMT+02:00 Nicholas Marriott
> <nicholas...@gmail.com>:
>
> tmux uses xterm style escape sequences by default now for meta + arrows,
> you will probably need to tell vim how to understand them.
>
> If it doesn't get them from TERM=tmux then you will need to configure it
> some other way, ask the vim developers?
>
> On Wed, May 31, 2017 at 11:50:55AM +0200, Franky Spamschleuder wrote:
> >A A Hi Nicholas,
> >A A so I tried export term=tmux; vimA
> >A A and test it again but it doesen't work. echo &term inside vim
> shoes tmux
> >A A so it should set be A correct.
> >A A Regards Frank
> >A A 2017-05-31 10:46 GMT+02:00 Nicholas Marriott
> >A A <nicholas...@gmail.com>:
> >
> >A A A You will need to configure vim to recognise what tmux sends
> for these
> >A A A keys. Setting TERM=tmux inside may do this, or you may need to
> tell it
> >A A A explicitly.
> >
> >A A A On Wed, May 31, 2017 at 10:29:26AM +0200, Franky Spamschleuder
> wrote:
> >A A A >AA AA echo $TERM
> >A A A >AA AA screen-256color
> >A A A >AA AA 2017-05-31 10:26 GMT+02:00 Nicholas Marriott
> >A A A >AA AA <nicholas...@gmail.com>:
> >A A A >
> >A A A >AA AA AA Do you have TERM=tmux inside tmux or TERM=screen?
> >A A A >
> >A A A >AA AA AA On Wed, May 31, 2017 at 10:17:57AM +0200, Franky
> Spamschleuder
> >A A A wrote:
> >A A A >AA AA AA >AAA AAA the Alt mappings do not work in vim
> running inside
> >A A A tmux
> >A A A >AA AA AA >AAA AAA just try the following:
> >A A A >AA AA AA >AAA AAA put these to your vim config:
> >A A A >AA AA AA >AAA AAA nnoremap <silent> <A-Up> AAAA A
> :execute 'wincmd A
> >A A A k'<cr>
> >A A A >AA AA AA >AAA AAA nnoremap <silent> <A-Down> A :execute
> 'wincmd j'<cr>
> >A A A >AA AA AA >AAA AAA nnoremap <silent> <A-Left> A :execute
> 'wincmd h'<cr>
> >A A A >AA AA AA >AAA AAA nnoremap <silent> <A-Right> :execute
> 'wincmd l'<cr>
> >A A A >AA AA AA >AAA AAA run vim, do a split and try to switch
> with these
> >A A A bindings through
> >A A A >AA AA AA the
> >A A A >AA AA AA >AAA AAA windows
> >A A A >AA AA AA >AAA AAA 2017-05-31 10:11 GMT+02:00 Nicholas
> Marriott
> >A A A >AA AA AA >AAA AAA <nicholas...@gmail.com>:
> >A A A >AA AA AA >
> >A A A >AA AA AA >AAA AAA AAA Are you saying the keys don't
> work in tmux
> >A A A itself, or just in
> >A A A >AA AA AA vim inside
> >A A A >AA AA AA >AAA AAA AAA tmux?
> >A A A >AA AA AA >
> >A A A >AA AA AA >AAA AAA AAA On Wed, May 31, 2017 at
> 10:06:33AM +0200, Franky
> >A A A Spamschleuder
> >A A A >AA AA AA wrote:
> >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA konsole 17.04.1
> >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA 2017-05-31 10:04
> GMT+02:00 Nicholas
> >A A A Marriott
> >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA
> <nicholas...@gmail.com>:
> >A A A >AA AA AA >AAA AAA AAA >
> >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA What terminal?
> >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA On 31 May 2017
> 9:02 am, "'Franky
> >A A A Spamschleuder'
> >A A A >AA AA AA via
> >A A A >AA AA AA >AAA AAA AAA tmux-users"
> >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA
> <tmux-...@googlegroups.com>
> >A A A wrote:
> >A A A >AA AA AA >AAA AAA AAA >
> >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA AAAA Hi
> there,
> >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA AAAA I use
> alt arrow keys to
> >A A A navigate inside
> >A A A >AA AA AA windows in vim and
> >A A A >AA AA AA >AAA AAA AAA the tmux
> >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA AAAA panes.
> Since I updated to
> >A A A tmux 2.5 this does
> >A A A >AA AA AA not work
> >A A A >AA AA AA >AAA AAA AAA anymore.
> >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA AAAA Has it
> sth. to the with the
> >A A A Issue #907
> >A A A >AA AA AA mentioned in the
> >A A A >AA AA AA >AAA AAA AAA changelog? How
> >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA AAAA can I
> fix this problem?
> >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA AAAA Thank
> you
> >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA AAAA Frank
> >A A A >AA AA AA >AAA AAA AAA >
> >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA AAAA --
> >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA AAAA You
> received this message
> >A A A because you are
> >A A A >AA AA AA subscribed to the
> >A A A >AA AA AA >AAA AAA AAA Google
> >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA AAAA Groups
> "tmux-users" group.
> >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA AAAA To
> unsubscribe from this
> >A A A group and stop
> >A A A >AA AA AA receiving emails
> >A A A >AA AA AA >AAA AAA AAA from it, send
> >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA AAAA an email
> to
> >A A A >AA AA AA tmux-users+...@googlegroups.com.
> >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA AAAA To post
> to this group, send
> >A A A email to
> >A A A >AA AA AA >AAA AAA AAA tmux-...@googlegroups.com.
> >A A A >AA AA AA >AAA AAA AAA >AAAA AAAA AAAA AAAA For more
> options, visit
> >A A A >AA AA AA https://groups.google.com/d/optout.

Franky Spamschleuder

unread,
Jun 28, 2017, 12:15:16 AM6/28/17
to Nicholas Marriott, tmux-users
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


>      >A  A  A  >AA  AA  AA  tmux-users+unsubscribe@googlegroups.com.

Nicholas Marriott

unread,
Jun 28, 2017, 3:24:12 AM6/28/17
to Franky Spamschleuder, tmux-users
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
> <nicholas...@gmail.com>:
>
> 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 <nicholas...@gmail.com>:
> >
> >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 <nicholas...@gmail.com>:
> >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 <nicholas...@gmail.com>:
> >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
> <nicholas...@gmail.com>:
> >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 <nicholas...@gmail.com>:
> >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 <tmux-...@googlegroups.com>
> >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
> tmux-users+...@googlegroups.com.
> >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
> tmux-...@googlegroups.com.
> >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.

Franky Spamschleuder

unread,
Jun 28, 2017, 7:30:33 AM6/28/17
to Nicholas Marriott, tmux-users
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

Nicholas Marriott

unread,
Jun 28, 2017, 10:40:43 AM6/28/17
to Franky Spamschleuder, tmux-users

Great, applied now, thanks!



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