PWA captures keyboard, OS shortcuts don't work
See original GitHub issueDescription
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
- Install any website as a PWA (open in window checked)
- Start the PWA
- 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:
- Created a year ago
- Comments:5
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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:
Thanks for sharing! The fix works for me as well.
for_window [app_id="^brave-.*-.*$"] shortcuts_inhibitor disable