Skip to content

iPadOS: Don't disable keyboard shortcuts that conflict with browser #2586

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

Closed
jsjoeio opened this issue Jan 14, 2021 · 7 comments
Closed

iPadOS: Don't disable keyboard shortcuts that conflict with browser #2586

jsjoeio opened this issue Jan 14, 2021 · 7 comments
Labels
browser-safari Safari related feature New user visible feature
Milestone

Comments

@jsjoeio
Copy link
Contributor

jsjoeio commented Jan 14, 2021

The PWA version of code-server can support top-level shortcuts normally reserved for the browser (e.g. cmd + w).

We think VSCode (upstream) disables keyboard shortcuts which may conflict with browser shortcuts here. I've tested this out locally by manually adding the keyboard shortcut cmd + w which normally closes a tab in Safari/Chrome/Firefox.

To see this working

Follow these steps to see in action:

  1. Install your version of code-server as a PWA on iPad
  2. Open up code-serer
  3. Command Palette > Open Keyboard Shortcuts (JSON)
  4. Add the following to your keybindings.json
 {      
        "key": "cmd+w",
        "command": "workbench.action.closeActiveEditor"
}
  1. Test out command by hitting cmd + w to close an active file

Solution

Check if code-server is running as a PWA. If it is, allow conflicting keyboard shortcuts (e.g. cmd + w).

@jsjoeio jsjoeio added the feature New user visible feature label Jan 14, 2021
@nhooyr nhooyr added the browser-safari Safari related label Jan 18, 2021
@DAddYE
Copy link

DAddYE commented Jan 26, 2021

Question, how do you install it as PWA? Right now I'm adding code-server to the home screen and all the shortcuts works, however, most of the os x shortcuts were missing so I copied the full list.

The problem I'm facing right now is that every few minutes they stop working and I have to force a refresh.

@jsjoeio
Copy link
Contributor Author

jsjoeio commented Jan 26, 2021

how do you install it as PWA?

  1. Open it up in Safari
  2. Hit the Share icon
  3. Scroll down and hit "Add to Home Screen"

Then on your iPad, find it on the home screen and open it from there. So it sounds like you're already doing that.

The problem I'm facing right now is that every few minutes they stop working and I have to force a refresh

Hmm... that's really strange. I am not sure what could be causing that. Can you record a video and post it here? And during the video, can you open the keybindings.json file and show the list of extensions you have installed?

@DAddYE
Copy link

DAddYE commented Jan 28, 2021

It seems it's the terminal that at some point takes over the shortcuts, or the editor doesn't acknowledge it's closed/hidden.

https://share.icloud.com/photos/0jF8ajSZYwnybqtel2EFx2fDQ

Thank you!!!!

@jsjoeio
Copy link
Contributor Author

jsjoeio commented Jan 28, 2021

Thanks for the video! I have experienced that exact same Find issue with the integrated terminal - so strange.

the editor doesn't acknowledge it's closed/hidden.

Yeah I noticed this as well. Hmm...we'll have to investigate more but hopefully you're at least unblocked for now!

@jsjoeio jsjoeio added this to the Backlog milestone Apr 29, 2021
@stale
Copy link

stale bot commented Oct 27, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days.

@stale stale bot added the stale label Oct 27, 2021
@stale stale bot closed this as completed Nov 1, 2021
@Toomoch
Copy link

Toomoch commented Nov 8, 2023

Is this still working? I added the shortcut cmd+w and it doesn't work in iPadOS 16.5

@zschiffelbein
Copy link

I am running in to the same issue on iPad OS 17.6. Unable to get the cmd+w shortcut to close the active editor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser-safari Safari related feature New user visible feature
Projects
None yet
Development

No branches or pull requests

5 participants