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

keyboard shortcuts #13

Open
henry5001 opened this issue Jan 5, 2023 · 3 comments
Open

keyboard shortcuts #13

henry5001 opened this issue Jan 5, 2023 · 3 comments

Comments

@henry5001
Copy link

How do I reconcile the browser's keyboard shortcuts with the PWA app's shortcuts, since I press many of them just to trigger the browser's functionality

Can the shortcut keys of the PWA application and the browser not conflict? This is a question I am thinking about. Customizing the shortcut keys of the PWA application does not affect the shortcut keys of the browser being used.

@captainbrosset
Copy link
Contributor

Excellent question! That's definitely an area where desktop-installed PWA could be better.

As a developer, you can probably easily listen to a lot of shortcuts using JavaScript code, and prevent the default behavior from happening, or replace it with your actions.

But it seems like PWAs should be given the ability to do this in a better way. Similar to how the manifest display member lets you choose how much of the browser chrome you want to see, there could be a keyboard-shortcut member that lets you choose how much of the default browser shortcuts you want enabled.

For example, pressing ctrl+N in a PWA opens a new browser window, and that's pretty confusing I think.
Now, if you're building a PWA that deals with creating files, then you could re-map this to your own action. But if you're not, letting this shortcut open a new window feels confusing to me.
Once a PWA is installed, I don't think of it as being a browser window. I think of it as being an app.

Sorry for now answering your question. I think this is a nice discussion to have. And I'm not aware of any proposals that have been made in this area yet.

@captainbrosset
Copy link
Contributor

Here is an explainer from a few years back about this: https://github.com/slightlyoff/declarative_web_actions

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

No branches or pull requests

3 participants
@captainbrosset @henry5001 and others