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

Bad Console input related to browser/platform? #368

Open
7 of 19 tasks
fbrier opened this issue Jul 29, 2018 · 4 comments
Open
7 of 19 tasks

Bad Console input related to browser/platform? #368

fbrier opened this issue Jul 29, 2018 · 4 comments

Comments

@fbrier
Copy link

fbrier commented Jul 29, 2018

Description

On Linux Mint, using the Firefox browser, connected to cncjs running on a Raspberry Pi, entering gcode commands into the Console works. The command executes. But using the Chrome browser on the same laptop does not. Attempting to use Android with the Chrome browser, or Firefox, or Opera, again does not work with the same behavior. I even tried the Silk browser and Firefox browser on a Kindle Fire.

The incorrect behavior is the cursor stays at the beginning of the prompt line, ">", and as characters are entered, they appear in sequence, but the cursor stays at the beginning. When you hit enter, it clears the letters, ie: "M115", and displays another empty prompt line, ">", and no command is executed, nor output generated.

Has anyone else seen this behavior? Do tablet browsers work fine with cncjs? Since it works fine with Firefox under Mint, it seemed like it is a browser compatibility issue. But with so many browsers doing the same thing, perhaps it is an issue with the cncjs on the Raspberry Pi.

Versions

  • CNCjs: 1.9.15
  • Node.js: 6.x
  • NPM: 5.x

How Do You Install CNCjs?

I used an image from a github project, however, I previously used NPM and believe I had the same issue.

  • NPM
  • Download the CNCjs Desktop Application

CNC Controller

  • Grbl
  • Marlin
  • Smoothieware
  • TinyG/g2core

Hardware

  • Raspberry Pi
  • Desktop or Laptop
  • Mobile Device

Host Operating System

  • Not Applicable
  • Windows
  • Mac
  • Linux

Browser Operating System

  • Not Applicable
  • Windows
  • Mac
  • Linux (Mint)
  • Android
  • Kindle Fire
@MitchBradley
Copy link
Contributor

I have seen similar behavior with cncjs running on an Android tablet. I guessed that the problem is related to some keycode mapping difference between Android soft keyboards and real keyboards.

@fbrier
Copy link
Author

fbrier commented Jul 30, 2018

I cloned the cncjs repo and found that xterm was being used as the Console widget. The project does not currently support mobile browsers. There are lots of different issues which seem to affect xterm's behavior including lang, character set, which event property used to retrieve the key value, terminal lines getting rewritten.

I borrowed my wife's laptop and just tested Chrome on Windows and it works fine with cncjs as well.

@cheton
Copy link
Collaborator

cheton commented Aug 1, 2018

There is a breaking change introduced in xterm v3.1 and it is not compatible with current implementation. I may consider rewriting the terminal or trying to find a better solution to resolve browser compatibility issues especially on tablet.

@Tyriar
Copy link

Tyriar commented Aug 8, 2018

@cheton FYI we're open to officially supporting mobile in xterm.js, it just needs someone to help drive it (xtermjs/xterm.js#1101). In fact the efforts being made in xtermjs/xterm.js#1507 will help enable plugging in different front ends more easily (if mobile changes the frontend radically).

Is this breaking change related to mobile support specifically? I'm curious what it was if you know?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Triage
Development

No branches or pull requests

5 participants