electron/docs
Maksim Sisov 3ea623364b
feat: support global shortcuts via GlobalShortcutsPortal feature with ozone/wayland (#45171)
* fix: backport patch to fix systemd unit activation in Chromium

This backports a patch from Chromium, which fixes systemd unit
activation. That is, a globalShortcuts feature that Chromium has
needs to create a systemd unit and rename it properly. Portal's
global shortcuts uses that name afterwards to map the app with
the shortcuts bound. However, there might be a race between
Chromium binding shortcuts and renaming the unit.

This is a first step to add Portal's globalShortcuts to
Electron.

* feat: Support global shortcuts via GlobalShortcutsPortal feature

Chromium has a new feature called GlobalShortcutsPortal. It
allows clients to use Portal's globalShortcuts to register and
listen to shortcuts.

This patches adds necessary bits, which allows Electron to
use that feature.

In order to make it work, one has to add
--enable-features=GlobalShortcutsPortal

Test: tested manually with a sample app.

* docs: add GlobalShortcutsPortal feature to globalShortcuts docs

Electron supports Portal's globalShortcuts API now via Chromium, and Electron
apps can use that in a Wayland session. Update the docs with the required
feature flag that must be passed to be able to use that implementation.
2025-01-22 11:59:48 +01:00
..
api feat: support global shortcuts via GlobalShortcutsPortal feature with ozone/wayland (#45171) 2025-01-22 11:59:48 +01:00
development docs: document Windows pitfall when updating patches (#43787) 2024-09-19 23:35:21 -05:00
fiddles docs: remove extra " (#45029) 2024-12-16 13:20:17 -05:00
images docs: add custom titlebar example (#43693) 2024-11-01 11:04:37 -04:00
tutorial docs: add DocCardList component for index doc (#45275) 2025-01-22 10:27:30 +01:00
api-history.schema.json docs: api history (#42982) 2024-08-19 11:17:10 -07:00
breaking-changes.md docs: correct breaking changes versions (#45173) 2025-01-13 14:15:24 -08:00
experimental.md docs: fix apostrophe typo "Electrons" -> "Electron's" (#44516) 2024-11-02 15:52:22 -05:00
faq.md chore: extend linting of code blocks in the docs (#40245) 2023-11-21 16:50:08 +09:00
glossary.md docs: update docs.microsoft.com links to learn.microsoft.com (#37707) 2023-03-29 12:16:44 +02:00
README.md docs: remove quickstart (#45194) 2025-01-15 14:42:53 -08:00
styleguide.md docs: api history (#42982) 2024-08-19 11:17:10 -07:00
why-electron.md docs: Why Electron? (#45191) 2025-01-15 18:32:56 -05:00

Official Guides

Please make sure that you use the documents that match your Electron version. The version number should be a part of the page URL. If it's not, you are probably using the documentation of a development branch which may contain API changes that are not compatible with your Electron version. To view older versions of the documentation, you can browse by tag on GitHub by opening the "Switch branches/tags" dropdown and selecting the tag that matches your version.

FAQ

There are questions that are asked quite often. Check this out before creating an issue:

Guides and Tutorials

Getting started

Learning the basics

Advanced steps

Detailed Tutorials

These individual tutorials expand on topics discussed in the guide above.


API References

Custom DOM Elements:

Modules for the Main Process:

Modules for the Renderer Process (Web Page):

Modules for Both Processes:

Development

See development/README.md