Make terminal escape character configurable using environment #425

Closed
wants to merge 8 commits into
from

Projects

None yet

2 participants

@rinne
rinne commented May 16, 2013

variable MOSH_ESCAPE_KEY. Defaults to current Ctrl-^ which is
somewhat problematic for many non-US keyboards.

Signed-off-by: Timo J. Rinne tri@iki.fi

@rinne rinne Make terminal escape character configurable using environment
variable MOSH_ESCAPE_KEY. Defaults to current Ctrl-^ which is
somewhat problematic for many non-US keyboards.

Signed-off-by: Timo J. Rinne <tri@iki.fi>
5def55a
@rinne
rinne commented May 16, 2013

This one creates nasty conflict if merged with agent forwarding stuff. I can commit the merge patch also to for-keith branch, if Keith asks me to :).

@keithw

Can you please give tp and te a more descriptive name?

I did. Committed to this same branch.

@keithw

Do we really need the user to be able to set the escape sequence to be the letter "p" by itself or something? What if we just require it to be a control character (< 32)? Seems like that could simplify things.

Well, ssh default is tilde ~ which is ascii 126. I don't really see use case to use alphabets but I can see use case for ~ (that's what I use).

@keithw
Member
keithw commented May 16, 2013

This looks great. Let's do this one first because the agent-forwarding and OOB is going to take a while to review and merge. I left some comments -- can we just require the escape_key to be a control character? Seems like that would simplify this a lot. Otherwise lgtm.

rinne added some commits May 17, 2013
@rinne rinne Removed warning. f2032cf
@rinne rinne Variable names.
Signed-off-by: Timo J. Rinne <tri@iki.fi>
b1c5442
@rinne rinne If escape key is a printable character, require it to be immediately
after newline.  Also don't allow setting escape key to Ctrl-C, Ctrl-D,
Newline, or Carriage Return.

Signed-off-by: Timo J. Rinne <tri@iki.fi>
be94e6e
@rinne rinne Removed compilation warning generating always true comparison.
Signed-off-by: Timo J. Rinne <tri@iki.fi>
b1eb37f
@rinne rinne Elaborated the warning removal and made it still explicitly
check that the escape key character is less than 128.

Signed-off-by: Timo J. Rinne <tri@iki.fi>
e4d615d
@rinne rinne Invalid escape key defaults to Ctrl-^ but empty escape
key causes there being no escape key at all.

Signed-off-by: Timo J. Rinne <tri@iki.fi>
dce460f
@rinne rinne Set escape pass key correctly in default case.
Signed-off-by: Timo J. Rinne <tri@iki.fi>
daa6a2f
@keithw keithw added a commit that closed this pull request May 17, 2013
@rinne rinne mosh-client: Make terminal escape character configurable
Uses environment variable MOSH_ESCAPE_KEY. Defaults to current Ctrl-^
which is somewhat problematic for many non-US keyboards.

Signed-off-by: Timo J. Rinne <tri@iki.fi>

Closes #425. Closes #215.
f960a8b
@keithw keithw closed this in f960a8b May 17, 2013
@rinne rinne deleted the rinne:terminal-esc-for-keithw branch May 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment