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

Context switching prevents external keyboard input in Terminal (iPadOS Safari) #144232

Open
olivierlacan opened this issue Mar 2, 2022 · 10 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug confirmation-pending editor-input Editor text input help wanted Issues identified as good community contribution opportunities ios-ipados terminal-input Relating to typing in the terminal not doing the right thing, IMEs not working, etc.
Milestone

Comments

@olivierlacan
Copy link

  • Not specific to any extension
  • VS Code Version: 1.64.2 (GitHub Codespaces)
  • OS Version: iPadOS 15.3.1

Steps to Reproduce:

  1. Open any GitHub repo in GitHub’s VScode Web Editor (pressing . key on any repo)
  2. Create a Codespace or connect to a Codespace (since Terminal is only accessible within a Codespace/Devcontainer)
  3. Type text in terminal (Command + J to focus it) and it should print as expected
  4. Switch focus to another app with Command + Tab
  5. Switch back to VScode/Codespaces, at which point input is no longer possible without first disconnecting and reconnecting the external keyboard (or perhaps triggering the on-screen keyboard some other way) or triggering input with tap events.

Video reproduction:

FullSizeRender.MOV

Expected behavior:

If the keyboard focus is on the terminal the active input device should regain focus when OS context switches back to VSCode. This very well could be an iPadOS Safari bug, but if so it seemed important to document it here since I couldn’t find a specific issue covering this unexpected and disruptive behavior.

@meganrogge meganrogge added ios-ipados terminal-input Relating to typing in the terminal not doing the right thing, IMEs not working, etc. labels Mar 7, 2022
@meganrogge
Copy link
Contributor

@rebornix this seems like an ipadOS problem. Thoughts?

@rebornix
Copy link
Member

rebornix commented Mar 7, 2022

@meganrogge I think this is a focus issue. As long as we use a textarea under the hood, we might get into trouble that the textarea thinks we have focus (no blur happened when users switch to another app) but the page is not actually focused. This is my suspicious and would require some debugging to validate.

@olivierlacan
Copy link
Author

@rebornix Is there anything I can do to help debug this?

@mraarone
Copy link

mraarone commented Oct 3, 2022

Recommend #151626 should be closed as it doesn’t clearly articulate this issue, and both this issue’s and that issue’s last comments reference each other. Also recommend this issue remains open and be addressed.

@meganrogge meganrogge added bug Issue identified by VS Code Team member as probable bug confirmation-pending labels Dec 5, 2022
@alexdima
Copy link
Member

alexdima commented Dec 9, 2022

Merging #151626 here. Some extra info from there:

Return key doesn’t work neither in terminal nor in text editing.
Reloading the page doesn’t help, BUT unplugging and plugging back the keyboard (just slightly pull iPad off the case)
Closing the application also doesn’t help.
Switching to the other app and back - doesn’t help (in another app return key works)

fyi @joaomoreno

@alexdima alexdima added the editor-input Editor text input label Dec 9, 2022
@Tyriar
Copy link
Member

Tyriar commented Dec 9, 2022

/duplicate #163448

@Tyriar Tyriar closed this as completed Dec 9, 2022
@vscodenpa vscodenpa added the *duplicate Issue identified as a duplicate of another issue(s) label Dec 9, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2023
@Tyriar Tyriar reopened this May 26, 2023
@Tyriar Tyriar removed the *duplicate Issue identified as a duplicate of another issue(s) label May 26, 2023
@Tyriar Tyriar added this to the Backlog milestone May 26, 2023
@microsoft microsoft unlocked this conversation May 26, 2023
@Tyriar Tyriar added the help wanted Issues identified as good community contribution opportunities label Dec 7, 2023
@Tyriar
Copy link
Member

Tyriar commented Dec 7, 2023

Help wanted here, to make it clear the team will likely not fix this as those that contribute to the terminal don't have ipads.

@kvc0
Copy link

kvc0 commented Jul 8, 2024

This makes vs code tunnels almost unusable! It seems to affect arrow keys and escape as well as enter.

Normal characters as well as control, option, command, and the emoji meta keys all work. Sometimes I have to fiddle with focus until those buttons work: I can't, however, restore the other meta keys without physically unplugging the keyboard.

@yocjyet
Copy link

yocjyet commented Sep 21, 2024

On-screen keyboard works fine, but not for physical attached one (at least on the offcial Apple one)

@RaddishIoW
Copy link

There is a workaround I found here:

coder/code-server#5221 (comment)

@meganrogge meganrogge removed their assignment Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug confirmation-pending editor-input Editor text input help wanted Issues identified as good community contribution opportunities ios-ipados terminal-input Relating to typing in the terminal not doing the right thing, IMEs not working, etc.
Projects
None yet
Development

No branches or pull requests

10 participants