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
Copy file name to clipboardExpand all lines: applications/nrf_desktop/doc/hid_state.rst
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,11 +119,14 @@ Report expiration
119
119
=================
120
120
121
121
With the :ref:`CONFIG_DESKTOP_HID_REPORT_EXPIRATION <config_desktop_app_options>` Kconfig option, you can set the amount of time after which a key will be considered expired.
122
-
The higher the value, the longer the period after which the nRF Desktop application will recall pressed keys when the connection is established.
122
+
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.
123
123
124
124
Queue event size
125
125
================
126
126
127
+
The module selects the :ref:`CONFIG_DESKTOP_HID_EVENTQ <config_desktop_app_options>` Kconfig option to enable the :ref:`nrf_desktop_hid_eventq`.
128
+
The utility is used to temporarily queue key state changes (presses and releases) before the connection with the HID host is established.
129
+
127
130
With the :ref:`CONFIG_DESKTOP_HID_EVENT_QUEUE_SIZE <config_desktop_app_options>` Kconfig option, you can set the number of elements on the queue where the keys are stored before the connection is established.
128
131
When a key state changes (it is pressed or released) before the connection is established, an element containing this key's usage is pushed onto the queue.
129
132
If there is no space in the queue, the oldest element is released.
@@ -147,7 +150,6 @@ For the routing mechanism to work, the module performs the following operations:
147
150
148
151
Apart from the routing mechanism, the module is also responsible for `Handling HID keyboard LED state`_.
149
152
150
-
151
153
Linking input data with the right HID report
152
154
============================================
153
155
@@ -187,7 +189,7 @@ This structure is part of the application configuration files for the specific b
187
189
Once the mapping is obtained, the application checks if the report to which the usage belongs is connected:
188
190
189
191
* 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.
190
-
* If the report is not connected, the value is stored in the ``eventq`` event queue member of the same structure.
192
+
* If the report is not connected, the value is stored in the :ref:`nrf_desktop_hid_eventq` instance in the same structure.
191
193
192
194
The difference between these operations is that storing value onto the queue (second case) preserves the order of input events.
193
195
See the following section for more information about storing data before the connection.
@@ -200,9 +202,9 @@ The storing approach before the connection depends on the data type:
200
202
* The relative value data is not stored outside of the connection period.
201
203
* The absolute value data is stored before the connection.
202
204
203
-
The reason for this operation is to allow to track key presses that happen right after the device is woken up, but before it is able to connect to the host.
205
+
The reason for this operation is to allow to track key presses that happen right after the device is woken up, but before it is able to connect to the HID host.
204
206
205
-
When the device is disconnected and the input event with the absolute value data is received, the data is stored onto the event queue (``eventq``), a member of :c:struct:`report_data` structure.
207
+
When the device is disconnected and the input event with the absolute value data is received, the data is stored onto the :ref:`nrf_desktop_hid_eventq` instance, a member of :c:struct:`report_data` structure.
206
208
This queue preserves an order at which input data events are received.
207
209
208
210
Storing limitations
@@ -237,7 +239,7 @@ The |hid_state| tracks the state of modules that forward the HID data to a HID h
237
239
The |hid_state| refers collectively to all transports as *subscribers*.
238
240
When the connection to the host is indicated by this event, the |hid_state| will create a subscriber associated with the transport.
239
241
Each subscriber reports its priority as part of the :c:struct:`hid_report_subscriber_event`.
240
-
The subscriber priority must be unique, that mean two or more subscriber cannot share the same priority value.
242
+
The subscriber priority must be unique, that mean two or more subscribers cannot share the same priority value.
241
243
242
244
By default, the subscriber that is associated with USB has priority over any Bluetooth LE peer subscriber.
243
245
As a result, when the host connected through the USB subscribes for a HID report, the HID report will be routed to the USB.
Copy file name to clipboardExpand all lines: doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -243,6 +243,8 @@ nRF Desktop
243
243
* Use generic callbacks to handle HID feature and output reports.
244
244
245
245
This approach simplifies the process of adding support for new HID reports.
246
+
* The :ref:`nrf_desktop_hid_state` to use the :ref:`nrf_desktop_hid_eventq` to temporarily queue HID events related to keypresses before connection to the HID host is established.
247
+
The feature was implemented directly in HID state module before.
246
248
247
249
* The default value of the :kconfig:option:`CONFIG_APP_EVENT_MANAGER_MAX_EVENT_CNT` Kconfig option to ``64``.
248
250
This ensures that more complex configurations fit in the limit.
0 commit comments