phoenix icon indicating copy to clipboard operation
phoenix copied to clipboard

Puter Terminal does not accept mobile input

Open Jeklah opened this issue 1 year ago • 8 comments

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 avatar Feb 15 '24 13:02 Jeklah

https://youtube.com/shorts/x1d9PGj1Vb4?si=tPZc-9rBY5SfhvK0

Jeklah avatar Feb 15 '24 13:02 Jeklah

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

jelveh avatar Feb 15 '24 19:02 jelveh

@AtkinsSJ @KernelDeimos could you look into this?

jelveh avatar Feb 19 '24 22:02 jelveh

:thinking: I get this problem in Chrome but not in Firefox.

EDIT: Firefox has its own issues though.

AtkinsSJ avatar Feb 20 '24 11:02 AtkinsSJ

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.

AtkinsSJ avatar Feb 20 '24 12:02 AtkinsSJ

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.

Jeklah avatar Feb 20 '24 14:02 Jeklah

@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? :)

jelveh avatar Feb 20 '24 20:02 jelveh

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

I'll add that to my list! 🦬➕

AtkinsSJ avatar Feb 24 '24 10:02 AtkinsSJ