Skip to content

Commit 47563ea

Browse files
authored
Merge pull request #5578 from MicrosoftDocs/drewbat/copilot-key-single-tap-updates
Adding SingleTap element to copilot hotkey app manifest extension exa…
2 parents dfa2a3e + d70e8f2 commit 47563ea

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

hub/apps/develop/windows-integration/copilot-key-state.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ The following example shows the **uap:Extension** registering the URI scheme "my
101101

102102
An app must be packaged in order to register as a Microsoft Copilot hardware key provider. For information on app packaging, see [An overview of Package Identity in Windows app](/windows/apps/desktop/modernize/package-identity-overview). Microsoft Copilot hardware key providers declare their registration information within the [uap3:AppExtension](/uwp/schemas/appxpackage/uapmanifestschema/element-uap3-appextension-manual). The **Name** attribute of the extension must be set to "com.microsoft.windows.copilotkeyprovider". To support the key state changes, apps must provide some additional entries to their **uap3:AppExtension** declaration.
103103

104-
Inside of the **uap3:AppExtension** element, add a [uap3:Properties](/uwp/schemas/appxpackage/uapmanifestschema/element-uap3-properties-manual) element with child elements **PressAndHoldStart** and **PressAndHoldStop**. The contents of these elements should be the URI of the protocol scheme registered in the manifest in the previous step. The query string arguments specify whether the URI is being launched because the user pressed and held the hot key or because the user released the hot key. The app uses these query string values during app activation to determine the correct action to take.
104+
Inside of the **uap3:AppExtension** element, add a [uap3:Properties](/uwp/schemas/appxpackage/uapmanifestschema/element-uap3-properties-manual) element with child elements **PressAndHoldStart** and **PressAndHoldStop**. The contents of these elements should be the URI of the protocol scheme registered in the manifest in the previous step. The query string arguments specify whether the URI is being launched because the user pressed and held the hot key or because the user released the hot key. The app uses these query string values during app activation to determine the correct action to take. Specifying the **SingleTap** element is optional but can be useful to determine if the app was launched from the Copilot hardware key.
105105

106106
```xml
107107
<!-- Package.appxmanifest -->
@@ -115,8 +115,9 @@ Inside of the **uap3:AppExtension** element, add a [uap3:Properties](/uwp/schema
115115
Description="App description"
116116
PublicFolder="Public">
117117
<uap3:Properties>
118-
<PressAndHoldStart>myapp-copilothotkey:?state=Down</PressAndHoldStart>
119-
<PressAndHoldStop>myapp-copilothotkey:?state=Up</PressAndHoldStop>
118+
<SingleTap>myapp-copilothotkey://?state=Tap</SingleTap>
119+
<PressAndHoldStart>myapp-copilothotkey://?state=Down</PressAndHoldStart>
120+
<PressAndHoldStop>myapp-copilothotkey:?//state=Up</PressAndHoldStop>
120121
</uap3:Properties>
121122
</ uap3:AppExtension>
122123
</uap3:Extension>
@@ -168,7 +169,7 @@ To add support for fast path invocation, update the "com.microsoft.windows.copil
168169
Description="App description"
169170
PublicFolder="Public">
170171
<uap3:Properties>
171-
<SingleTap MessageWParam="0"/>
172+
<SingleTap MessageWParam="0">myapp-copilothotkey://?state=Tap</SingleTap>
172173
<PressAndHoldStart MessageWParam="1">myapp-copilothotkey://?state=Down</PressAndHoldStart>
173174
<PressAndHoldStop MessageWParam="2">myapp-copilothotkey://?state=Up</PressAndHoldStop>
174175
</uap3:Properties>

0 commit comments

Comments
 (0)