<?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>what can I do ,if I want to send left or right button data</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7703/what-can-i-do-if-i-want-to-send-left-or-right-button-data</link><description>HI 
 I used nrf51822- EK board. 
 BLE HID MOUSE - SDK 8.0 
 ` 
 How to send left button or right button data? 
 How to modify below method? 
 static void mouse_click_send()
{
 uint32_t err_code;
 uint8_t buffer[3];
 if (m_in_boot_mode)
 return;</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 09 Sep 2020 01:02:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7703/what-can-i-do-if-i-want-to-send-left-or-right-button-data" /><item><title>RE: what can I do ,if I want to send left or right button data</title><link>https://devzone.nordicsemi.com/thread/268611?ContentTypeID=1</link><pubDate>Wed, 09 Sep 2020 01:02:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7721b004-a1e0-425e-83cf-677ca15992c6</guid><dc:creator>wzszzxj</dc:creator><description>&lt;p&gt;Hi,aworks:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;But there is no&amp;nbsp; &amp;quot;&lt;code&gt;BLE_ERROR_NO_TX_BUFFERS&lt;/code&gt;&amp;quot;&amp;nbsp;defined in the nrf5 SDK16.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: what can I do ,if I want to send left or right button data</title><link>https://devzone.nordicsemi.com/thread/27447?ContentTypeID=1</link><pubDate>Mon, 29 Jun 2015 08:34:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd2da1fe-6f07-4fc1-a837-8a31883a3d5e</guid><dc:creator>aworks</dc:creator><description>&lt;p&gt;Thank you your reply.&lt;/p&gt;
&lt;p&gt;I successed left, right click.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: what can I do ,if I want to send left or right button data</title><link>https://devzone.nordicsemi.com/thread/27446?ContentTypeID=1</link><pubDate>Sun, 21 Jun 2015 07:21:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb700d49-5b6e-4281-b7cf-56514bb54185</guid><dc:creator>aworks</dc:creator><description>&lt;p&gt;oh Thank you,&lt;/p&gt;
&lt;p&gt;I will try&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: what can I do ,if I want to send left or right button data</title><link>https://devzone.nordicsemi.com/thread/27444?ContentTypeID=1</link><pubDate>Sun, 21 Jun 2015 07:21:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a564086-9517-4850-abe5-94286ed75d88</guid><dc:creator>aworks</dc:creator><description>&lt;p&gt;this is Button event handler.
button push - &amp;gt; mouse_click_send();&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: what can I do ,if I want to send left or right button data</title><link>https://devzone.nordicsemi.com/thread/27445?ContentTypeID=1</link><pubDate>Fri, 19 Jun 2015 12:07:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5728ee10-8f1b-4292-acf0-06fe0c8937bc</guid><dc:creator>Jon Helge</dc:creator><description>&lt;p&gt;In hids_init() function there is a the hid report descriptor that defines the content of the hid reports. For the mouse report sent in your code this is the relevant section.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;      // Report ID 1: Mouse buttons + scroll/pan
    0x85, 0x01,       //     Report Id 1
    0x09, 0x01,       //     Usage (Pointer)
    0xA1, 0x00,       //     Collection (Physical)
    0x95, 0x05,       //         Report Count (5)
    0x75, 0x01,       //         Report Size (1)
    0x05, 0x09,       //         Usage Page (Buttons)
    0x19, 0x01,       //             Usage Minimum (01)
    0x29, 0x05,       //             Usage Maximum (05)
    0x15, 0x00,       //             Logical Minimum (0)
    0x25, 0x01,       //             Logical Maximum (1)
    0x81, 0x02,       //             Input (Data, Variable, Absolute)
    0x95, 0x01,       //             Report Count (1)
    0x75, 0x03,       //             Report Size (3)
    0x81, 0x01,       //             Input (Constant) for padding
    0x75, 0x08,       //         Report Size (8)
    0x95, 0x01,       //         Report Count (1)
    0x05, 0x01,       //         Usage Page (Generic Desktop)
    0x09, 0x38,       //             Usage (Wheel)
    0x15, 0x81,       //             Logical Minimum (-127)
    0x25, 0x7F,       //             Logical Maximum (127)
    0x81, 0x06,       //             Input (Data, Variable, Relative)
    0x05, 0x0C,       //         Usage Page (Consumer)
    0x0A, 0x38, 0x02, //             Usage (AC Pan)
    0x95, 0x01,       //             Report Count (1)
    0x81, 0x06,       //             Input (Data,Value,Relative,Bit Field)
    0xC0,             //     End Collection (Physical)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This might look a bit cryptic, but basically says that five first bits in the first byte corresponds to button 1 to button 5 on a standard HID mouse. Button 1 is left button, Button 2 is right button, Button 3 is center button and button 4 and 5 are typically the &amp;quot;back&amp;quot; and &amp;quot;forward&amp;quot; buttons you find on the sides of a mouse.&lt;/p&gt;
&lt;p&gt;Second byte is for the scrollwheel. It takes values from -127 to 127&lt;/p&gt;
&lt;p&gt;Third byte is for panning. Takes same valus as the scrollwhell I believe.&lt;/p&gt;
&lt;p&gt;To send a &amp;quot;right button&amp;quot; press you must set the second bit in the first byte to &amp;#39;1&amp;#39; before sending it. You must always send all three bytes.&lt;/p&gt;
&lt;p&gt;The report would then have the value {1, 0, 0} for left button. {2,0,0} for right button. {4,0,0} for center button. Both left and right would be {3,0,0}.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: what can I do ,if I want to send left or right button data</title><link>https://devzone.nordicsemi.com/thread/27443?ContentTypeID=1</link><pubDate>Fri, 19 Jun 2015 11:57:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1568ca75-51c4-4cac-b4b0-f04229919711</guid><dc:creator>jithin m das</dc:creator><description>&lt;p&gt;case BSP_EVENT_KEY_0:
mouse_click_send();
break;&lt;/p&gt;
&lt;p&gt;Is this in an event handler ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>