<?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 KEYBOARD CODE</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/1668/hid-keyboard-code</link><description>Hello, 
 I have posted a question regarding the HID template code for the nrf8001. I would like to say that the progress from your help has helped immensely. 
 Currently, the roadblock that I am having is assigning different &amp;#39;keys&amp;#39; to different switches</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 10 Mar 2014 10:38:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/1668/hid-keyboard-code" /><item><title>RE: HID KEYBOARD CODE</title><link>https://devzone.nordicsemi.com/thread/7392?ContentTypeID=1</link><pubDate>Mon, 10 Mar 2014 10:38:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e446aa4b-9f90-4b61-a342-8e877b65bd33</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The code I posted are pseudo-code. You need to put in the correct buffers and other variables in to your function.&lt;/p&gt;
&lt;p&gt;/* When key is pressed &lt;em&gt;/
lib_aci_send_data(PIPE_HID_SERVICE_HID_REPORT_TX, &amp;amp;keypressA[0], 8);
/&lt;/em&gt; When key is released */
uint8_t release[] ={0,0,0,0, 0,0,0,0};
lib_aci_send_data(PIPE_HID_SERVICE_HID_REPORT_TX, release, 8);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID KEYBOARD CODE</title><link>https://devzone.nordicsemi.com/thread/7391?ContentTypeID=1</link><pubDate>Sat, 08 Mar 2014 03:32:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf8c46bd-9779-4668-9e14-c1f0230975f0</guid><dc:creator>don ta</dc:creator><description>&lt;p&gt;Hey Hakon,&lt;/p&gt;
&lt;p&gt;so in the original code I posted:
&lt;code&gt;lib_aci_send_data(PIPE_HID_SERVICE_HID_REPORT_TX, &amp;amp;keypressA[0], 8)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;the &lt;code&gt;send_key&lt;/code&gt; command you wrote in your recent reply is the equivalent to the lib_aci_send_data command right?&lt;/p&gt;
&lt;p&gt;and may I ask what the &lt;code&gt;my_key_buffer&lt;/code&gt; is?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID KEYBOARD CODE</title><link>https://devzone.nordicsemi.com/thread/7390?ContentTypeID=1</link><pubDate>Thu, 06 Mar 2014 09:46:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e1447bb-cb82-4925-b407-39fd880b219d</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;If you open file &amp;quot;hid_keyboard.xml&amp;quot;, you can edit the field &amp;lt;name&amp;gt;&amp;lt;/name&amp;gt; under &amp;quot;gap settings&amp;quot;, and then run the batch file that is located in the same directory.&lt;/p&gt;
&lt;p&gt;You can also open the .xml file in nRFgo Studio and change the setting there.&lt;/p&gt;
&lt;p&gt;Best regards
Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID KEYBOARD CODE</title><link>https://devzone.nordicsemi.com/thread/7389?ContentTypeID=1</link><pubDate>Thu, 06 Mar 2014 08:33:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec5c3eeb-c573-4b02-912a-07d88e2af65d</guid><dc:creator>don ta</dc:creator><description>&lt;p&gt;This is unrelated to what I asked originally, but for the HID keyboard template code i am using (it is called BLE_HID_KEYBOARD_TEMPLATE), do you know how I would be able to change the broadcasting name? at the moment, it is being seen as Nordic Keyboard.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID KEYBOARD CODE</title><link>https://devzone.nordicsemi.com/thread/7388?ContentTypeID=1</link><pubDate>Wed, 05 Mar 2014 13:46:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b3f65fb-004d-415c-8059-90f135ef9455</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;HID uses &amp;quot;release-keys&amp;quot; to indicate that the button has been pushed and released.
For instance, when you hold in back-space, you will only transmit the &amp;quot;backspace&amp;quot; cmd once, then the PC will know that it should delete multiple char&amp;#39;s instead of one.&lt;/p&gt;
&lt;p&gt;To stop spamming the key, just send release-keys afterwards:
uint8_t release[] = {0,0,0,0, 0,0,0,0};
send_key(my_key_buffer, 8);
send_key(release, 8);&lt;/p&gt;
&lt;p&gt;Best regards
Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>