From d4a14bc215340c1a82c405d30ba643cba028e452 Mon Sep 17 00:00:00 2001 From: James Wheare Date: Thu, 31 Mar 2016 08:56:49 +0100 Subject: [PATCH] Improve app-command docs, list arguments and explain command string --- docs/api/browser-window.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index 76343f967b..e42b2d9bd0 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -301,10 +301,18 @@ Emitted when the window leaves full screen state triggered by html api. ### Event: 'app-command' _Windows_ +Returns: + +* `event` Event +* `command` String + Emitted when an [App Command](https://msdn.microsoft.com/en-us/library/windows/desktop/ms646275(v=vs.85).aspx) is invoked. These are typically related to keyboard media keys or browser commands, as well as the "Back" button built into some mice on Windows. +Commands are lowercased with underscores replaced with hyphens and the `APPCOMMAND_` prefix stripped off. +e.g. `APPCOMMAND_BROWSER_BACKWARD` is emitted as `browser-backward`. + ```js someWindow.on('app-command', function(e, cmd) { // Navigate the window back when the user hits their mouse back button