This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5e6f949
commit 366d6e9
Showing
202 changed files
with
24,677 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
# 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](https://github.com/electron/electron/tree/v1.4.0) | ||
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: | ||
|
||
* [Electron FAQ](faq.md) | ||
|
||
## Guides and Tutorials | ||
|
||
* [About Electron](tutorial/about.md) | ||
* [Setting up the Development Environment](tutorial/development-environment.md) | ||
* [Setting up macOS](tutorial/development-environment.md#setting-up-macos) | ||
* [Setting up Windows](tutorial/development-environment.md#setting-up-windows) | ||
* [Setting up Linux](tutorial/development-environment.md#setting-up-linux) | ||
* [Choosing an Editor](tutorial/development-environment.md#a-good-editor) | ||
* [Creating your First App](tutorial/first-app.md) | ||
* [Installing Electron](tutorial/first-app.md#installing-electron) | ||
* [Electron Development in a Nutshell](tutorial/first-app.md#electron-development-in-a-nutshell) | ||
* [Running Your App](tutorial/first-app.md#running-your-app) | ||
* [Boilerplates and CLIs](tutorial/boilerplates-and-clis.md) | ||
* [Boilerplate vs CLI](tutorial/boilerplates-and-clis.md#boilerplate-vs-cli) | ||
* [electron-forge](tutorial/boilerplates-and-clis.md#electron-forge) | ||
* [electron-builder](tutorial/boilerplates-and-clis.md#electron-builder) | ||
* [electron-react-boilerplate](tutorial/boilerplates-and-clis.md#electron-react-boilerplate) | ||
* [Other Tools and Boilerplates](tutorial/boilerplates-and-clis.md#other-tools-and-boilerplates) | ||
* [Application Architecture](tutorial/application-architecture.md) | ||
* [Main and Renderer Processes](tutorial/application-architecture.md#main-and-renderer-processes) | ||
* [Using Electron's APIs](tutorial/application-architecture.md#using-electron-apis) | ||
* [Using Node.js APIs](tutorial/application-architecture.md#using-nodejs-apis) | ||
* [Using Native Node.js Modules](tutorial/using-native-node-modules.md) | ||
* [Performance Strategies](tutorial/performance.md) | ||
* Adding Features to Your App | ||
* [Notifications](tutorial/notifications.md) | ||
* [Recent Documents](tutorial/recent-documents.md) | ||
* [Application Progress](tutorial/progress-bar.md) | ||
* [Custom Dock Menu](tutorial/macos-dock.md) | ||
* [Custom Windows Taskbar](tutorial/windows-taskbar.md) | ||
* [Custom Linux Desktop Actions](tutorial/linux-desktop-actions.md) | ||
* [Keyboard Shortcuts](tutorial/keyboard-shortcuts.md) | ||
* [Offline/Online Detection](tutorial/online-offline-events.md) | ||
* [Represented File for macOS BrowserWindows](tutorial/represented-file.md) | ||
* [Native File Drag & Drop](tutorial/native-file-drag-drop.md) | ||
* [Offscreen Rendering](tutorial/offscreen-rendering.md) | ||
* [Supporting macOS Dark Mode](tutorial/mojave-dark-mode-guide.md) | ||
* [Accessibility](tutorial/accessibility.md) | ||
* [Spectron](tutorial/accessibility.md#spectron) | ||
* [Devtron](tutorial/accessibility.md#devtron) | ||
* [Enabling Accessibility](tutorial/accessibility.md#enabling-accessibility) | ||
* [Testing and Debugging](tutorial/application-debugging.md) | ||
* [Debugging the Main Process](tutorial/debugging-main-process.md) | ||
* [Debugging the Main Process with Visual Studio Code](tutorial/debugging-main-process-vscode.md) | ||
* [Using Selenium and WebDriver](tutorial/using-selenium-and-webdriver.md) | ||
* [Testing on Headless CI Systems (Travis, Jenkins)](tutorial/testing-on-headless-ci.md) | ||
* [DevTools Extension](tutorial/devtools-extension.md) | ||
* [Automated Testing with a Custom Driver](tutorial/automated-testing-with-a-custom-driver.md) | ||
* [Distribution](tutorial/application-distribution.md) | ||
* [Supported Platforms](tutorial/support.md#supported-platforms) | ||
* [Code Signing](tutorial/code-signing.md) | ||
* [Mac App Store](tutorial/mac-app-store-submission-guide.md) | ||
* [Windows Store](tutorial/windows-store-guide.md) | ||
* [Snapcraft](tutorial/snapcraft.md) | ||
* [Security](tutorial/security.md) | ||
* [Reporting Security Issues](tutorial/security.md#reporting-security-issues) | ||
* [Chromium Security Issues and Upgrades](tutorial/security.md#chromium-security-issues-and-upgrades) | ||
* [Electron Security Warnings](tutorial/security.md#electron-security-warnings) | ||
* [Security Checklist](tutorial/security.md#checklist-security-recommendations) | ||
* [Updates](tutorial/updates.md) | ||
* [Deploying an Update Server](tutorial/updates.md#deploying-an-update-server) | ||
* [Implementing Updates in Your App](tutorial/updates.md#implementing-updates-in-your-app) | ||
* [Applying Updates](tutorial/updates.md#applying-updates) | ||
* [Getting Support](tutorial/support.md) | ||
|
||
## Detailed Tutorials | ||
|
||
These individual tutorials expand on topics discussed in the guide above. | ||
|
||
* [Installing Electron](tutorial/installation.md) | ||
* [Proxies](tutorial/installation.md#proxies) | ||
* [Custom Mirrors and Caches](tutorial/installation.md#custom-mirrors-and-caches) | ||
* [Troubleshooting](tutorial/installation.md#troubleshooting) | ||
* Electron Releases & Developer Feedback | ||
* [Versioning Policy](tutorial/electron-versioning.md) | ||
* [Release Timelines](tutorial/electron-timelines.md) | ||
* [App Feedback Program](tutorial/app-feedback-program.md) | ||
* [Packaging App Source Code with asar](tutorial/application-packaging.md) | ||
* [Generating asar Archives](tutorial/application-packaging.md#generating-asar-archives) | ||
* [Using asar Archives](tutorial/application-packaging.md#using-asar-archives) | ||
* [Limitations](tutorial/application-packaging.md#limitations-of-the-node-api) | ||
* [Adding Unpacked Files to asar Archives](tutorial/application-packaging.md#adding-unpacked-files-to-asar-archives) | ||
* [Testing Widevine CDM](tutorial/testing-widevine-cdm.md) | ||
* [Using Pepper Flash Plugin](tutorial/using-pepper-flash-plugin.md) | ||
|
||
--- | ||
|
||
* [Glossary of Terms](glossary.md) | ||
|
||
## API References | ||
|
||
* [Synopsis](api/synopsis.md) | ||
* [Process Object](api/process.md) | ||
* [Supported Chrome Command Line Switches](api/chrome-command-line-switches.md) | ||
* [Environment Variables](api/environment-variables.md) | ||
* [Breaking API Changes](api/breaking-changes.md) | ||
|
||
### Custom DOM Elements: | ||
|
||
* [`File` Object](api/file-object.md) | ||
* [`<webview>` Tag](api/webview-tag.md) | ||
* [`window.open` Function](api/window-open.md) | ||
* [`BrowserWindowProxy` Object](api/browser-window-proxy.md) | ||
|
||
### Modules for the Main Process: | ||
|
||
* [app](api/app.md) | ||
* [autoUpdater](api/auto-updater.md) | ||
* [BrowserView](api/browser-view.md) | ||
* [BrowserWindow](api/browser-window.md) | ||
* [contentTracing](api/content-tracing.md) | ||
* [dialog](api/dialog.md) | ||
* [globalShortcut](api/global-shortcut.md) | ||
* [inAppPurchase](api/in-app-purchase.md) | ||
* [ipcMain](api/ipc-main.md) | ||
* [Menu](api/menu.md) | ||
* [MenuItem](api/menu-item.md) | ||
* [net](api/net.md) | ||
* [netLog](api/net-log.md) | ||
* [powerMonitor](api/power-monitor.md) | ||
* [powerSaveBlocker](api/power-save-blocker.md) | ||
* [protocol](api/protocol.md) | ||
* [screen](api/screen.md) | ||
* [session](api/session.md) | ||
* [systemPreferences](api/system-preferences.md) | ||
* [TouchBar](api/touch-bar.md) | ||
* [Tray](api/tray.md) | ||
* [webContents](api/web-contents.md) | ||
|
||
### Modules for the Renderer Process (Web Page): | ||
|
||
* [desktopCapturer](api/desktop-capturer.md) | ||
* [ipcRenderer](api/ipc-renderer.md) | ||
* [remote](api/remote.md) | ||
* [webFrame](api/web-frame.md) | ||
|
||
### Modules for Both Processes: | ||
|
||
* [clipboard](api/clipboard.md) | ||
* [crashReporter](api/crash-reporter.md) | ||
* [nativeImage](api/native-image.md) | ||
* [shell](api/shell.md) | ||
|
||
## Development | ||
|
||
See [development/README.md](development/README.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Accelerator | ||
|
||
> Define keyboard shortcuts. | ||
Accelerators are Strings that can contain multiple modifiers and a single key code, | ||
combined by the `+` character, and are used to define keyboard shortcuts | ||
throughout your application. | ||
|
||
Examples: | ||
|
||
* `CommandOrControl+A` | ||
* `CommandOrControl+Shift+Z` | ||
|
||
Shortcuts are registered with the [`globalShortcut`](global-shortcut.md) module | ||
using the [`register`](global-shortcut.md#globalshortcutregisteraccelerator-callback) | ||
method, i.e. | ||
|
||
```javascript | ||
const { app, globalShortcut } = require('electron') | ||
|
||
app.on('ready', () => { | ||
// Register a 'CommandOrControl+Y' shortcut listener. | ||
globalShortcut.register('CommandOrControl+Y', () => { | ||
// Do stuff when Y and either Command/Control is pressed. | ||
}) | ||
}) | ||
``` | ||
|
||
## Platform notice | ||
|
||
On Linux and Windows, the `Command` key does not have any effect so | ||
use `CommandOrControl` which represents `Command` on macOS and `Control` on | ||
Linux and Windows to define some accelerators. | ||
|
||
Use `Alt` instead of `Option`. The `Option` key only exists on macOS, whereas | ||
the `Alt` key is available on all platforms. | ||
|
||
The `Super` key is mapped to the `Windows` key on Windows and Linux and | ||
`Cmd` on macOS. | ||
|
||
## Available modifiers | ||
|
||
* `Command` (or `Cmd` for short) | ||
* `Control` (or `Ctrl` for short) | ||
* `CommandOrControl` (or `CmdOrCtrl` for short) | ||
* `Alt` | ||
* `Option` | ||
* `AltGr` | ||
* `Shift` | ||
* `Super` | ||
|
||
## Available key codes | ||
|
||
* `0` to `9` | ||
* `A` to `Z` | ||
* `F1` to `F24` | ||
* Punctuations like `~`, `!`, `@`, `#`, `$`, etc. | ||
* `Plus` | ||
* `Space` | ||
* `Tab` | ||
* `Capslock` | ||
* `Numlock` | ||
* `Scrolllock` | ||
* `Backspace` | ||
* `Delete` | ||
* `Insert` | ||
* `Return` (or `Enter` as alias) | ||
* `Up`, `Down`, `Left` and `Right` | ||
* `Home` and `End` | ||
* `PageUp` and `PageDown` | ||
* `Escape` (or `Esc` for short) | ||
* `VolumeUp`, `VolumeDown` and `VolumeMute` | ||
* `MediaNextTrack`, `MediaPreviousTrack`, `MediaStop` and `MediaPlayPause` | ||
* `PrintScreen` | ||
* NumPad Keys | ||
* `num0` - `num9` | ||
* `numdec` - decimal key | ||
* `numadd` - numpad `+` key | ||
* `numsub` - numpad `-` key | ||
* `nummult` - numpad `*` key | ||
* `numdiv` - numpad `÷` key |
Oops, something went wrong.