Skip to content

Commit a244c60

Browse files
[Word] (keyboard shortcuts) Document support in Word on the web (#5085)
1 parent 5ea20ed commit a244c60

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

docs/design/keyboard-shortcuts.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Custom keyboard shortcuts in Office Add-ins
33
description: Learn how to add custom keyboard shortcuts, also known as key combinations, to your Office Add-in.
4-
ms.date: 02/12/2025
4+
ms.date: 03/12/2025
55
ms.topic: how-to
66
ms.localizationpriority: medium
77
---
@@ -21,9 +21,6 @@ There are three steps to add keyboard shortcuts to an add-in.
2121
Keyboard shortcuts are currently only supported in the following platforms and build of **Excel** and **Word**.
2222

2323
- Office on the web
24-
25-
> [!NOTE]
26-
> The keyboard shortcut feature is currently being rolled out to Word on the web. If you test the feature in Word on the web at this time, the shortcuts may not work if they're activated from within the add-in's task pane. We recommend to periodically check [Keyboard Shortcuts requirement sets](/javascript/api/requirement-sets/common/keyboard-shortcuts-requirement-sets) to find out when the feature is fully supported.
2724
- Office on Windows
2825
- **Excel**: Version 2102 (Build 13801.20632) and later
2926
- **Word**: Version 2408 (Build 17928.20114) and later
@@ -49,14 +46,14 @@ The process to define custom keyboard shortcuts for your add-in varies depending
4946
# [Unified app manifest for Microsoft 365](#tab/jsonmanifest)
5047

5148
> [!NOTE]
52-
> Implementing keyboard shortcuts with the unified app manifest for Microsoft 365 is in public developer preview. This shouldn't be used in production add-ins. We invite you to try it out in test or development environments. For more information, see the [Public developer preview app manifest schema](/microsoftteams/platform/resources/schema/manifest-schema-dev-preview).
49+
> Implementing keyboard shortcuts with the unified app manifest for Microsoft 365 is in public developer preview. This shouldn't be used in production add-ins. We invite you to try it out in test or development environments. For more information, see the [Microsoft 365 app manifest schema reference](/microsoft-365/extensibility/schema/?view=m365-app-prev&preserve-view=true).
5350
5451
If your add-in uses the unified app manifest for Microsoft 365, custom keyboard shortcuts and their actions are defined in the manifest.
5552

5653
1. In your add-in project, open the **manifest.json** file.
57-
1. Add the following object to the "extensions.runtimes" array. Note the following about this markup.
58-
- The "actions" objects specify the functions your add-in can run. In the following example, an add-in will be able to show and hide a task pane. You'll create these functions in a later section. Currently, custom keyboard shortcuts can only run actions that are of type "executeFunction".
59-
- While the "actions.displayName" property is optional, it's required if a custom keyboard shortcut will be created for the action. This property is used to describe the action of a keyboard shortcut. The description you provide appears in the dialog that's shown to a user when there's a shortcut conflict between multiple add-ins or with Microsoft 365. Office appends the name of the add-in in parentheses at the end of the description. For more information on how conflicts with keyboard shortcuts are handled, see [Avoid key combinations in use by other add-ins](#avoid-key-combinations-in-use-by-other-add-ins).
54+
1. Add the following object to the ["extensions.runtimes"](/microsoft-365/extensibility/schema/extension-runtimes-array?view=m365-app-prev&preserve-view=true) array. Note the following about this markup.
55+
- The ["actions"](/microsoft-365/extensibility/schema/extension-runtimes-actions-item?view=m365-app-prev&preserve-view=true) objects specify the functions your add-in can run. In the following example, an add-in will be able to show and hide a task pane. You'll create these functions in a later section. Currently, custom keyboard shortcuts can only run actions that are of type "executeFunction".
56+
- While the ["actions.displayName"](/microsoft-365/extensibility/schema/extension-runtimes-actions-item?view=m365-app-prev&preserve-view=true#displayname) property is optional, it's required if a custom keyboard shortcut will be created for the action. This property is used to describe the action of a keyboard shortcut. The description you provide appears in the dialog that's shown to a user when there's a shortcut conflict between multiple add-ins or with Microsoft 365. Office appends the name of the add-in in parentheses at the end of the description. For more information on how conflicts with keyboard shortcuts are handled, see [Avoid key combinations in use by other add-ins](#avoid-key-combinations-in-use-by-other-add-ins).
6057

6158
```json
6259
"runtimes": [
@@ -84,7 +81,7 @@ If your add-in uses the unified app manifest for Microsoft 365, custom keyboard
8481
```
8582

8683
1. Add the following to the "extensions" array. Note the following about the markup.
87-
- The SharedRuntime 1.1 requirement set is specified in the "requirements.capabilities" object to support custom keyboard shortcuts.
84+
- The SharedRuntime 1.1 requirement set is specified in the ["requirements.capabilities"](/microsoft-365/extensibility/schema/requirements-extension-element-capabilities?view=m365-app-prev&preserve-view=true) object to support custom keyboard shortcuts.
8885
- Each "shortcuts" object represents a single action that's invoked by a keyboard shortcut. It specifies the supported key combinations for various platforms, such as Office on the web, on Windows, and on Mac. For guidance on how to create custom key combinations, see [Guidelines for custom key combinations](#guidelines-for-custom-key-combinations).
8986
- A default key combination must be specified. It's used on all supported platforms if there isn't a specific combination configured for a particular platform.
9087
- The value of the "actionId" property must match the value specified in the "id" property of the applicable "extensions.runtimes.actions" object.

docs/develop/configure-your-add-in-to-use-a-shared-runtime.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Configure your Office Add-in to use a shared runtime
33
description: Configure your Office Add-in to use a shared runtime to support additional ribbon, task pane, and custom function features.
44
ms.topic: how-to
5-
ms.date: 03/11/2025
5+
ms.date: 03/12/2025
66
ms.localizationpriority: high
77
---
88

@@ -229,8 +229,8 @@ Configuring a shared runtime enables the following scenarios.
229229
- [Change the availability of add-in commands](../design/disable-add-in-commands.md)
230230
- [Run code in your Office Add-in when the document opens](run-code-on-document-open.md)
231231
- [Show or hide the task pane of your Office Add-in](show-hide-add-in.md)
232+
- [Add custom keyboard shortcuts to your Office Add-ins](../design/keyboard-shortcuts.md) (supported in Excel and Word add-ins only)
232233
- The following are available for Excel add-ins only.
233-
- [Add custom keyboard shortcuts to your Office Add-ins](../design/keyboard-shortcuts.md)
234234
- [Create custom contextual tabs in Office Add-ins](../design/contextual-tabs.md)
235235
- Custom functions will have full CORS support.
236236
- Custom functions can call Office.js APIs to read spreadsheet document data.

docs/develop/develop-overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Develop Office Add-ins
33
description: An introduction to developing Office Add-ins.
44
ms.topic: overview
5-
ms.date: 08/15/2024
5+
ms.date: 03/12/2025
66
ms.localizationpriority: high
77
---
88

@@ -64,7 +64,7 @@ An Office Add-in's manifest defines the settings and capabilities of the add-in.
6464
- Location of images that the add-in uses for branding and command iconography.
6565
- Dimensions of the add-in (for example, dimensions for content add-ins, requested height for Outlook add-ins).
6666
- Rules that specify when the add-in activates in the context of a message or appointment (for Outlook add-ins only).
67-
- Keyboard shortcuts (for Excel only).
67+
- Keyboard shortcuts (for Excel and Word add-ins only).
6868

6969
For detailed information about the manifest, see [Office Add-ins manifest](add-in-manifests.md).
7070

0 commit comments

Comments
 (0)