Function key shortcuts in PuTTY/MinTTY and Tmux/Byobu
As a long-time lurker on Stack Exchange, I've found answers to most of my problems without needing to so much as make an account. But today I'm completely stumped with this issue, so I'm reaching out for help.
I've recently discovered Byobu, a frontend for Tmux which uses the Fn keys for common tasks. It's a real blessing for multitasking through SSH to a remote linux server from the Windows PC I have to use at work.
Currently, I'm using gnome-terminal through an SSH tunnel because both PuTTY and MinTTY (the default terminal with Cygwin) seem to send the wrong key codes for the function keys.
I was wondering if there was a way to re-map certain escape codes so at least one of my windows-based terminals can work properly with Tmux. (I guess I could just learn the Ctrl+b/Ctrl+a key combinations, but performing a key combination followed by another key doesn't really strike me as ergonomic.)
In PuTTY, setting Terminal>Keyboard>"The Function keys and keypad" to "XtermR6" seems to push the correct escape sequences for the Fn keys normally, but the Shift and Ctrl modifiers are broken. I can use vim to figure out what codes are being sent by each terminal. Meanwhile, I think I might have looked up the combination tmux is looking for in its source code, but I'm not sure:
Key Tmux Expects Gnome-Terminal PuTTY MinTTY
Normal F3: ^[0R ^[0R ^[0R
Ctrl+F3 "33[13^" ^[01;5R ^[0R ^[[1;5R
Shift+F3 "33[13$" ^[01;2R ^[[25~ ^[[1;2R
Ctrl+Shift+F3 "33[13@" ^[01;6R ^[[25~ ^[[1;6R
So far, MinTTY looks like the best candidate, but it gives me an entirely different problem where byobu ignores 95% of Fn key presses, passing them directly to the client application. I can run cat -v and spam the F2 (new window) key, and it'll print out "^[0Q" four or five times before suddenly spawning a new window.
If anyone has advice, it would be welcome. Most of the stuff I found on the internet said to change the terminal type, but I've tried literally every combination each of the two programs offer.
Thanks!
ssh putty tmux byobu mintty
add a comment |
As a long-time lurker on Stack Exchange, I've found answers to most of my problems without needing to so much as make an account. But today I'm completely stumped with this issue, so I'm reaching out for help.
I've recently discovered Byobu, a frontend for Tmux which uses the Fn keys for common tasks. It's a real blessing for multitasking through SSH to a remote linux server from the Windows PC I have to use at work.
Currently, I'm using gnome-terminal through an SSH tunnel because both PuTTY and MinTTY (the default terminal with Cygwin) seem to send the wrong key codes for the function keys.
I was wondering if there was a way to re-map certain escape codes so at least one of my windows-based terminals can work properly with Tmux. (I guess I could just learn the Ctrl+b/Ctrl+a key combinations, but performing a key combination followed by another key doesn't really strike me as ergonomic.)
In PuTTY, setting Terminal>Keyboard>"The Function keys and keypad" to "XtermR6" seems to push the correct escape sequences for the Fn keys normally, but the Shift and Ctrl modifiers are broken. I can use vim to figure out what codes are being sent by each terminal. Meanwhile, I think I might have looked up the combination tmux is looking for in its source code, but I'm not sure:
Key Tmux Expects Gnome-Terminal PuTTY MinTTY
Normal F3: ^[0R ^[0R ^[0R
Ctrl+F3 "33[13^" ^[01;5R ^[0R ^[[1;5R
Shift+F3 "33[13$" ^[01;2R ^[[25~ ^[[1;2R
Ctrl+Shift+F3 "33[13@" ^[01;6R ^[[25~ ^[[1;6R
So far, MinTTY looks like the best candidate, but it gives me an entirely different problem where byobu ignores 95% of Fn key presses, passing them directly to the client application. I can run cat -v and spam the F2 (new window) key, and it'll print out "^[0Q" four or five times before suddenly spawning a new window.
If anyone has advice, it would be welcome. Most of the stuff I found on the internet said to change the terminal type, but I've tried literally every combination each of the two programs offer.
Thanks!
ssh putty tmux byobu mintty
3
The sequences you list for tmux are just the rxvt-style modified-key sequences that it recognizes. tmux also recognizes the (unmodified) sequence specified by TERM’s terminfo entry (e.g.kf3
from whatever TERM you are using when attaching to tmux) as well as the xterm-style modified-key sequences fromxterm-keys.c
. So, the sequences that you report from Gnome-Terminal and MinTTY (although the escape+zeros in your sequences should be escape+letter-ohs (a.k.a. SS3) should be recognized by tmux, but it will only pass them through if you have thexterm-keys
option enabled.
– Chris Johnsen
Sep 29 '13 at 3:54
add a comment |
As a long-time lurker on Stack Exchange, I've found answers to most of my problems without needing to so much as make an account. But today I'm completely stumped with this issue, so I'm reaching out for help.
I've recently discovered Byobu, a frontend for Tmux which uses the Fn keys for common tasks. It's a real blessing for multitasking through SSH to a remote linux server from the Windows PC I have to use at work.
Currently, I'm using gnome-terminal through an SSH tunnel because both PuTTY and MinTTY (the default terminal with Cygwin) seem to send the wrong key codes for the function keys.
I was wondering if there was a way to re-map certain escape codes so at least one of my windows-based terminals can work properly with Tmux. (I guess I could just learn the Ctrl+b/Ctrl+a key combinations, but performing a key combination followed by another key doesn't really strike me as ergonomic.)
In PuTTY, setting Terminal>Keyboard>"The Function keys and keypad" to "XtermR6" seems to push the correct escape sequences for the Fn keys normally, but the Shift and Ctrl modifiers are broken. I can use vim to figure out what codes are being sent by each terminal. Meanwhile, I think I might have looked up the combination tmux is looking for in its source code, but I'm not sure:
Key Tmux Expects Gnome-Terminal PuTTY MinTTY
Normal F3: ^[0R ^[0R ^[0R
Ctrl+F3 "33[13^" ^[01;5R ^[0R ^[[1;5R
Shift+F3 "33[13$" ^[01;2R ^[[25~ ^[[1;2R
Ctrl+Shift+F3 "33[13@" ^[01;6R ^[[25~ ^[[1;6R
So far, MinTTY looks like the best candidate, but it gives me an entirely different problem where byobu ignores 95% of Fn key presses, passing them directly to the client application. I can run cat -v and spam the F2 (new window) key, and it'll print out "^[0Q" four or five times before suddenly spawning a new window.
If anyone has advice, it would be welcome. Most of the stuff I found on the internet said to change the terminal type, but I've tried literally every combination each of the two programs offer.
Thanks!
ssh putty tmux byobu mintty
As a long-time lurker on Stack Exchange, I've found answers to most of my problems without needing to so much as make an account. But today I'm completely stumped with this issue, so I'm reaching out for help.
I've recently discovered Byobu, a frontend for Tmux which uses the Fn keys for common tasks. It's a real blessing for multitasking through SSH to a remote linux server from the Windows PC I have to use at work.
Currently, I'm using gnome-terminal through an SSH tunnel because both PuTTY and MinTTY (the default terminal with Cygwin) seem to send the wrong key codes for the function keys.
I was wondering if there was a way to re-map certain escape codes so at least one of my windows-based terminals can work properly with Tmux. (I guess I could just learn the Ctrl+b/Ctrl+a key combinations, but performing a key combination followed by another key doesn't really strike me as ergonomic.)
In PuTTY, setting Terminal>Keyboard>"The Function keys and keypad" to "XtermR6" seems to push the correct escape sequences for the Fn keys normally, but the Shift and Ctrl modifiers are broken. I can use vim to figure out what codes are being sent by each terminal. Meanwhile, I think I might have looked up the combination tmux is looking for in its source code, but I'm not sure:
Key Tmux Expects Gnome-Terminal PuTTY MinTTY
Normal F3: ^[0R ^[0R ^[0R
Ctrl+F3 "33[13^" ^[01;5R ^[0R ^[[1;5R
Shift+F3 "33[13$" ^[01;2R ^[[25~ ^[[1;2R
Ctrl+Shift+F3 "33[13@" ^[01;6R ^[[25~ ^[[1;6R
So far, MinTTY looks like the best candidate, but it gives me an entirely different problem where byobu ignores 95% of Fn key presses, passing them directly to the client application. I can run cat -v and spam the F2 (new window) key, and it'll print out "^[0Q" four or five times before suddenly spawning a new window.
If anyone has advice, it would be welcome. Most of the stuff I found on the internet said to change the terminal type, but I've tried literally every combination each of the two programs offer.
Thanks!
ssh putty tmux byobu mintty
ssh putty tmux byobu mintty
asked Sep 28 '13 at 5:51
Karl JohnsonKarl Johnson
9113
9113
3
The sequences you list for tmux are just the rxvt-style modified-key sequences that it recognizes. tmux also recognizes the (unmodified) sequence specified by TERM’s terminfo entry (e.g.kf3
from whatever TERM you are using when attaching to tmux) as well as the xterm-style modified-key sequences fromxterm-keys.c
. So, the sequences that you report from Gnome-Terminal and MinTTY (although the escape+zeros in your sequences should be escape+letter-ohs (a.k.a. SS3) should be recognized by tmux, but it will only pass them through if you have thexterm-keys
option enabled.
– Chris Johnsen
Sep 29 '13 at 3:54
add a comment |
3
The sequences you list for tmux are just the rxvt-style modified-key sequences that it recognizes. tmux also recognizes the (unmodified) sequence specified by TERM’s terminfo entry (e.g.kf3
from whatever TERM you are using when attaching to tmux) as well as the xterm-style modified-key sequences fromxterm-keys.c
. So, the sequences that you report from Gnome-Terminal and MinTTY (although the escape+zeros in your sequences should be escape+letter-ohs (a.k.a. SS3) should be recognized by tmux, but it will only pass them through if you have thexterm-keys
option enabled.
– Chris Johnsen
Sep 29 '13 at 3:54
3
3
The sequences you list for tmux are just the rxvt-style modified-key sequences that it recognizes. tmux also recognizes the (unmodified) sequence specified by TERM’s terminfo entry (e.g.
kf3
from whatever TERM you are using when attaching to tmux) as well as the xterm-style modified-key sequences from xterm-keys.c
. So, the sequences that you report from Gnome-Terminal and MinTTY (although the escape+zeros in your sequences should be escape+letter-ohs (a.k.a. SS3) should be recognized by tmux, but it will only pass them through if you have the xterm-keys
option enabled.– Chris Johnsen
Sep 29 '13 at 3:54
The sequences you list for tmux are just the rxvt-style modified-key sequences that it recognizes. tmux also recognizes the (unmodified) sequence specified by TERM’s terminfo entry (e.g.
kf3
from whatever TERM you are using when attaching to tmux) as well as the xterm-style modified-key sequences from xterm-keys.c
. So, the sequences that you report from Gnome-Terminal and MinTTY (although the escape+zeros in your sequences should be escape+letter-ohs (a.k.a. SS3) should be recognized by tmux, but it will only pass them through if you have the xterm-keys
option enabled.– Chris Johnsen
Sep 29 '13 at 3:54
add a comment |
2 Answers
2
active
oldest
votes
I have had a similar trouble with PuTTY and screen (I couldn't use Ctrl modifier). The solution I've found was KiTTY - the fork of PuTTY, which is better maintained (last update from 2015/06/02 22:02). My problem with Ctrl key has gone.
By default, Kitty uses Fn keys for its own shortcuts, but you can configure it other way, so Fn keypresses will be sent to your application.
add a comment |
I use BYOBU myself in the same manner. I just use cygwin these days as F2,3,4 and F6 just work for me and those are the only ones I'm really concerned about. However, when I was using putty, I had the most success with 'The Function keys and keypad' setting set to emulate VT100+
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f651427%2ffunction-key-shortcuts-in-putty-mintty-and-tmux-byobu%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I have had a similar trouble with PuTTY and screen (I couldn't use Ctrl modifier). The solution I've found was KiTTY - the fork of PuTTY, which is better maintained (last update from 2015/06/02 22:02). My problem with Ctrl key has gone.
By default, Kitty uses Fn keys for its own shortcuts, but you can configure it other way, so Fn keypresses will be sent to your application.
add a comment |
I have had a similar trouble with PuTTY and screen (I couldn't use Ctrl modifier). The solution I've found was KiTTY - the fork of PuTTY, which is better maintained (last update from 2015/06/02 22:02). My problem with Ctrl key has gone.
By default, Kitty uses Fn keys for its own shortcuts, but you can configure it other way, so Fn keypresses will be sent to your application.
add a comment |
I have had a similar trouble with PuTTY and screen (I couldn't use Ctrl modifier). The solution I've found was KiTTY - the fork of PuTTY, which is better maintained (last update from 2015/06/02 22:02). My problem with Ctrl key has gone.
By default, Kitty uses Fn keys for its own shortcuts, but you can configure it other way, so Fn keypresses will be sent to your application.
I have had a similar trouble with PuTTY and screen (I couldn't use Ctrl modifier). The solution I've found was KiTTY - the fork of PuTTY, which is better maintained (last update from 2015/06/02 22:02). My problem with Ctrl key has gone.
By default, Kitty uses Fn keys for its own shortcuts, but you can configure it other way, so Fn keypresses will be sent to your application.
edited Mar 20 '17 at 10:17
Community♦
1
1
answered Jun 22 '15 at 9:40
hookehooke
1167
1167
add a comment |
add a comment |
I use BYOBU myself in the same manner. I just use cygwin these days as F2,3,4 and F6 just work for me and those are the only ones I'm really concerned about. However, when I was using putty, I had the most success with 'The Function keys and keypad' setting set to emulate VT100+
add a comment |
I use BYOBU myself in the same manner. I just use cygwin these days as F2,3,4 and F6 just work for me and those are the only ones I'm really concerned about. However, when I was using putty, I had the most success with 'The Function keys and keypad' setting set to emulate VT100+
add a comment |
I use BYOBU myself in the same manner. I just use cygwin these days as F2,3,4 and F6 just work for me and those are the only ones I'm really concerned about. However, when I was using putty, I had the most success with 'The Function keys and keypad' setting set to emulate VT100+
I use BYOBU myself in the same manner. I just use cygwin these days as F2,3,4 and F6 just work for me and those are the only ones I'm really concerned about. However, when I was using putty, I had the most success with 'The Function keys and keypad' setting set to emulate VT100+
edited May 5 '15 at 14:17
answered May 4 '15 at 20:25
smokes2345smokes2345
25017
25017
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f651427%2ffunction-key-shortcuts-in-putty-mintty-and-tmux-byobu%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
3
The sequences you list for tmux are just the rxvt-style modified-key sequences that it recognizes. tmux also recognizes the (unmodified) sequence specified by TERM’s terminfo entry (e.g.
kf3
from whatever TERM you are using when attaching to tmux) as well as the xterm-style modified-key sequences fromxterm-keys.c
. So, the sequences that you report from Gnome-Terminal and MinTTY (although the escape+zeros in your sequences should be escape+letter-ohs (a.k.a. SS3) should be recognized by tmux, but it will only pass them through if you have thexterm-keys
option enabled.– Chris Johnsen
Sep 29 '13 at 3:54