Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipe should allow me to type all characters #748

Closed
paulbellamy opened this issue Dec 11, 2015 · 13 comments · Fixed by #817
Closed

Pipe should allow me to type all characters #748

paulbellamy opened this issue Dec 11, 2015 · 13 comments · Fixed by #817
Assignees
Milestone

Comments

@paulbellamy
Copy link
Contributor

On UK keyboards I have to use Right-Alt + 3 to type #. These don't seem to be sent.

It also seems that Ctrl + {arrow} keys are ignored.

Found in #650

@foot foot self-assigned this Dec 14, 2015
@tomwilkie tomwilkie added this to the 0.12.0 milestone Dec 14, 2015
@tomwilkie tomwilkie modified the milestones: 0.11.0, 0.12.0 Dec 14, 2015
@paulbellamy
Copy link
Contributor Author

Still fails handling most (possibly all?) UTF-8 characters (e.g. ì, ÷, §, etc...)

@paulbellamy paulbellamy reopened this Dec 14, 2015
@tomwilkie
Copy link
Contributor

ctrl-a (go to beginning of line) was also failing for me, although that
might have been fixed.

On Mon, Dec 14, 2015 at 4:33 PM, Paul Bellamy [email protected]
wrote:

Reopened #748 #748.


Reply to this email directly or view it on GitHub
#748 (comment).

@foot
Copy link
Contributor

foot commented Dec 14, 2015

Yep!

Working:

  • ctrl-a / ctrl-e
  • alt-3 -> # w/ a UK kb layout
  • alt-b / alt-f (emacs/readline alias for ctrl-leftarrow / ctrl-rightarrow)

Sort of working:

  • ctrl-n / ctrl-p (need to do them twice?!)
    • I have to do this even w/ a docker exec -ti alpine2 bash so it might not be something we cannot easily address.

Not working:

  • ctrl-leftarrow / ctrl-rightarrow
  • cating a file w/ unicode in it
  • typing in some unicode

@foot
Copy link
Contributor

foot commented Dec 14, 2015

We're getting latin-1 encoded stuff coming down the line?! (So says wireshark). I can hack around this in JS but it would be nice to get good old utf8!

Do you guys have encoding options when attaching/execing? I'm not sure which part of the system is doing the encoding.

@tomwilkie tomwilkie modified the milestones: 0.12.0, 0.11.0 Dec 16, 2015
@foot
Copy link
Contributor

foot commented Dec 17, 2015

Okay I got a bit confused there, we just weren't decoding it properly in the JS.

Happy days!

@paulbellamy
Copy link
Contributor Author

Unicode seems fixed, but re-opening as ctrl-arrow keys still don't work.

@paulbellamy paulbellamy reopened this Jan 6, 2016
@foot
Copy link
Contributor

foot commented Jan 6, 2016

I can get them going by faking a alt-falt-b, but term.js seems to do something funny w/ 5C/5D. I wonder if that will causes any issues w/ any apps. Might do. Will do a little more poking.

@foot
Copy link
Contributor

foot commented Jan 7, 2016

@paulbellamy does ctrl-arrow work when you do a

docker exec -ti alpine2 /bin/sh
?

It doesn't work for me under osx, but ppl say osx is not good at ctrl-arrow.

@paulbellamy
Copy link
Contributor Author

I was using docker exec -ti alpine2 /bin/sh, then running:

apk update --add zsh && zsh
$ a very long line

then using ctrl-arrow to navigate left-right, as I know how that acts in zsh (I'm less familiar with sh/bash).

It could very well be an osx issue.

@foot
Copy link
Contributor

foot commented Jan 11, 2016

@paulbellamy found a good little test, can you try this:

$ docker exec -ti myalpine /bin/sh
/ # zsh
fa07efbe3b94# cat > /dev/null

and then type:
left-arrow
right-arrow
ctrl-left-arrow
ctrl-right-arrow

I see:
^[[C^[[D^[OC^[OD

What do you see?

@paulbellamy
Copy link
Contributor Author

$ docker run --rm -ti --name alpine alpine /bin/sh
/ # apk add --update zsh
fetch http://dl-4.alpinelinux.org/alpine/v3.2/main/x86_64/APKINDEX.tar.gz
(1/3) Installing ncurses-terminfo-base (5.9-r3)
(2/3) Installing ncurses-widec-libs (5.9-r3)
(3/3) Installing zsh (5.0.7-r0)
Executing zsh-5.0.7-r0.post-install
Executing busybox-1.23.2-r0.trigger
OK: 14 MiB in 18 packages
/ # zsh
c4937b04363f# cat >/dev/null
^[[D^[[C^[[1;5D^[[1;5C

When doing an exec into the container from scope, I see:

/ # zsh                                                                                                              
c4937b04363f# cat >/dev/null                                                                                         
^[[D^[[C^[[5D^[[5C

@foot
Copy link
Contributor

foot commented Jan 11, 2016

Alpine

sh: (aka Busybox sh aka ash):

Can't figure out how to list bindings, but seems to understand at least: [1;5C and \ef.

Bash:

bash-4.3# bind -P|grep "^forward-word"                                                                               
forward-word can be found on "\ef".

zsh:

fa07efbe3b94# bindkey|grep "forward-word"                                                                            
"^[F" forward-word                                                                                                   
"^[f" forward-word

Ubuntu

sh:

Can't figure out how to list bindings, but doesn't seem to understand anything.

bash:

root@8e0bcc4e49be:/# bind -P|grep "^forward-word"                                                                    
forward-word can be found on "\M-\M-[C", "\M-[1;5C", "\M-[5C", "\M-f".                                               

zsh:

d9c1ec9ec56# bindkey|grep "forward-word"
"^[F" forward-word
"^[f" forward-word

Conclusion

m-f seems to be the safest bet and I can't really think of a case where it would be bad to fake it, but there might be one, second safest/most legit bet is seems to be 1;5C. Lets do that!

@foot
Copy link
Contributor

foot commented Jan 11, 2016

Seems like alpine might add more keybinding support soon https://bugs.alpinelinux.org/issues/4904 https://bugs.alpinelinux.org/issues/4904

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants