question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PWA captures keyboard, OS shortcuts don't work

See original GitHub issue

Description

PWAs in Brave captures the keyboard, such that OS shortcuts don’t work (such as changing workspace). For instance, In Sway with the mod key set to either Super key or Alt key, switching workspaces with $mod + 3 doesn’t work when a PWA is the focused window. Issue only occurs when Brave is started with native Wayland/Ozone. Issue is resolved when clicking “Open in Brave”, or when Brave is started with XWayland.

Steps to Reproduce

  1. Install any website as a PWA (open in window checked)
  2. Start the PWA
  3. Observe OS keyboard shortcuts not working

Actual result:

OS keyboard shortcuts don’t work.

Expected result:

OS keyboard shortcuts should work as expected.

Reproduces how often:

Every time.

Brave version (brave://version info)

Brave: 1.40.105 Chromium: 103.0.5060.53 (Official Build) (64-bit)
Revision: a1711811edd74ff1cf2150f36ffa3b0dae40b17f-refs/branch-heads/5060@{#853}
OS: Linux

Version/Channel Information:

  • Can you reproduce this issue with the current release? Yes
  • Can you reproduce this issue with the beta channel? Haven’t tested
  • Can you reproduce this issue with the nightly channel? Haven’t tested

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? No
  • Does the issue resolve itself when disabling Brave Rewards? No
  • Is the issue reproducible on the latest version of Chrome? Haven’t tested

Miscellaneous Information:

  • Linux distro: Artix Linux
  • Window manager: Sway (Wayland)

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
khamercommented, Oct 4, 2022

I believe this is the upstream (chromium) bug - https://bugs.chromium.org/p/chromium/issues/detail?id=1338554 Which lead me to these workarounds - https://www.reddit.com/r/swaywm/comments/vkgfza/comment/idp5g1h/ and https://www.reddit.com/r/swaywm/comments/vlvpws/chromeium_app_flag_spawns_windows_with_shortcut/

Confirmed that adding sashoism’s fix (thanks Ok-Tank2893) but modifying it for brave works:

for_window [app_id="^chrome-.*-.*$"] shortcuts_inhibitor disable
1reaction
ttuffincommented, Oct 5, 2022

Thanks for sharing! The fix works for me as well. for_window [app_id="^brave-.*-.*$"] shortcuts_inhibitor disable

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why screen sharing and keyboard shortcuts dont work in all ...
Global shortcuts can work even when the app is not running! ... Any app can capture a screen, window or area any time...
Read more >
Global keyboard shortcuts for progressive web apps (PWA ...
The request here is that an installed PWA has access to keyboard shortcuts captured globally by the OS which were never forwarded to...
Read more >
If keyboard shortcuts don't work on Mac - Apple Support
If keyboard shortcuts don't work on Mac. Some keyboard shortcuts may be unavailable in some apps. Make sure you're using the latest version...
Read more >
Keyboard shortcuts in outlook web owa activate when ...
I am having a heck of a time reliably reproducing this in a way that I can share, as I'm trying to do...
Read more >
How to open a PWA using a keyboard shortcut? - Stack Overflow
put the PWA in the taskbar. If it's in, say, the 5th position, then you can launch it by pressing windows key +...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found