<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>HID customer application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/40470/hid-customer-application</link><description>Hi 
 I was trying to do the page up and down key, I just built it successfully but it is no response. 
 Could anyone find out the reason for me. 
 I appreciate for your assistance.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 28 Mar 2019 02:44:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/40470/hid-customer-application" /><item><title>RE: HID customer application</title><link>https://devzone.nordicsemi.com/thread/178818?ContentTypeID=1</link><pubDate>Thu, 28 Mar 2019 02:44:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0245a17d-26bb-46f9-b01f-3ec0d9cc04e7</guid><dc:creator>CY</dc:creator><description>&lt;p&gt;Hi Hakon,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry for the late response.&lt;/p&gt;
&lt;p&gt;It did work.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I appreciate your great support.&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Wedy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID customer application</title><link>https://devzone.nordicsemi.com/thread/175842?ContentTypeID=1</link><pubDate>Wed, 13 Mar 2019 08:42:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12147e50-7b79-4025-8bcc-c68b75106e97</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Its hard to say what can be the issue without seeing a sniffer trace and/or having the full project to test with.&lt;/p&gt;
&lt;p&gt;How are you sending this data from the firmware side?&lt;/p&gt;
&lt;p&gt;To send a command, I would recommend that you create a function instead of using &amp;quot;send_keys()&amp;quot; in the untouched ble_app_hids_keyboard, similar to this one:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/Rallare/nrf51_ble_app_hids_kbd_consumercontrol/blob/SDK15/main.c#L1243"&gt;https://github.com/Rallare/nrf51_ble_app_hids_kbd_consumercontrol/blob/SDK15/main.c#L1243&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID customer application</title><link>https://devzone.nordicsemi.com/thread/175500?ContentTypeID=1</link><pubDate>Tue, 12 Mar 2019 00:55:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd02e98c-f285-44c4-a9ef-89f601d19cc1</guid><dc:creator>Wedy Hsiao</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Somehow I could not set up the sniffer, but I did try to use the keyboard viewer again. And It has record the event for not expectation action like below:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="377" src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Error_5F00_HID.JPG" width="369" /&gt;&lt;/p&gt;
&lt;p&gt;Some time it will show the command like below: D, C&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1552351892266v4.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;According to the result, I would like to know whether there is any set for the HID application in the initial project from SDK.&lt;/p&gt;
&lt;p&gt;I am afraid there is some unknown setting for the HID sample, since I cannot find the root cause in my program.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I appreciate your great support.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Wedy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID customer application</title><link>https://devzone.nordicsemi.com/thread/168266?ContentTypeID=1</link><pubDate>Mon, 28 Jan 2019 13:54:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3ed5f0f-0466-4898-bad8-4926eb34b004</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Wedy,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for the explanation. I think a sniffer trace should show more information here. I suspect that there&amp;#39;s some keys that will be missed if the window for the keyboard viewer is out-of-focus.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID customer application</title><link>https://devzone.nordicsemi.com/thread/168120?ContentTypeID=1</link><pubDate>Mon, 28 Jan 2019 04:19:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a41bd57-b89f-48cf-af2b-729b5fedcafc</guid><dc:creator>CY</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;To answer the first question, as you see the video you can see that the &amp;quot;file folder&amp;quot; and the &amp;quot;outlook&amp;quot; will be opened in spite of there just commanded the Key &amp;quot;LeftWindow&amp;quot; showed in the software, but the command was send as WIN+F20 (130) / WIN+F19 (129) / WIN+F18 (128). When I did the second time to trigger the event it becomes normal.&lt;/p&gt;
&lt;p&gt;I will try to used sniffer to trace later, I need some time to be familiar with the tool.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;Wedy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID customer application</title><link>https://devzone.nordicsemi.com/thread/167952?ContentTypeID=1</link><pubDate>Fri, 25 Jan 2019 13:50:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7264f5d5-2a96-40a8-80fc-333f44234734</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Wedy,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Which command are you referring to? Is it the &amp;quot;130&amp;quot; one that isn&amp;#39;t supposed to be sent? Or is it one of the programs opening that is unwanted?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you perform a sniffer trace to see what is actually going over the bluetooth link? You can use the nRF sniffer to perform this (remember to re-pair again so that it is able to follow the encryption process).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID customer application</title><link>https://devzone.nordicsemi.com/thread/167794?ContentTypeID=1</link><pubDate>Fri, 25 Jan 2019 03:39:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ba91c78-cf4e-43f2-97c6-6f2d1b7c7868</guid><dc:creator>CY</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;It is OK. Thank you for your suggestion.&lt;/p&gt;
&lt;p&gt;Actually, there is one more thing I would like to ask that I just noticed yesterday.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.dropbox.com/s/mpuegwjyfrx72a8/Record_2019_01_25_11_24_05_186.mp4?dl=0"&gt;www.dropbox.com/.../Record_2019_01_25_11_24_05_186.mp4&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As you see in the video, whenever I just do the first operation of each event after connecting there will always show something else. After I trigger the each event for the first time, it won&amp;#39;t happened.&lt;/p&gt;
&lt;p&gt;Do you have any idea with this?&lt;/p&gt;
&lt;p&gt;Frankly speaking, event I did not use the combined key, it will show something else for the first time trigger as well.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Wedy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID customer application</title><link>https://devzone.nordicsemi.com/thread/167581?ContentTypeID=1</link><pubDate>Thu, 24 Jan 2019 09:59:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5b18e40-2a2e-44d8-b4a0-b2b16a145c08</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;I am sorry, but I cannot answer this. I unfortunately do not know. You could try contacting microsoft via their development forums to ask about this specific feature.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID customer application</title><link>https://devzone.nordicsemi.com/thread/167572?ContentTypeID=1</link><pubDate>Thu, 24 Jan 2019 09:33:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5331f798-2e67-4765-831e-56b4abc2bd15</guid><dc:creator>CY</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;Thank you for your reply.&lt;/p&gt;
&lt;p&gt;I will try it.&lt;/p&gt;
&lt;p&gt;BTW, I would like to let you know the information below:&lt;/p&gt;
&lt;p&gt;The computer I used to test was ThinkPad Win10 1803, which I met the FnLock problem. When I switch back to the FnLock it worked properly in both condition. Thus I just did the unlock again then it worked. However, I used surface pen to test, there was no issue like this even it is the first time to link.&lt;/p&gt;
&lt;p&gt;Do you have any opinion with this?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Wedy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID customer application</title><link>https://devzone.nordicsemi.com/thread/167558?ContentTypeID=1</link><pubDate>Thu, 24 Jan 2019 08:50:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c734d681-9202-416f-8c98-9488b90678af</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have not seen this behavior before, but it seems like other people have run into this as well.&lt;/p&gt;
&lt;p&gt;There&amp;#39;s a thread here on arduino that I found:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://forum.arduino.cc/index.php?topic=324554.0"&gt;http://forum.arduino.cc/index.php?topic=324554.0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am not sure why, but it seems that the usage for the specific command is offset. In arduino&amp;#39;s code base (keyboard.h), its F18 is defined as 0xF5 (0x6d + 0x88):&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/arduino-libraries/Keyboard/blob/master/src/Keyboard.h#L78"&gt;https://github.com/arduino-libraries/Keyboard/blob/master/src/Keyboard.h#L78&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you try this and see how that works? You&amp;#39;ll need to expand the usage max and logical max in the usb descriptor again to try this.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID customer application</title><link>https://devzone.nordicsemi.com/thread/167506?ContentTypeID=1</link><pubDate>Thu, 24 Jan 2019 02:10:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74fa5468-e908-44f8-9b11-44347f544407</guid><dc:creator>CY</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;Sure.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static uint8_t                     report_map_data[] =
    {
        0x05, 0x01,       // Usage Page (Generic Desktop)
        0x09, 0x06,       // Usage (Keyboard)
        0xA1, 0x01,       // Collection (Application)
        0x05, 0x07,       // Usage Page (Key Codes)
        0x19, 0xe0,       // Usage Minimum (224)
        0x29, 0xe7,       // Usage Maximum (231)
        0x15, 0x00,       // Logical Minimum (0)
        0x25, 0x01,       // Logical Maximum (1)
        0x75, 0x01,       // Report Size (1)
        0x95, 0x08,       // Report Count (8)
        0x81, 0x02,       // Input (Data, Variable, Absolute)

        0x95, 0x01,       // Report Count (1)
        0x75, 0x08,       // Report Size (8)
        0x81, 0x01,       // Input (Constant) reserved byte(1)

        0x95, 0x05,       // Report Count (5)
        0x75, 0x01,       // Report Size (1)
        0x05, 0x08,       // Usage Page (Page# for LEDs)
        0x19, 0x01,       // Usage Minimum (1)
        0x29, 0x05,       // Usage Maximum (5)
        0x91, 0x02,       // Output (Data, Variable, Absolute), Led report
        0x95, 0x01,       // Report Count (1)
        0x75, 0x03,       // Report Size (3)
        0x91, 0x01,       // Output (Data, Variable, Absolute), Led report padding

        0x95, 0x06,       // Report Count (6)
        0x75, 0x08,       // Report Size (8)
        0x15, 0x00,       // Logical Minimum (0)
        
        //0x25, 0x65,       // Logical Maximum (101)
        //Wedy test to change
        0x25, 0x6F,
        
        0x05, 0x07,       // Usage Page (Key codes)
        0x19, 0x00,       // Usage Minimum (0)
        
        //0x29, 0x65,       // Usage Maximum (101)
        //Wedy test to change
        0x29, 0x6F,
        
        0x81, 0x00,       // Input (Data, Array) Key array(6 bytes)

        0x09, 0x05,       // Usage (Vendor Defined)
        0x15, 0x00,       // Logical Minimum (0)
        0x26, 0xFF, 0x00, // Logical Maximum (255)
        0x75, 0x08,       // Report Size (8 bit)
        0x95, 0x02,       // Report Count (2)
        0xB1, 0x02,       // Feature (Data, Variable, Absolute)

        0xC0              // End Collection (Application)
    };&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BTW, I just found out the reason why I can not send the F18 (105) description.&lt;/p&gt;
&lt;p&gt;Because of the keyboard on the laptop that FnLock.&lt;/p&gt;
&lt;p&gt;I just can do the WIN+F18 Function now, like below:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1548301736048v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Here comes the question:&lt;/p&gt;
&lt;p&gt;How can I ensure to disable the FnLock whenever I use my device without setting the keyboard.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for spend your time to deal with this matter.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Sincerely,&lt;/p&gt;
&lt;p&gt;Wedy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID customer application</title><link>https://devzone.nordicsemi.com/thread/167340?ContentTypeID=1</link><pubDate>Wed, 23 Jan 2019 11:00:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d0da128-aaf3-4d08-b6ae-74a4d19b102c</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Could you share your current descriptor?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID customer application</title><link>https://devzone.nordicsemi.com/thread/167023?ContentTypeID=1</link><pubDate>Tue, 22 Jan 2019 08:56:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e744f691-32e6-450e-98ab-1275b7d5ee8b</guid><dc:creator>CY</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;Yes, I did change the USB descriptor that you mentioned before.&lt;/p&gt;
&lt;p&gt;The picture shows the result I tried:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1548147289510v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;It still shows the response of Left Windows only.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Wedy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID customer application</title><link>https://devzone.nordicsemi.com/thread/167015?ContentTypeID=1</link><pubDate>Tue, 22 Jan 2019 08:30:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75470676-f938-47d2-add9-da96bc547c8e</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Wedy,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Happy new year to you as well!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When switching over to SDK 15, did you alter the USB descriptor in any way?&lt;/p&gt;
&lt;p&gt;It is important that you extend the Logical Maximum and Usage Maximum to reflect the data you&amp;#39;re sending, shown here in lines 666 and 669:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/Rallare/nrf51_ble_app_hids_kbd_consumercontrol/blob/SDK15/main.c#L666"&gt;https://github.com/Rallare/nrf51_ble_app_hids_kbd_consumercontrol/blob/SDK15/main.c#L666&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you are sending 0x6d (109 dec), your usage and logical maximum must be equal or larger.&lt;/p&gt;
&lt;p&gt;Could you verify if this is set in the descriptor?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID customer application</title><link>https://devzone.nordicsemi.com/thread/167001?ContentTypeID=1</link><pubDate>Tue, 22 Jan 2019 06:46:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1abb9d7d-12c6-49d4-898c-27b2e8dff889</guid><dc:creator>CY</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;Happy new year~&lt;/p&gt;
&lt;p&gt;Since a while I have tried to program the code, it still doesn&amp;#39;t work properly.&lt;/p&gt;
&lt;p&gt;The main function I would like to develop is like Windows Pen.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-designs"&gt;https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-designs&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1548139152032v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;Actually, I just test with surface pen and get some information by the tool &amp;quot;Keyboard Message&amp;quot; :&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1548139130265v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;The method I tried is like below:&lt;/p&gt;
&lt;p&gt;static uint8_t PRESS_HOLD[8] = {0,0,0x6D,0,0,0,0,0}; //Win+F18&lt;/p&gt;
&lt;p&gt;static uint8_t CLEAR_CLICK[8] = {0,0,0,0,0,0,0,0}; //Null&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void bsp_event_handler(bsp_event_t event)
{
    uint32_t         err_code;
    static uint8_t * p_key = 0;
    static uint8_t   size  = 0;

    switch (event)
    {
        case BSP_EVENT_SLEEP:
            sleep_mode_enter();
            break;

        case BSP_EVENT_DISCONNECT:
            err_code = sd_ble_gap_disconnect(m_conn_handle,
                                             BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
            if (err_code != NRF_ERROR_INVALID_STATE)
            {
                APP_ERROR_CHECK(err_code);
            }
            break;

        case BSP_EVENT_WHITELIST_OFF:
            if (m_conn_handle == BLE_CONN_HANDLE_INVALID)
            {
                err_code = ble_advertising_restart_without_whitelist(&amp;amp;m_advertising);
                if (err_code != NRF_ERROR_INVALID_STATE)
                {
                    APP_ERROR_CHECK(err_code);
                }
            }
            break;
        
        case BSP_EVENT_KEY_1:
          
            if (m_conn_handle != BLE_CONN_HANDLE_INVALID)
            {
              press_hold();
            }
            break;

        default:
            break;
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void press_hold (void)
{
    uint32_t         err_code;
    static uint8_t * p_key = 0;
    static uint8_t   size  = 0;
    keys_send(8, p_key);
    p_key=PRESS_HOLD;
    keys_send(8, p_key);
    p_key=CLEAR_CLICK;
}&lt;/pre&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;static uint32_t send_key_scan_press_release(ble_hids_t * p_hids,
                                            uint8_t    * p_key_pattern,
                                            uint16_t     pattern_len,
                                            uint16_t     pattern_offset,
                                            uint16_t   * p_actual_len)
{
    ret_code_t err_code;
    uint16_t offset;
    uint16_t data_len;
    uint8_t  data[INPUT_REPORT_KEYS_MAX_LEN];

    // HID Report Descriptor enumerates an array of size 6, the pattern hence shall not be any
    // longer than this.
    STATIC_ASSERT((INPUT_REPORT_KEYS_MAX_LEN - 2) == 6);

    ASSERT(pattern_len &amp;lt;= (INPUT_REPORT_KEYS_MAX_LEN - 2));

    offset   = pattern_offset;
    data_len = pattern_len;

    do
    {
        // Reset the data buffer.
        memset(data, 0, sizeof(data));

        // Copy the scan code.
        memcpy(data + SCAN_CODE_POS + offset, p_key_pattern + offset, data_len - offset);

        if (bsp_button_is_pressed(WINDOW_BUTTON_ID))
        {
            data[MODIFIER_KEY_POS] |= WINDOW_KEY_CODE;
        }

        if (!m_in_boot_mode)
        {
            err_code = ble_hids_inp_rep_send(p_hids,
                                             INPUT_REPORT_KEYS_INDEX,
                                             INPUT_REPORT_KEYS_MAX_LEN,
                                             data,
                                             m_conn_handle);
        }
        else
        {
            err_code = ble_hids_boot_kb_inp_rep_send(p_hids,
                                                     INPUT_REPORT_KEYS_MAX_LEN,
                                                     data,
                                                     m_conn_handle);
        }

        if (err_code != NRF_SUCCESS)
        {
            break;
        }

        offset++;
    }
    while (offset &amp;lt;= data_len);

    *p_actual_len = offset;

    return err_code;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It was not worked properly.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Do you have any suggestion with this topic?&lt;/p&gt;
&lt;p&gt;If I would like to control the button event, should I still need to use app_button as the reference?&lt;/p&gt;
&lt;p&gt;Is the below protocol I tried is correct?&lt;/p&gt;
&lt;p&gt;i. &amp;ldquo;Win&amp;rdquo; + &amp;ldquo;F18&amp;rdquo; (raw data: 08 00 6D 00 00 00 00 00)&lt;br /&gt;ii. Release &amp;ldquo;F18&amp;rdquo; (raw data: 08 00 00 00 00 00 00 00)&lt;br /&gt;iii. Release &amp;ldquo;Win&amp;rdquo; (raw data: 00 00 00 00 00 00 00 00)&lt;/p&gt;
&lt;p&gt;BTW, I just change the SDK from V11 to V15.2 in order to get the swift pair function.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID customer application</title><link>https://devzone.nordicsemi.com/thread/163365?ContentTypeID=1</link><pubDate>Wed, 02 Jan 2019 09:05:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b1bb669-48c6-497e-aa95-cc10d1fd195c</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Wedy,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am very sorry for the late reply.&lt;/p&gt;
&lt;p&gt;These are hard-coded bit mapped commands, where the first bit is directly mapped to &amp;quot;Play&amp;quot;.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the enum:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;typedef enum
{
    RELEASE_KEY                     = 0x00,
    CONSUMER_CTRL_PLAY              = 0x01,
    CONSUMER_CTRL_ALCCC             = 0x02,
    CONSUMER_CTRL_SCAN_NEXT_TRACK   = 0x04,
    CONSUMER_CTRL_SCAN_PREV_TRACK   = 0x08,
    CONSUMER_CTRL_VOL_DW            = 0x10,
    CONSUMER_CTRL_VOL_UP            = 0x20,
    CONSUMER_CTRL_AC_FORWARD        = 0x40,
    CONSUMER_CTRL_AC_BACK           = 0x80,    
} consumer_control_t;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Which is directly derived from the descriptor:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;        0xA1, 0x01,                     // Collection (Application)
        0x85, 0x02,                     //     Report Id (2)
        0x15, 0x00,                     //     Logical minimum (0)
        0x25, 0x01,                     //     Logical maximum (1)
        0x75, 0x01,                     //     Report Size (1)
        0x95, 0x01,                     //     Report Count (1)

        0x09, 0xCD,                     //     Usage (Play/Pause)
        0x81, 0x02,                     //     Input (Data,Value,Relative,Bit Field)
        0x0A, 0x83, 0x01,               //     Usage (AL Consumer Control Configuration)
        0x81, 0x02,                     //     Input (Data,Value,Relative,Bit Field)
        0x09, 0xB5,                     //     Usage (Scan Next Track)
        0x81, 0x02,                     //     Input (Data,Value,Relative,Bit Field)
        0x09, 0xB6,                     //     Usage (Scan Previous Track)
        0x81, 0x02,                     //     Input (Data,Value,Relative,Bit Field)

        0x09, 0xEA,                     //     Usage (Volume Down)
        0x81, 0x02,                     //     Input (Data,Value,Relative,Bit Field)
        0x09, 0xE9,                     //     Usage (Volume Up)
        0x81, 0x02,                     //     Input (Data,Value,Relative,Bit Field)
        0x0A, 0x25, 0x02,               //     Usage (AC Forward)
        0x81, 0x02,                     //     Input (Data,Value,Relative,Bit Field)
        0x0A, 0x24, 0x02,               //     Usage (AC Back)
        0x81, 0x02,                     //     Input (Data,Value,Relative,Bit Field)
        0xC0,                           // End Collection&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;By changing the first command 0xCD (Play/Pause) to anything else, the enum corresponding to bit 0 (CONSUMER_CTRL_PLAY) will also change behavior.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When specifying a ReportID, you can choose any unused number between 1 and 255 (0 is reserved).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID customer application</title><link>https://devzone.nordicsemi.com/thread/162218?ContentTypeID=1</link><pubDate>Tue, 18 Dec 2018 08:39:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12f9f7b7-7ddc-46f1-a760-2a7144faa037</guid><dc:creator>CY</dc:creator><description>&lt;p&gt;Hi Hakan,&lt;/p&gt;
&lt;p&gt;Sorry for disturbing.&lt;/p&gt;
&lt;p&gt;As your explanation of the report, I could understand in &amp;quot;left windows key&amp;quot; case.&lt;/p&gt;
&lt;p&gt;But there comes another question.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1545122035819v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;It is the original part of the consumer control sample code.&lt;/p&gt;
&lt;p&gt;The Logical max/min is 0/1, but there is 0xCD to 0xE9, however, there also show the command as consumer_control_t. How it can work?&lt;/p&gt;
&lt;p&gt;Moreover, I would like to know the number of report ID is specific for consumer or we can identified by our-self?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Wedy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID customer application</title><link>https://devzone.nordicsemi.com/thread/162009?ContentTypeID=1</link><pubDate>Mon, 17 Dec 2018 09:18:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d5b13e8-478b-44a8-ad23-0f88b564c4ab</guid><dc:creator>CY</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I will try to figure it out.&lt;/p&gt;
&lt;p&gt;At this moment, I would like to know it will influence the consumer control?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/**@brief Function for handling button events.
 *
 * @param[in]   pin_no   The pin number of the button pressed.
 */
static void button_event_handler(uint8_t pin_no, uint8_t button_action)
{
    if (button_action == APP_BUTTON_PUSH)
    {
        switch (pin_no)
        {
            case KEY_PRESS_BUTTON_PIN_NO:
            {
                APP_ERROR_CHECK(hid_kbd_send_string());
                break;
            }
            case VOLDOWN_BUTTON:
                APP_ERROR_CHECK(consumer_control_send(CONSUMER_CTRL_VOL_DW));
                break;
            case VOLUP_BUTTON:
                APP_ERROR_CHECK(consumer_control_send(CONSUMER_CTRL_VOL_UP));
                break;
            //12/14 Wedy add for functional key
           /* case FUNCTION_BUTTON:
                APP_ERROR_CHECK(function_control_send(FUNCTION_F01));
                break;*/
            default:
                APP_ERROR_HANDLER(pin_no);
                break;
        }
    }
    else if (button_action == APP_BUTTON_RELEASE)
    {
        switch (pin_no)
        {
            case VOLDOWN_BUTTON:
            /* Fall-through */
            case VOLUP_BUTTON:
                APP_ERROR_CHECK(consumer_control_send(RELEASE_KEY)); 
                break;
            case KEY_PRESS_BUTTON_PIN_NO:    
                APP_ERROR_CHECK(hid_kbd_send_release());
                break;
            //12/14 Wedy add for functional key
           /* case FUNCTION_BUTTON:
                APP_ERROR_CHECK(function_control_send(LIFT_KEY)); 
                break;*/
            default:
                APP_ERROR_HANDLER(pin_no);
                break;
        }
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Even I block this part the consumer control cannot work?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID customer application</title><link>https://devzone.nordicsemi.com/thread/162006?ContentTypeID=1</link><pubDate>Mon, 17 Dec 2018 09:07:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:751115f5-1d2b-47eb-8e73-02c17fe89a8f</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A USB descriptor has limits, where in the case of the keyboard it has a usage min. set to 0, and a maximum to 101. See the fields LOGICAL_MINIMUM and MAXIMUM, and USAGE_MINIMUM and MAXIMUM.&lt;/p&gt;
&lt;p&gt;The &amp;quot;Left Windows Key&amp;quot; has a usage of 0xE3, which is 227 decimal, and that is defined in the first byte of the keyboard USB descriptor (which has a range of 224 - 231), meaning that if you set bit 3 (0x08), this button shall be triggered.&lt;/p&gt;
&lt;p&gt;In order to use F18 to F20 (Usage 0x6D to 0x6F), you need to expand the above mentioned usage min/max and logical min/max in report id 1, or add a new report id which includes these.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID customer application</title><link>https://devzone.nordicsemi.com/thread/162002?ContentTypeID=1</link><pubDate>Mon, 17 Dec 2018 08:53:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ff4a5ce-09a8-4030-b1f1-bf91e26173b1</guid><dc:creator>CY</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;Actually, I just could not test the code in present status because when I add the BUTTON_FUNCTION and the report id 3,&amp;nbsp;all of the functions are not worked properly. It is awkward, and I still try to find out the reason.&lt;/p&gt;
&lt;p&gt;What is&amp;nbsp; &amp;quot;&lt;span&gt;&amp;nbsp;report-id 3 (0x3A command atleast) in the generic keyboard endpoint.&amp;quot; really means in the code? And if I use the F18-F20 in the report id 1 is that possible I can add the modifier WIN?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt; //12/14 Wedy add for functional key
        0x05, 0x01,         // Usage Page (Generic Desktop)
        0x09, 0x06,         // Usage (Keyboard)
        0xa1, 0x01,         // Collection: (Application)
	    0x85, 0x03,         // Report ID(3)  
        0x05, 0x07,         // Usage Page (Key Codes)
        0x09, 0x3A,         // USAGE(F01 Key)
        0x09, 0x6D,         // USAGE(F18 Key)
	    0x09, 0x6E,         // USAGE(F19 Key)
	    0x09, 0x6F,         // USAGE(F20 Key)
	    0x09, 0xe3,         // USAGE(Left Windows Key)
	    0x15, 0x00,         // LOGICAL_MINIMUM(0)
	    0x25, 0x01,         // LOGICAL_MAXIMUM(1)
	    0x75, 0x01,         // REPORT_SIZE(1)
	    0x95, 0x03,         // REPORT_COUNT(3)
	    0x81, 0x02,         // INPUT (Data, Var, Abs)
	    0x95, 0x05,         // REPORT_COUNT(5)
	    0x81, 0x03,         // INPUT(Cnst, Var, Abs)
        0xc0                //  End Collection -&amp;gt;41byte&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;How to call F1 and WIN from report map at the same time? (WIN+F1)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID customer application</title><link>https://devzone.nordicsemi.com/thread/161999?ContentTypeID=1</link><pubDate>Mon, 17 Dec 2018 08:39:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb9e9915-1cad-41ac-8414-79c57f7b6733</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Wedy,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When this last worked, what was the command that you sent at that point?&lt;/p&gt;
&lt;p&gt;You should be able to send the information in report-id 3 (0x3A command atleast) in the generic keyboard endpoint.&lt;/p&gt;
&lt;p&gt;F18 to F20 commands are outside of the logical and usage maximum (101) set in report id 1.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID customer application</title><link>https://devzone.nordicsemi.com/thread/161822?ContentTypeID=1</link><pubDate>Fri, 14 Dec 2018 09:16:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74396f78-e3f4-4d8e-ad99-1873e1d60837</guid><dc:creator>CY</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;OK, I will try to modified from the your suggestion.&lt;/p&gt;
&lt;p&gt;Actually I was trying to use the app_button to get the same performance like last time (WIN+F1).&lt;/p&gt;
&lt;p&gt;Below are the way I pattern the structure from the example you provide. Honestly, I have&amp;nbsp;no idea how to use the structure like these&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define OUTPUT_REPORT_INDEX              0                                              /**&amp;lt; Index of Output Report. */
#define OUTPUT_REPORT_MAX_LEN            1                                              /**&amp;lt; Maximum length of Output Report. */
#define INPUT_REPORT_KEYS_INDEX          0                                              /**&amp;lt; Index of Input Report. */
#define INPUT_CCONTROL_KEYS_INDEX		 1
#define OUTPUT_REPORT_BIT_MASK_CAPS_LOCK 0x02                                           /**&amp;lt; CAPS LOCK bit in Output Report (based on &amp;#39;LED Page (0x08)&amp;#39; of the Universal Serial Bus HID Usage Tables). */
#define INPUT_REP_REF_ID                 1                                              /**&amp;lt; Id of reference to Keyboard Input Report. */
#define INPUT_CC_REP_REF_ID				 2
#define OUTPUT_REP_REF_ID                0                                              /**&amp;lt; Id of reference to Keyboard Output Report. */
//12/14 Wedy add for functional button
#define INPUT_FUNCTION_KEY_INDEX         2
#define INPUT_FU_REP_REF_ID              3

#define MAX_BUFFER_ENTRIES               5                                              /**&amp;lt; Number of elements that can be enqueued */

#define BASE_USB_HID_SPEC_VERSION        0x0101                                         /**&amp;lt; Version number of base USB HID Specification implemented by this application. */

#define INPUT_REPORT_KEYS_MAX_LEN        8                                              /**&amp;lt; Maximum length of the Input Report characteristic. */
#define INPUT_CC_REPORT_KEYS_MAX_LEN	 1
//12/14 Wedy add for functional key
#define INPUT_FU_REPORT_KEYS_MAX_LEN	 1&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I have know idea why the typedef enum can indicate the relative function in the usage report&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;//12/14 Wedy add to test the functional key
typedef enum
{
    LIFT_KEY                        = 0x00,
    FUNCTION_F01                    = 0x01,
    FUNCTION_F18                    = 0x02,
    FUNCTION_F19                    = 0x04,
    FUNCTION_F20                    = 0x08,
    LEFT_WINDOW_KEY                 = 0x10,    
} function_control_t;

typedef enum
{
    RELEASE_KEY                     = 0x00,
    CONSUMER_CTRL_PLAY              = 0x01,
    CONSUMER_CTRL_ALCCC             = 0x02,
    CONSUMER_CTRL_SCAN_NEXT_TRACK   = 0x04,
    CONSUMER_CTRL_SCAN_PREV_TRACK   = 0x08,
    CONSUMER_CTRL_VOL_DW            = 0x10,
    CONSUMER_CTRL_VOL_UP            = 0x20,
    CONSUMER_CTRL_AC_FORWARD        = 0x40,
    CONSUMER_CTRL_AC_BACK           = 0x80,    
} consumer_control_t;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I hope I can use the same method to get achievement.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static uint8_t report_map_data[] =
    {
        0x05, 0x01,                 // Usage Page (Generic Desktop)
        0x09, 0x06,                 // Usage (Keyboard)
        0xA1, 0x01,                 // Collection (Application)
		0x85, 0x01,                     //     Report Id (1)
        0x05, 0x07,                 //     Usage Page (Key Codes)
        0x19, 0xe0,                 //     Usage Minimum (224)
        0x29, 0xe7,                 //     Usage Maximum (231)
        0x15, 0x00,                 //     Logical Minimum (0)
        0x25, 0x01,                 //     Logical Maximum (1)
        0x75, 0x01,                 //     Report Size (1)
        0x95, 0x08,                 //     Report Count (8)
        0x81, 0x02,                 //     Input (Data, Variable, Absolute)

        0x95, 0x01,                 //     Report Count (1)
        0x75, 0x08,                 //     Report Size (8)
        0x81, 0x01,                 //     Input (Constant) reserved byte(1)

        0x95, 0x05,                 //     Report Count (5)
        0x75, 0x01,                 //     Report Size (1)
        0x05, 0x08,                 //     Usage Page (Page# for LEDs)
        0x19, 0x01,                 //     Usage Minimum (1)
        0x29, 0x05,                 //     Usage Maximum (5)
        0x91, 0x02,                 //     Output (Data, Variable, Absolute), Led report
        0x95, 0x01,                 //     Report Count (1)
        0x75, 0x03,                 //     Report Size (3)
        0x91, 0x01,                 //     Output (Data, Variable, Absolute), Led report padding

        0x95, 0x06,                 //     Report Count (6)
        0x75, 0x08,                 //     Report Size (8)
        0x15, 0x00,                 //     Logical Minimum (0)
        0x25, 0x65,                 //     Logical Maximum (101)
        0x05, 0x07,                 //     Usage Page (Key codes)
        0x19, 0x00,                 //     Usage Minimum (0)
        0x29, 0x65,                 //     Usage Maximum (101)
        0x81, 0x00,                 //     Input (Data, Array) Key array(6 bytes)

        0x09, 0x05,                 //     Usage (Vendor Defined)
        0x15, 0x00,                 //     Logical Minimum (0)
        0x26, 0xFF, 0x00,           //     Logical Maximum (255)
        0x75, 0x08,                 //     Report Count (2)
        0x95, 0x02,                 //     Report Size (8 bit)
        0xB1, 0x02,                 //     Feature (Data, Variable, Absolute)
        0xC0,                       // End Collection (Application)
		
        // Report ID 2: Advanced buttons
        0x05, 0x0C,                     // Usage Page (Consumer)
        0x09, 0x01,                     // Usage (Consumer Control)
        0xA1, 0x01,                     // Collection (Application)
        0x85, 0x02,                     //     Report Id (2)
        0x15, 0x00,                     //     Logical minimum (0)
        0x25, 0x01,                     //     Logical maximum (1)
        0x75, 0x01,                     //     Report Size (1)
        0x95, 0x01,                     //     Report Count (1)

        0x09, 0xCD,                     //     Usage (Play/Pause)
        0x81, 0x02,                     //     Input (Data,Value,Relative,Bit Field)
        0x0A, 0x83, 0x01,               //     Usage (AL Consumer Control Configuration)
        0x81, 0x02,                     //     Input (Data,Value,Relative,Bit Field)
        0x09, 0xB5,                     //     Usage (Scan Next Track)
        0x81, 0x02,                     //     Input (Data,Value,Relative,Bit Field)
        0x09, 0xB6,                     //     Usage (Scan Previous Track)
        0x81, 0x02,                     //     Input (Data,Value,Relative,Bit Field)

        0x09, 0xEA,                     //     Usage (Volume Down)
        0x81, 0x02,                     //     Input (Data,Value,Relative,Bit Field)
        0x09, 0xE9,                     //     Usage (Volume Up)
        0x81, 0x02,                     //     Input (Data,Value,Relative,Bit Field)
        0x0A, 0x25, 0x02,               //     Usage (AC Forward)
        0x81, 0x02,                     //     Input (Data,Value,Relative,Bit Field)
        0x0A, 0x24, 0x02,               //     Usage (AC Back)
        0x81, 0x02,                     //     Input (Data,Value,Relative,Bit Field)
        0xC0,                           // End Collection

        //12/14 Wedy add for functional key
        0x05, 0x01,         // Usage Page (Generic Desktop)
        0x09, 0x06,         // Usage (Keyboard)
        0xa1, 0x01,         // Collection: (Application)
	    0x85, 0x03,         // Report ID(3)  
        0x05, 0x07,         // Usage Page (Key Codes)
        0x09, 0x3A,         // USAGE(F01 Key)
        0x09, 0x6D,         // USAGE(F18 Key)
	    0x09, 0x6E,         // USAGE(F19 Key)
	    0x09, 0x6F,         // USAGE(F20 Key)
	    0x09, 0xe3,         // USAGE(Left Windows Key)
	    0x15, 0x00,         // LOGICAL_MINIMUM(0)
	    0x25, 0x01,         // LOGICAL_MAXIMUM(1)
	    0x75, 0x01,         // REPORT_SIZE(1)
	    0x95, 0x03,         // REPORT_COUNT(3)
	    0x81, 0x02,         // INPUT (Data, Var, Abs)
	    0x95, 0x05,         // REPORT_COUNT(5)
	    0x81, 0x03,         // INPUT(Cnst, Var, Abs)
        0xc0                //  End Collection -&amp;gt;41byte
		};
		    // Initialize HID Service - keyboard descriptor input and output report
    p_input_report                      = &amp;amp;input_report_array[INPUT_REPORT_KEYS_INDEX];
    p_input_report-&amp;gt;max_len             = INPUT_REPORT_KEYS_MAX_LEN;
    p_input_report-&amp;gt;rep_ref.report_id   = INPUT_REP_REF_ID;
    p_input_report-&amp;gt;rep_ref.report_type = BLE_HIDS_REP_TYPE_INPUT;

    BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&amp;amp;p_input_report-&amp;gt;security_mode.cccd_write_perm);
    BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&amp;amp;p_input_report-&amp;gt;security_mode.read_perm);
    BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&amp;amp;p_input_report-&amp;gt;security_mode.write_perm);	
    p_output_report                      = &amp;amp;output_report_array[OUTPUT_REPORT_INDEX];
    p_output_report-&amp;gt;max_len             = OUTPUT_REPORT_MAX_LEN;
    p_output_report-&amp;gt;rep_ref.report_id   = OUTPUT_REP_REF_ID;
    p_output_report-&amp;gt;rep_ref.report_type = BLE_HIDS_REP_TYPE_OUTPUT;

	// 	Initialize HID Service - ConsumerControl
	
    // Initialize HID Service
    p_input_report                      = &amp;amp;input_report_array[INPUT_CCONTROL_KEYS_INDEX];
    p_input_report-&amp;gt;max_len             = INPUT_CC_REPORT_KEYS_MAX_LEN;
    p_input_report-&amp;gt;rep_ref.report_id   = INPUT_CC_REP_REF_ID;
    p_input_report-&amp;gt;rep_ref.report_type = BLE_HIDS_REP_TYPE_INPUT;

    BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&amp;amp;p_input_report-&amp;gt;security_mode.cccd_write_perm);
    BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&amp;amp;p_input_report-&amp;gt;security_mode.read_perm);
    BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&amp;amp;p_input_report-&amp;gt;security_mode.write_perm);	

    //12/14 Wedy add for functional key
    p_input_report                      = &amp;amp;input_report_array[INPUT_FUNCTION_KEY_INDEX];
    p_input_report-&amp;gt;max_len             = INPUT_FU_REPORT_KEYS_MAX_LEN;
    p_input_report-&amp;gt;rep_ref.report_id   = INPUT_FU_REP_REF_ID;
    p_input_report-&amp;gt;rep_ref.report_type = BLE_HIDS_REP_TYPE_INPUT;
    BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&amp;amp;p_input_report-&amp;gt;security_mode.cccd_write_perm);
    BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&amp;amp;p_input_report-&amp;gt;security_mode.read_perm);
    BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&amp;amp;p_input_report-&amp;gt;security_mode.write_perm);	
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;As you can see, I just add the report, and try to call the function, but it doesn&amp;#39;t work.&lt;/p&gt;
&lt;p&gt;Did I get any misunderstanding?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;//12/14 Wedy add for functional key
/**@brief Function for sending function control data
 */
static uint32_t function_control_send(function_control_t cmd)
{
    return ble_hids_inp_rep_send(&amp;amp;m_hids, INPUT_FUNCTION_KEY_INDEX, INPUT_FU_REPORT_KEYS_MAX_LEN, (uint8_t*)&amp;amp;cmd);
}

/**@brief Function for sending consumer control data
 */
static uint32_t consumer_control_send(consumer_control_t cmd)
{
    return ble_hids_inp_rep_send(&amp;amp;m_hids, INPUT_CCONTROL_KEYS_INDEX, INPUT_CC_REPORT_KEYS_MAX_LEN, (uint8_t*)&amp;amp;cmd);
}

static uint32_t hid_kbd_send_string(void)
{
    uint8_t temp_buf[INPUT_REPORT_KEYS_MAX_LEN] = {0x00, 0x00, 0xb, 0xc, 0x2c, 0x0, 0x0, 0x0};   
    return ble_hids_inp_rep_send(&amp;amp;m_hids, INPUT_REPORT_KEYS_INDEX, INPUT_REPORT_KEYS_MAX_LEN, (uint8_t*)temp_buf);
}

static uint32_t hid_kbd_send_release(void)
{
    uint8_t temp_buf[INPUT_REPORT_KEYS_MAX_LEN] = {0, 0, 0, 0, 0, 0, 0, 0};   
    return ble_hids_inp_rep_send(&amp;amp;m_hids, INPUT_REPORT_KEYS_INDEX, INPUT_REPORT_KEYS_MAX_LEN, (uint8_t*)temp_buf);
}

/**@brief Function for handling button events.
 *
 * @param[in]   pin_no   The pin number of the button pressed.
 */
static void button_event_handler(uint8_t pin_no, uint8_t button_action)
{
    if (button_action == APP_BUTTON_PUSH)
    {
        switch (pin_no)
        {
            case KEY_PRESS_BUTTON_PIN_NO:
            {
                APP_ERROR_CHECK(hid_kbd_send_string());
                break;
            }
            case VOLDOWN_BUTTON:
                APP_ERROR_CHECK(consumer_control_send(CONSUMER_CTRL_VOL_DW));
                break;
            case VOLUP_BUTTON:
                APP_ERROR_CHECK(consumer_control_send(CONSUMER_CTRL_VOL_UP));
                break;
            //12/14 Wedy add for functional key
            case FUNCTION_BUTTON:
                APP_ERROR_CHECK(function_control_send(FUNCTION_F01));
                break;
            default:
                APP_ERROR_HANDLER(pin_no);
                break;
        }
    }
    else if (button_action == APP_BUTTON_RELEASE)
    {
        switch (pin_no)
        {
            case VOLDOWN_BUTTON:
            /* Fall-through */
            case VOLUP_BUTTON:
                APP_ERROR_CHECK(consumer_control_send(RELEASE_KEY)); 
                break;
            case KEY_PRESS_BUTTON_PIN_NO:    
                APP_ERROR_CHECK(hid_kbd_send_release());
                break;
            //12/14 Wedy add for functional key
            case FUNCTION_BUTTON:
                APP_ERROR_CHECK(function_control_send(LIFT_KEY)); 
                break;
            default:
                APP_ERROR_HANDLER(pin_no);
                break;
        }
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am sorry for bothering you many times.&lt;/p&gt;
&lt;p&gt;I really appreciate your support.&lt;/p&gt;
&lt;p&gt;BTW, when I add the code into the project, the functions of consumer are also failed and the button are out of the response.&lt;/p&gt;
&lt;p&gt;Sincerely,&lt;/p&gt;
&lt;p&gt;Wedy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID customer application</title><link>https://devzone.nordicsemi.com/thread/161818?ContentTypeID=1</link><pubDate>Fri, 14 Dec 2018 08:54:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b221df2-fa51-4e65-ae40-67445756dc0b</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Wedy,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The button handling in BSP is a wrapper around app_button. There&amp;#39;s no need to have both in the same application.&lt;/p&gt;
&lt;p&gt;The events &amp;quot;BSP_EVENT_DISCONNECT&amp;quot;, &amp;quot;BSP_EVENT_WHITELIST_OFF&amp;quot;, and &amp;quot;BSP_EVENT_SLEEP&amp;quot; are specific buttons that places the device into&amp;nbsp;each of these modes. The actual functions called is shown in main.c::bsp_event_handler() in the SDK example. You can copy these into your own button handling if you&amp;#39;d like.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Scheduler vs. no scheduler is up to you. If your application requires data to be handled in several contexts (interrupt and main), one uses a scheduler to always run functions/operations in main context.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID customer application</title><link>https://devzone.nordicsemi.com/thread/161782?ContentTypeID=1</link><pubDate>Fri, 14 Dec 2018 01:44:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c151c0b-9018-443e-a045-0f192891dca6</guid><dc:creator>CY</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;Thank you for the reply.&lt;/p&gt;
&lt;p&gt;I just try to run the sample code you applied and it is worked.&lt;/p&gt;
&lt;p&gt;However, I just found that there is no setting for the BSP_EVENT control (sleep, disconnect, whitelist off).&lt;/p&gt;
&lt;p&gt;And I also found they use the different header for timer (app_timer vs. app_timer_appsh, app_scheduler)&lt;/p&gt;
&lt;p&gt;According to this, I would like to know is it possible to keep the both feature in the same project? Or where can I found the relative of bsp_enevt control in the sample code you provided?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Wedy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID customer application</title><link>https://devzone.nordicsemi.com/thread/161641?ContentTypeID=1</link><pubDate>Thu, 13 Dec 2018 11:10:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9ae0972-e968-4fb0-8414-2120eb05933b</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;This one uses app_button (checkout the branch SDK11):&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/Rallare/nrf51_ble_app_hids_kbd_consumercontrol/tree/SDK11"&gt;https://github.com/Rallare/nrf51_ble_app_hids_kbd_consumercontrol/tree/SDK11&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>