hterm on android and mobile devices?

232 views
Skip to first unread message

Will McGugan

unread,
Aug 15, 2017, 12:26:41 PM8/15/17
to chromium-hterm
Hi,

I'd love to get hterm working with keyboard input on android / OSX, but tapping on the terminal doesn't bring up the keyboard.

Should I expect the software keyboard to work, or is that just not supported?

Thanks in advance,

Will McGugan
--

Mike Frysinger

unread,
Aug 15, 2017, 1:19:27 PM8/15/17
to Will McGugan, chromium-hterm
what version are you using ?  the latest releases should pop up the virtual keyboard (or at least, they did last time i tested on my phone/tablet).
-mike

--
You received this message because you are subscribed to the Google Groups "chromium-hterm" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-hterm/0fb31038-5876-4f72-a1b8-358a431f14ba%40chromium.org.

Will McGugan

unread,
Aug 15, 2017, 1:40:05 PM8/15/17
to Mike Frysinger, chromium-hterm
I re-built the latest from git. Still no luck with the virtual keyboard.

Does it work for you with latest? 

Mike Frysinger

unread,
Aug 15, 2017, 1:59:10 PM8/15/17
to Will McGugan, chromium-hterm
just tried 1.69 and master and i get a virtual keyboard in my android/chrome browser
-mike

Will McGugan

unread,
Aug 15, 2017, 2:04:00 PM8/15/17
to Mike Frysinger, chromium-hterm
That's encouraging! Thanks.

Any suggestions how I may have broken the virtual keyboard? Our app is a fairly straight-forward embedded hterm.

Mike Frysinger

unread,
Aug 15, 2017, 2:19:40 PM8/15/17
to Will McGugan, chromium-hterm
https://hterm.org/ has a very simple integration that works for me you can compare against.  it's how i test things.
-mike

Brandon Gilmore

unread,
Aug 15, 2017, 2:23:53 PM8/15/17
to Mike Frysinger, Will McGugan, chromium-hterm
It's tough to use that integration to try/test anything given the following meta tag :-/

<meta http-equiv='refresh' content='5; url=https://chromium.googlesource.com/apps/libapps/' />

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-hterm+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-hterm/CAAbOSc%3Dx%2BDrEWfH3igafHH2RitCA2xQL9oNEHgRWfyvq380OQQ%40mail.gmail.com.

Mike Frysinger

unread,
Aug 15, 2017, 2:32:22 PM8/15/17
to Brandon Gilmore, Will McGugan, chromium-hterm
sure, but since Will is a hacker, i'm sure he can grab the index.html and resources and test things locally :)
-mike

Will McGugan

unread,
Aug 15, 2017, 2:45:52 PM8/15/17
to Mike Frysinger, Brandon Gilmore, chromium-hterm
So I can confirm with the code on hterm.org that the virtual keyboard does work. I'm guessing it must be some other JS on the page that breaks it. Or maybe CSS?

I can probably figure out what broke it by striping out code until it works.

Will McGugan

unread,
Aug 16, 2017, 6:48:21 AM8/16/17
to Mike Frysinger, Brandon Gilmore, chromium-hterm
I've gotten a little further in to debugging this one. Even after stripping away all but essential code the problem persists. When I inspect the hterm iframe the only difference is that the <x-screen> tag in our app is lacking a "contenteditable" attribute. If I patch that in, the virtual keyboard works.

I don't see anything in our code that might change that. Virtually all thats left is JQuery. Still debugging, but if anyone has any suggestions, please let me know!

Mike Frysinger

unread,
Aug 16, 2017, 11:15:26 AM8/16/17
to Will McGugan, Brandon Gilmore, chromium-hterm
correct, in order for the VK to show up, the x-screen element has to be contenteditable.  are you not using hterm to initialize things ?  it takes care of setting those attributes on the x-screen element.
-mike

Will McGugan

unread,
Aug 17, 2017, 8:11:12 AM8/17/17
to Mike Frysinger, Brandon Gilmore, chromium-hterm
I may have been working with an old version of hterm_all.js, although I could have sworn I re-built and copied it!

After re-building the latest htrem_all the keyboard does come up. But its not quite working in our app. After every keypress I get the following message in console.log:

    No definition for keyCode: 229

The keys appear, but don't invoke "onVTKeystroke". When I hit return, onVTKeystroke is called, but only with a newline character.

In case its relevant, the app I'm working on is essential a remote terminal (https://www.dataplicity.com). Any guidance would be appreciated. I'm a little stuck.

Mike Frysinger

unread,
Aug 17, 2017, 12:10:10 PM8/17/17
to Will McGugan, Brandon Gilmore, chromium-hterm
i don't have a Pi, so not sure i can test

to confirm, you're talking about the VK only right ?  if you use a normal keyboard, it works fine ?  VK support is probably alpha level atm ... we've done some basic tests, but i rarely use it, so rely on people to verify it :).
-mike

Will McGugan

unread,
Aug 17, 2017, 12:16:26 PM8/17/17
to Mike Frysinger, Brandon Gilmore, chromium-hterm
Yeah, just the virtual keyboard. Plugging an external keyboard in to a mobile device seems to work.

No problem if the support is not there yet. We do have a mobile app we can direct users to, VK on mobile would have been a nice-to-have.

If you do more work on VK, I'd be more than happy to test it out. Thanks for the help.

Mike Frysinger

unread,
Aug 17, 2017, 4:23:27 PM8/17/17
to Will McGugan, chromium-hterm
honestly, i don't have any immediate plans to do more VK work until it starts impacting people significantly on the CrOS side.  sorry.
-mike

me.ashis...@gmail.com

unread,
Mar 18, 2018, 2:31:38 AM3/18/18
to chromium-hterm, vap...@chromium.org, va...@google.com
VK does work on Android but I can confirm it is not working on iOS.
p.s. I am using chrome on both devices.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-hter...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "chromium-hterm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-hter...@chromium.org.
Reply all
Reply to author
Forward
0 new messages