Skip to content

Commit 458e047

Browse files
committed
Fixing remaining PR review comments
1 parent fb56c96 commit 458e047

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ In addition to URI activation, apps can register to support fast path invocation
156156

157157
### Update the app manifest file to support fast path invocation
158158

159-
To add support for fast path invocation, update the "com.microsoft.windows.copilotkeyprovider" extension to add the *MessageWParam* attribute to the **SingleTap**, **PressAndHoldStart**, and **PressAndHoldStop** elements. Each *MessageWParam* value must be a unique 32-bit integer, but the values used are chosen by the app. This example uses values of 0, 1, and 2, respectively. These values will be used later in the example to determine the current pressed state of the Windows Copilot hardware key.
159+
To add support for fast path invocation, update the "com.microsoft.windows.copilotkeyprovider" extension to add the *MessageWParam* attribute to the **SingleTap**, **PressAndHoldStart**, and **PressAndHoldStop** elements. Each *MessageWParam* value must be a unique 32-bit integer, but the values used are chosen by the app. This example uses values of 0, 1, and 2, respectively. These values will be used later in the example when they are passed in the *wParam* parameter of a Windows message to determine the current pressed state of the Windows Copilot hardware key.
160160

161161
```xml
162162
<!-- Package.appxmanifest -->
@@ -194,7 +194,7 @@ After the package is installed, add a new text file in your project directory an
194194

195195
Next we will update the **MainWindow** class to register the window to receive fastpath invocations from the Copilot hardware key.
196196

197-
First, call [GetWindowHandle](/windows/windows-app-sdk/api/win32/microsoft.ui.xaml.window/nf-microsoft-ui-xaml-window-iwindownative-get_windowhandle) to get an [HWND](/windows/win32/winprog/windows-data-types) handle to the **MainWindow**. Call [SHGetPropertyStoreForWindow](/windows/win32/api/shellapi/nf-shellapi-shgetpropertystoreforwindow) to get the **IPropertyStore** for the window. Create a new [PROPERTYKEY](/windows/win32/api/wtypes/ns-wtypes-propertykey) and set the *fmtid* member to the GUID for Windows Copilot fastpath activation. Set the value of the property to an app-defined value, that will be passed back to the app from the system when the hardware key state changes. Call [SetValue](/windows/win32/api/propsys/nf-propsys-ipropertystore-setvalue).
197+
First, call [GetWindowHandle](/windows/windows-app-sdk/api/win32/microsoft.ui.xaml.window/nf-microsoft-ui-xaml-window-iwindownative-get_windowhandle) to get an [HWND](/windows/win32/winprog/windows-data-types) handle to the **MainWindow**. Call [SHGetPropertyStoreForWindow](/windows/win32/api/shellapi/nf-shellapi-shgetpropertystoreforwindow) to get the **IPropertyStore** for the window. Create a new [PROPERTYKEY](/windows/win32/api/wtypes/ns-wtypes-propertykey) and set the *fmtid* member to the GUID for Windows Copilot fastpath activation. Set the value of the property to an app-defined value, that will be passed back to the app from the system when the hardware key state changes. The app-defined value is the windows message ID which must be in the WM_APP range. For more information, see [WM_APP](https://learn.microsoft.com/en-us/windows/win32/winmsg/wm-app). Call [SetValue](/windows/win32/api/propsys/nf-propsys-ipropertystore-setvalue) and then call [Commit](/windows/win32/api/propsys/nf-propsys-ipropertystore-commit) to commit the change to the property store.
198198

199199
Finally, create a [SUBCLASSPROC](/windows/win32/api/commctrl/nc-commctrl-subclassproc) callback that will be called when the hardware key state changes. **WindowSubClass** is the callback implementation that will be shown in the next step. Call [SetWindowSubclass](/windows/win32/api/commctrl/nf-commctrl-setwindowsubclass) to register the callback.
200200

0 commit comments

Comments
 (0)