bind-key question
Hi, I'm on OSX with XQuartz and have been using happilily screen for years, but I'm currently giving tmux a try and have been porting my screenrc to my .tmux.conf. However, I'm having trouble with two lines in particular... I have the two lines below in my .screenrc with translate to Alt-Shift-Left and Alt-Shift-Right bindkey "^[O10C" next bindkey "^[O10C" prev This is because OSX/XQuartz play by their own rules with respect to modier keys in combination with the arrow keys, so to make this work in screen I could simply feed the output of pressing Alt-Shift-Right in xev ( ^[O10D ) and Alt-Shift-Left ( ^[O10C ) Unfortunately qhen I try the same in my .tmux.conf unbind M-Left bind-key -n ^[O10C previous-window unbind M-Right bind-key -n ^[O10D next It doesn't work. So my question is, what's the analogous tmux configuration to screen's bindkey "^[O10C" next. Incidentally, bind-key -n Alt-Shift-Left or Alt-Shift-Right does not work Thanks for any help received, Stevo -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev___ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users
Re: bind-key question
On Mon, Nov 22, 2010 at 8:21 PM, Nicholas Marriott < nicholas.marri...@gmail.com> wrote: > Try eg: > > set -g terminal-overrides "xterm*:kLFT4=\eO10C:kRIT4=\eO10D" > Thank you that worked for me. This now leaves no reason preventing my switch to tmux. I love the panes. Is there anywhere the kLFT4 , kRIT4 mappings are documented? in case I want to map other keys to functions. I'm already thinking about key combos to switch panes... Thanks for your help Stevo > > Then bind M-S-Left. > > On Mon, Nov 22, 2010 at 03:45:24PM +, Steve mailinglists wrote: > >Hi, > >I'm on OSX with XQuartz and have been using happilily screen for > years, > >but I'm currently giving tmux a try and have been porting my screenrc > to > >my .tmux.conf. > >However, I'm having trouble with two lines in particular... I have the > two > >lines below in my .screenrc with translate to Alt-Shift-Left and > >Alt-Shift-Right > >bindkey "^[O10C" next > >bindkey "^[O10C" prev > >This is because OSX/XQuartz play by their own rules with respect to > modier > >keys in combination with the arrow keys, so to make this work in > screen I > >could simply feed the output of > >pressing Alt-Shift-Right in xev ( ^[O10D ) and Alt-Shift-Left ( ^[O10C > ) > >Unfortunately qhen I try the same in my .tmux.conf > >unbind M-Left > >bind-key -n ^[O10C previous-window > >unbind M-Right > >bind-key -n ^[O10D next > >It doesn't work. So my question is, what's the analogous tmux > >configuration to screen's > >bindkey "^[O10C" next. > >Incidentally, > >bind-key -n Alt-Shift-Left or Alt-Shift-Right does not work > >Thanks for any help received, > >Stevo > > > > -- > > Beautiful is writing same markup. Internet Explorer 9 supports > > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > > Spend less time writing and rewriting code and more time creating great > > experiences on the web. Be a part of the beta today > > http://p.sf.net/sfu/msIE9-sfdev2dev > > > ___ > > tmux-users mailing list > > tmux-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/tmux-users > > -- Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev___ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users
Re: bind-key question
On Wed, Nov 24, 2010 at 12:32 AM, Ben Boeckel wrote: > Steve mailinglists wrote: > >> Try eg: > >> > >> set -g terminal-overrides "xterm*:kLFT4=\eO10C:kRIT4=\eO10D" > >> > > > > Thank you that worked for me. This now leaves no reason preventing my > switch > > to tmux. I love the panes. > > Is there anywhere the kLFT4 , kRIT4 mappings are documented? > > Probably within the bowels of the specs for terminals of yore. To get > the control sequences, I use C-v in Insert mode to make the next > sequence "verbatim" and that's what the key sends the terminal. Swap the > '^[' for '\e' if it appears. > I've been grepping around and found some mappings documented in a python terminfo module installed on my system. I think I can work out what I need to from there. > > > in case I want > > to map other keys to functions. I'm already thinking about key combos to > > switch panes... > > I've found that C-s works well if you have C-a as your prefix. > Ahh :-) I'm an emacs person I'm afraid; the C-a drives me nuts (beginning of line). One of the reasons I'm drawn to tmux t.b.h is the slight emacs accent to the default key bindings. Stevo > > --Ben > > > > -- > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > ___ > tmux-users mailing list > tmux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tmux-users > -- Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev___ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users
Re: bind-key question
On Mon, Nov 22, 2010 at 8:21 PM, Nicholas Marriott < nicholas.marri...@gmail.com> wrote: > Try eg: > > set -g terminal-overrides "xterm*:kLFT4=\eO10C:kRIT4=\eO10D" My bubble has been burst. Whilst the terminal-overides trick did indeed work in allowing my custom shortcuts to work, I've just discovered they don't work if I'm using less, or vim or even emacs :-( Are there any other settings I can try perhaps? I'd genuinely like to make the switch to tmux (I want the panes; and the buffers too...) Thanks, Stevo > > Then bind M-S-Left. > > On Mon, Nov 22, 2010 at 03:45:24PM +, Steve mailinglists wrote: > >Hi, > >I'm on OSX with XQuartz and have been using happilily screen for > years, > >but I'm currently giving tmux a try and have been porting my screenrc > to > >my .tmux.conf. > >However, I'm having trouble with two lines in particular... I have the > two > >lines below in my .screenrc with translate to Alt-Shift-Left and > >Alt-Shift-Right > >bindkey "^[O10C" next > >bindkey "^[O10C" prev > >This is because OSX/XQuartz play by their own rules with respect to > modier > >keys in combination with the arrow keys, so to make this work in > screen I > >could simply feed the output of > >pressing Alt-Shift-Right in xev ( ^[O10D ) and Alt-Shift-Left ( ^[O10C > ) > >Unfortunately qhen I try the same in my .tmux.conf > >unbind M-Left > >bind-key -n ^[O10C previous-window > >unbind M-Right > >bind-key -n ^[O10D next > >It doesn't work. So my question is, what's the analogous tmux > >configuration to screen's > >bindkey "^[O10C" next. > >Incidentally, > >bind-key -n Alt-Shift-Left or Alt-Shift-Right does not work > >Thanks for any help received, > >Stevo > > > > -- > > Beautiful is writing same markup. Internet Explorer 9 supports > > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > > Spend less time writing and rewriting code and more time creating great > > experiences on the web. Be a part of the beta today > > http://p.sf.net/sfu/msIE9-sfdev2dev > > > ___ > > tmux-users mailing list > > tmux-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/tmux-users > > -- Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev___ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users
Re: bind-key question
On Thu, Nov 25, 2010 at 1:19 AM, Nicholas Marriott < nicholas.marri...@gmail.com> wrote: > if you want tmux to pass those keys through to applications inside you > need to turn on the xterm-keys option and configure the applications to > recognise them > > there is no standard key format for any modifiers except meta and ctrl, > tmux only produces xterm-style keys (which do support shift and > shift+meta etc) with this option on and most applications still don't > recognise them > Just re-reading what you've said. I think we may have mis-understood each other. I think you may have believed I was asking how I could make an application receive a key combo passed-through by tmux and then have said application to act upon it accordingly? What I was having a problem with is the situation where I have several windows in a tmux session. I then use less to open a file, and whilst the file is in the open state I cannot use the tmux kind-binding I have set for next-window or previous-window. My sequence of events is tmux new-window new-window new-window less ~/.bashrc I then C-S-Left to go the previous-window - it does not work. I do not wish for less to interpret C-S-Left, I wish for tmux to interpret C-S-Left which I have bound to previous-window; but somehow having an application open blocks this. The key bindings function as expected when no applications are open in my terminal. Can this be worked around? Stevo > > > > On Wed, Nov 24, 2010 at 11:51:52PM +, Steve mailinglists wrote: > >On Mon, Nov 22, 2010 at 8:21 PM, Nicholas Marriott > ><[1]nicholas.marri...@gmail.com> wrote: > > > > Try eg: > > > > set -g terminal-overrides "xterm*:kLFT4=\eO10C:kRIT4=\eO10D" > > > >My bubble has been burst. Whilst the terminal-overides trick did > indeed > >work in allowing my custom shortcuts to work, I've just discovered > they > >don't work if I'm using less, or vim or even emacs :-( > >Are there any other settings I can try perhaps? I'd genuinely like to > make > >the switch to tmux (I want the panes; and the buffers too...) > >Thanks, > >Stevo > > > > Then bind M-S-Left. > > On Mon, Nov 22, 2010 at 03:45:24PM +, Steve mailinglists wrote: > > > Hi, > > > I'm on OSX with XQuartz and have been using happilily screen for > > years, > > > but I'm currently giving tmux a try and have been porting my > screenrc > > to > > > my .tmux.conf. > > > However, I'm having trouble with two lines in particular... I have > the > > two > > > lines below in my .screenrc with translate to Alt-Shift-Left and > > > Alt-Shift-Right > > > bindkey "^[O10C" next > > > bindkey "^[O10C" prev > > > This is because OSX/XQuartz play by their own rules with respect > to > > modier > > > keys in combination with the arrow keys, so to make this work in > > screen I > > > could simply feed the output of > > > pressing Alt-Shift-Right in xev ( ^[O10D ) and Alt-Shift-Left ( > ^[O10C > > ) > > > Unfortunately qhen I try the same in my .tmux.conf > > > unbind M-Left > > > bind-key -n ^[O10C previous-window > > > unbind M-Right > > > bind-key -n ^[O10D next > > > It doesn't work. So my question is, what's the analogous tmux > > > configuration to screen's > > > bindkey "^[O10C" next. > > > Incidentally, > > > bind-key -n Alt-Shift-Left or Alt-Shift-Right does not work > > > Thanks for any help received, > > > Stevo > > > > > > > > > -- > > > Beautiful is writing same markup. Internet Explorer 9 supports > > > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > > > Spend less time writing and rewriting code and more time creating > > great > > > experiences on the web. Be a part of the beta today > > > [2]http://p.sf.net/sfu/msIE9-sfdev2dev > > > > > ___ > > > tmux-users mailing list > > > [3]tmux-us...@lists.sourceforge.net > > > [4]https://lists.sourceforge.net/lists/listinfo/tmux-users > > > > References > > > >Visible links > >1. mailto:nicholas.marri.
Re: bind-key question
On Fri, Nov 26, 2010 at 6:23 PM, Nicholas Marriott < nicholas.marri...@gmail.com> wrote: > On Fri, Nov 26, 2010 at 02:41:16PM +0000, Steve mailinglists wrote: > >On Thu, Nov 25, 2010 at 1:19 AM, Nicholas Marriott > ><[1]nicholas.marri...@gmail.com> wrote: > > > > if you want tmux to pass those keys through to applications inside > you > > need to turn on the xterm-keys option and configure the applications > to > > recognise them > > > > there is no standard key format for any modifiers except meta and > ctrl, > > tmux only produces xterm-style keys (which do support shift and > > shift+meta etc) with this option on and most applications still > don't > > recognise them > > > >Just re-reading what you've said. I think we may have mis-understood > each > >other. I think you may have believed I was asking how I could make an > >application receive a key combo passed-through by tmux and then have > said > >application to act upon it accordingly? > > Yes that's what I thought. > > >What I was having a problem with is the situation where I have several > >windows in a tmux session. I then use less to open a file, and whilst > the > >file is in the open state I cannot use the tmux kind-binding I have > set > >for next-window or previous-window. > >My sequence of events is > >tmux > >new-window > >new-window > >new-window > >less ~/.bashrc > >I then C-S-Left to go the previous-window - it does not work. > >I do not wish for less to interpret C-S-Left, I wish for tmux to > interpret > >C-S-Left which I have bound to previous-window; but somehow having an > >application open blocks this. > >The key bindings function as expected when no applications are open in > my > >terminal. Can this be worked around? > > Hmm. This is very weird. tmux doesn't change anything when a program is > open. > > It sounds like your terminal emulator may be doing it. > > Do ctrl-shift-left and ctrl-shift-right generate the same outside tmux > if you run "tput smkx" first? > Hi, Thanks for replying and sorry for the delay in responding; I haven't had access to the machine for a few days. The answer to the question is that ctrl-shift-left and ctrl-shift-right do produce different output after I run "tput smkx" first. Is this a good or bad thing? Thanks, Stevo > > >Stevo > > > > On Wed, Nov 24, 2010 at 11:51:52PM +, Steve mailinglists wrote: > > > On Mon, Nov 22, 2010 at 8:21 PM, Nicholas Marriott > > > <[1][2]nicholas.marri...@gmail.com> wrote: > > > > > > Try eg: > > > > > > set -g terminal-overrides "xterm*:kLFT4=\eO10C:kRIT4=\eO10D" > > > > > > My bubble has been burst. Whilst the terminal-overides trick did > > indeed > > > work in allowing my custom shortcuts to work, I've just discovered > > they > > > don't work if I'm using less, or vim or even emacs :-( > > > Are there any other settings I can try perhaps? I'd genuinely like > to > > make > > > the switch to tmux (I want the panes; and the buffers too...) > > > Thanks, > > > Stevo > > > > > > Then bind M-S-Left. > > > On Mon, Nov 22, 2010 at 03:45:24PM +, Steve mailinglists > wrote: > > > > Hi, > > > > I'm on OSX with XQuartz and have been using happilily screen for > > > years, > > > > but I'm currently giving tmux a try and have been porting my > > screenrc > > > to > > > > my .tmux.conf. > > > > However, I'm having trouble with two lines in particular... I > have > > the > > > two > > > > lines below in my .screenrc with translate to Alt-Shift-Left and > > > > Alt-Shift-Right > > > > bindkey "^[O10C" next > > > > bindkey "^[O10C" prev > > > > This is because OSX/XQuartz play by their own rules with respect > to > > > modier > > > > keys in combination with the arrow keys, so to make this work in > > > screen I > > > > could simply feed the output of > > > > pressing Alt-Shift-Right in xev ( ^[O10D ) and Alt-Shift-Left ( > > ^[O
Re: bind-key question
On Mon, Nov 29, 2010 at 11:19 AM, Steve mailinglists wrote: > > > On Fri, Nov 26, 2010 at 6:23 PM, Nicholas Marriott < > nicholas.marri...@gmail.com> wrote: > >> On Fri, Nov 26, 2010 at 02:41:16PM +, Steve mailinglists wrote: >> >On Thu, Nov 25, 2010 at 1:19 AM, Nicholas Marriott >> ><[1]nicholas.marri...@gmail.com> wrote: >> > >> > if you want tmux to pass those keys through to applications inside >> you >> > need to turn on the xterm-keys option and configure the >> applications to >> > recognise them >> > >> > there is no standard key format for any modifiers except meta and >> ctrl, >> > tmux only produces xterm-style keys (which do support shift and >> > shift+meta etc) with this option on and most applications still >> don't >> > recognise them >> > >> >Just re-reading what you've said. I think we may have mis-understood >> each >> >other. I think you may have believed I was asking how I could make an >> >application receive a key combo passed-through by tmux and then have >> said >> >application to act upon it accordingly? >> >> Yes that's what I thought. >> >> >What I was having a problem with is the situation where I have >> several >> >windows in a tmux session. I then use less to open a file, and whilst >> the >> >file is in the open state I cannot use the tmux kind-binding I have >> set >> >for next-window or previous-window. >> >My sequence of events is >> >tmux >> >new-window >> >new-window >> >new-window >> >less ~/.bashrc >> >I then C-S-Left to go the previous-window - it does not work. >> >I do not wish for less to interpret C-S-Left, I wish for tmux to >> interpret >> >C-S-Left which I have bound to previous-window; but somehow having an >> >application open blocks this. >> >The key bindings function as expected when no applications are open >> in my >> >terminal. Can this be worked around? >> >> Hmm. This is very weird. tmux doesn't change anything when a program is >> open. >> >> It sounds like your terminal emulator may be doing it. >> >> Do ctrl-shift-left and ctrl-shift-right generate the same outside tmux >> if you run "tput smkx" first? >> > > Hi, > > Thanks for replying and sorry for the delay in responding; I haven't had > access to the machine for a few days. > > The answer to the question is that ctrl-shift-left and ctrl-shift-right do > produce different output after I run "tput smkx" first. > > Is this a good or bad thing? > Following on from this, I changed my terminal-overrides from from: set -g terminal-overrides "xterm*:kLFT4=\e[10D:kRIT4=\e[10C" to: set -g terminal-overrides "xterm*:kLFT4=\e[10D:kRIT4=\e[10C:smkx@:rmkx@" and all is now working as it should. Hope this thread is helpful to other mac users in the future. Perhaps this could even go in the FAQ Thanks, Stevo > > Thanks, > > Stevo > > > > >> >> >Stevo >> > >> > On Wed, Nov 24, 2010 at 11:51:52PM +, Steve mailinglists wrote: >> > > On Mon, Nov 22, 2010 at 8:21 PM, Nicholas Marriott >> > > <[1][2]nicholas.marri...@gmail.com> wrote: >> > > >> > > Try eg: >> > > >> > > set -g terminal-overrides "xterm*:kLFT4=\eO10C:kRIT4=\eO10D" >> > > >> > > My bubble has been burst. Whilst the terminal-overides trick did >> > indeed >> > > work in allowing my custom shortcuts to work, I've just >> discovered >> > they >> > > don't work if I'm using less, or vim or even emacs :-( >> > > Are there any other settings I can try perhaps? I'd genuinely >> like to >> > make >> > > the switch to tmux (I want the panes; and the buffers too...) >> > > Thanks, >> > > Stevo >> > > >> > > Then bind M-S-Left. >> > > On Mon, Nov 22, 2010 at 03:45:24PM +, Steve mailinglists >> wrote: >> > > > Hi, >> > > > I'm on OSX with XQuartz and have been using happilily screen >> for >> > > years, >> > > > but I'm currently gi
Re: bind-key question
On Mon, Nov 29, 2010 at 4:33 PM, Nicholas Marriott < nicholas.marri...@gmail.com> wrote: > You may find numeric keypad and/or numlock doesn't work as intended > without smkx but if you're happy with that then fine. > I don't have a numeric keypad :-) So this is an acceptable solution for me. Stevo > > > > On Mon, Nov 29, 2010 at 01:58:31PM +, Steve mailinglists wrote: > >On Mon, Nov 29, 2010 at 11:19 AM, Steve mailinglists > ><[1]stevo.li...@gmail.com> wrote: > > > > On Fri, Nov 26, 2010 at 6:23 PM, Nicholas Marriott > > <[2]nicholas.marri...@gmail.com> wrote: > > > >On Fri, Nov 26, 2010 at 02:41:16PM +, Steve mailinglists > wrote: > >> On Thu, Nov 25, 2010 at 1:19 AM, Nicholas Marriott > >> <[1][3]nicholas.marri...@gmail.com> wrote: > >> > >> if you want tmux to pass those keys through to applications > inside > >you > >> need to turn on the xterm-keys option and configure the > applications > >to > >> recognise them > >> > >> there is no standard key format for any modifiers except meta > and > >ctrl, > >> tmux only produces xterm-style keys (which do support shift and > >> shift+meta etc) with this option on and most applications still > >don't > >> recognise them > >> > >> Just re-reading what you've said. I think we may have > mis-understood > >each > >> other. I think you may have believed I was asking how I could > make > >an > >> application receive a key combo passed-through by tmux and then > have > >said > >> application to act upon it accordingly? > > > >Yes that's what I thought. > >> What I was having a problem with is the situation where I have > >several > >> windows in a tmux session. I then use less to open a file, and > >whilst the > >> file is in the open state I cannot use the tmux kind-binding I > have > >set > >> for next-window or previous-window. > >> My sequence of events is > >> tmux > >> new-window > >> new-window > >> new-window > >> less ~/.bashrc > >> I then C-S-Left to go the previous-window - it does not work. > >> I do not wish for less to interpret C-S-Left, I wish for tmux to > >interpret > >> C-S-Left which I have bound to previous-window; but somehow > having > >an > >> application open blocks this. > >> The key bindings function as expected when no applications are > open > >in my > >> terminal. Can this be worked around? > > > >Hmm. This is very weird. tmux doesn't change anything when a > program > >is > >open. > > > >It sounds like your terminal emulator may be doing it. > > > >Do ctrl-shift-left and ctrl-shift-right generate the same outside > tmux > >if you run "tput smkx" first? > > > > Hi, > > Thanks for replying and sorry for the delay in responding; I haven't > had > > access to the machine for a few days. > > The answer to the question is that ctrl-shift-left and > ctrl-shift-right > > do produce different output after I run "tput smkx" first. > > Is this a good or bad thing? > > > >Following on from this, I changed my terminal-overrides from > >from: > >set -g terminal-overrides "xterm*:kLFT4=\e[10D:kRIT4=\e[10C" > >to: > >set -g terminal-overrides "xterm*:kLFT4=\e[10D:kRIT4=\e[10C:smkx@ > :rmkx@" > >and all is now working as it should. > >Hope this thread is helpful to other mac users in the future. Perhaps > this > >could even go in the FAQ > >Thanks, > >Stevo > > > > Thanks, > > Stevo > > > >> Stevo > >> > >> On Wed, Nov 24, 2010 at 11:51:52PM +, Steve mailinglists > wrote: > >> > On Mon, Nov 22, 2010 at 8:21 PM, Nicholas Marriott > >> > <[1][2][4]nicholas.marri...@gmail.com> wrote: > >> > > >> > Try eg: &g