You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
applications: nrf_desktop: Update HID state module doc
Change updates HID state module documentation to inform about keys state
utility integration.
Jira: NCSDK-33999
Signed-off-by: Marek Pieta <[email protected]>
Signed-off-by: Divya Pillai <[email protected]>
Copy file name to clipboardExpand all lines: applications/nrf_desktop/doc/hid_state.rst
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,6 +107,12 @@ Report expiration
107
107
With the :ref:`CONFIG_DESKTOP_HID_REPORT_EXPIRATION <config_desktop_app_options>` Kconfig option, you can set the amount of time after which a queued key will be considered expired.
108
108
The higher the value, the longer the period from which the nRF Desktop application will recall pressed keys when the connection with HID host is established.
109
109
110
+
Handling keys state
111
+
===================
112
+
113
+
The module selects the :ref:`CONFIG_DESKTOP_KEYS_STATE <config_desktop_app_options>` Kconfig option to enable the :ref:`nrf_desktop_keys_state`.
114
+
The utility is used to track the state of active keys after the connection with the HID host is established.
115
+
110
116
Implementation details
111
117
**********************
112
118
@@ -163,7 +169,7 @@ This is done by obtaining the key mapping from the :ref:`nrf_desktop_hid_keymap`
163
169
164
170
Once the mapping is obtained, the application checks if the report to which the usage belongs is connected:
165
171
166
-
* If the report is connected, the value is stored at the right position in the ``items`` member of :c:struct:`report_data` associated with the report.
172
+
* If the report is connected, the :ref:`nrf_desktop_keys_state` instance is used to track the state of active keys associated with a given HID report.
167
173
* If the report is not connected, the value is stored in the :ref:`nrf_desktop_hid_eventq` instance in the same structure.
168
174
169
175
The difference between these operations is that storing value onto the queue (second case) preserves the order of input events.
0 commit comments