Skip to content
This repository has been archived by the owner on Apr 13, 2024. It is now read-only.

Puter Terminal does not accept mobile input #18

Open
Jeklah opened this issue Feb 15, 2024 · 8 comments
Open

Puter Terminal does not accept mobile input #18

Jeklah opened this issue Feb 15, 2024 · 8 comments

Comments

@Jeklah
Copy link

Jeklah commented Feb 15, 2024

I tried using the terminal on my mobile but it did not appear to recognise any keystrokes, apart from enter strangely enough. See attached video.

@Jeklah
Copy link
Author

Jeklah commented Feb 15, 2024

@jelveh
Copy link
Contributor

jelveh commented Feb 15, 2024

Hi @Jeklah, thanks for reporting this. This is a problem with xterm.js, we're gonna look into a workaround.

@jelveh
Copy link
Contributor

jelveh commented Feb 19, 2024

@AtkinsSJ @KernelDeimos could you look into this?

@AtkinsSJ
Copy link
Contributor

AtkinsSJ commented Feb 20, 2024

🤔 I get this problem in Chrome but not in Firefox.

EDIT: Firefox has its own issues though.

@AtkinsSJ
Copy link
Contributor

OK so my understanding of what's happening is:

  1. User types something. Let's go with a.
  2. Chrome emits a keyDown event with the 229 keycode, meaning that the user is in IME mode.
  3. xterm sets _keyDownSeen to true.
  4. Phoenix gets the keyDown event but can't do anything useful with it.
  5. Chrome emits an input event with the a data.
  6. Because _keyDownSeen is true, xterm ignores it, even though this is the event we want!
  7. Chrome emits a keyUp event with the 229 keycode.
  8. xterm sets _keyDownSeen to false.
  9. Phoenix gets the keyUp event but can't do anything useful with it.

I don't know how we would work around this, other than actually fixing xterm.js. It does look like xterm is supposed to handle IMEs, just something is causing it to not recognise that we're in composition mode.

@Jeklah
Copy link
Author

Jeklah commented Feb 20, 2024

I just tried testing this in Firefox, the website came up but I was unable to login...is it down temporarily at the moment? I couldn't even get onto the website on Chrome.

One difference I did notice, whether it'll make the difference between the issue being seen on Chrome and not FF I'm not sure, but FF opened up puter.com with https while Chrome did not.

Will check again later to see if site is back up and will check both browsers.

@jelveh
Copy link
Contributor

jelveh commented Feb 20, 2024

@Jeklah Yes unfortunately we were down. I just tried Chrome, Safari, and FF on iOS and they all worked.

@AtkinsSJ shall we... fix xterm.js? :)

@AtkinsSJ
Copy link
Contributor

@AtkinsSJ shall we... fix xterm.js? :)

I'll add that to my list! 🦬➕

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

No branches or pull requests

3 participants