Index: chrome/common/extensions/docs/templates/intros/commands.html |
diff --git a/chrome/common/extensions/docs/templates/intros/commands.html b/chrome/common/extensions/docs/templates/intros/commands.html |
index 65c3b7ca318520fb9766e8444ab5086f9df70850..0416a57ff1ba97caf71439dd4df194116eb04a7e 100644 |
--- a/chrome/common/extensions/docs/templates/intros/commands.html |
+++ b/chrome/common/extensions/docs/templates/intros/commands.html |
@@ -74,3 +74,35 @@ generate events that you can handle. If you need to take action based on your |
popup opening, consider listening for an 'onDomReady' event inside your popup's |
code. |
</p> |
+ |
+<h2 id="usage">Scope</h2> |
+<p>By default, Commands are scoped to the Chrome browser, which means that while |
+the browser does not have focus, the shortcut will be inactive. On desktop |
+Chrome, Commands can instead have global scope and will then also work while |
+Chrome does *not* have focus. NOTE: The exception here is ChromeOS, where global |
+commands are not allowed at the moment.</p> |
+ |
+<p>The user is free to designate any shortcut as global using the UI in |
+chrome://extensions \ Keyboard Shortcuts, but the extension developer is limited |
+to specifying only Ctrl+Shift+[0..9] as global shortcuts. This is to minimize |
+the risk of overriding shortcuts in other applications since if, for example, |
+Alt+P were to be allowed as global, the printing shortcut might not work in |
+other applications.</p> |
+ |
+<p>Example:</p> |
+ |
+<pre data-filename="manifest.json"> |
+{ |
+ "name": "My extension", |
+ ... |
+ "commands": { |
+ "toggle-feature-foo": { |
+ "suggested_key": { |
+ "default": "Ctrl+Shift+5" |
+ }, |
+ "description": "Toggle feature foo", |
+ <b>"global": true</b> |
+ } |
+ }, |
+ ... |
+}</pre> |