butterfly icon indicating copy to clipboard operation
butterfly copied to clipboard

Can't type space on iOS

Open CorcovadoMing opened this issue 8 years ago • 7 comments

I can't type space on my iPad (iOS 9.3.2) with external keyboard

CorcovadoMing avatar Jul 22 '16 02:07 CorcovadoMing

Me too, and only unsecured way can be used to see the terminal, I can't get SSL way working even if I installed ca and p12 key on the phone, I can only see a black screen. Everything is fine on PC.

shimaode avatar Dec 31 '16 04:12 shimaode

I fixed this issue by modify line 1634 of main.js from: if (!key) { to: if (!key && !(ev.keyCode==32 && navigator.platform=="iPad")) {

But I don't know how to modify the corresponding term.coffee, so I didn't commit a pull request. By the way, SSL is still not working on mobile devices.

shimaode avatar Jan 08 '17 12:01 shimaode

@shimaode I tried to modify main.js in official docker container located in butterfly/static/main.js and copy the butterfly/static/main.js to butterfly/static/main.min.js. It did change the behavior when I type space on iPad. However, it didn't correctly show up the space but undefined instead

CorcovadoMing avatar Jan 08 '17 13:01 CorcovadoMing

@shimaode I know nothing about coffeescript, but I assume it is related to https://github.com/paradoxxxzero/butterfly/blob/master/coffees/term.coffee#L1526

CorcovadoMing avatar Jan 08 '17 13:01 CorcovadoMing

@CorcovadoMing Sorry I made a mistake, my bad. I modified main.min.js directly and wrote the wrong version of corresponding main.js It should be       if (ev.keyCode==32 && navigator.platform=="iPad") key=" " else if (!key) {         return true;       }       this.showCursor();       this.send(key);       return cancel(ev);

shimaode avatar Jan 08 '17 14:01 shimaode

@CorcovadoMing, you are right, it is related to term.coffee. Have you got your ssl version of butterfly working on your iPad?

shimaode avatar Jan 08 '17 14:01 shimaode

@shimaode Sorry, I didn't use SSL. Instead, I used login username and password as in docker section in README

CorcovadoMing avatar Jan 08 '17 22:01 CorcovadoMing