<?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>button long press and short press detect</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/3767/button-long-press-and-short-press-detect</link><description>Hi,
I want to detect long and short press in same button.
Define &amp;quot;BUTTON_DETECTION_DELAY&amp;quot; can detect one delay.
Let me know to detect more than two delays.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 07 Sep 2016 12:43:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/3767/button-long-press-and-short-press-detect" /><item><title>RE: button long press and short press detect</title><link>https://devzone.nordicsemi.com/thread/13644?ContentTypeID=1</link><pubDate>Wed, 07 Sep 2016 12:43:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45659873-5567-4f1a-9c08-d28a02085a87</guid><dc:creator>ehitil</dc:creator><description>&lt;p&gt;the question is answered,but I can&amp;#39;t find it, can give me the url and paste.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: button long press and short press detect</title><link>https://devzone.nordicsemi.com/thread/13650?ContentTypeID=1</link><pubDate>Mon, 21 Sep 2015 03:12:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4894732-dffb-4ca8-a9cc-64a29e47871b</guid><dc:creator>HSA</dc:creator><description>&lt;p&gt;@John DeWitt: Hi John, could you please share an example regrading this to handle the events for different cases of button press. Please&lt;/p&gt;
&lt;p&gt;Thanks n Regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: button long press and short press detect</title><link>https://devzone.nordicsemi.com/thread/13647?ContentTypeID=1</link><pubDate>Mon, 21 Sep 2015 03:10:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a72ac69d-441e-4126-9f86-bdb79fe7c63c</guid><dc:creator>HSA</dc:creator><description>&lt;p&gt;Hello @Nikita&lt;/p&gt;
&lt;p&gt;I want to detect long press and short press for the same button. How can I implement that, please suggest?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: button long press and short press detect</title><link>https://devzone.nordicsemi.com/thread/13649?ContentTypeID=1</link><pubDate>Thu, 11 Sep 2014 00:39:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb94cf64-cf6f-4765-abf5-31076c1f79ef</guid><dc:creator>Yuki</dc:creator><description>&lt;p&gt;Hi, John. Thanks. I understand. I try it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: button long press and short press detect</title><link>https://devzone.nordicsemi.com/thread/13648?ContentTypeID=1</link><pubDate>Wed, 10 Sep 2014 12:26:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abb673e1-a87a-4191-9776-2a4bf883ce4f</guid><dc:creator>John</dc:creator><description>&lt;p&gt;I think Nikita was onto the answer for you. Start a 3 second timer when the button is pushed. When the timer expires if the button is still pushed perform your system off actions. If the button released event occurs before the timer expires, cancel the timer and do your short button push actions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: button long press and short press detect</title><link>https://devzone.nordicsemi.com/thread/13646?ContentTypeID=1</link><pubDate>Wed, 10 Sep 2014 08:35:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67f75703-e684-4af4-9841-33210872cbe3</guid><dc:creator>Yuki</dc:creator><description>&lt;p&gt;Hi, Nikita
Thanks. But I can&amp;#39;t use button release event. I want to detect long press for system off.
I want perform system off before release button.(pressing for 3 sec)
Plese tell me how to.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: button long press and short press detect</title><link>https://devzone.nordicsemi.com/thread/13645?ContentTypeID=1</link><pubDate>Wed, 10 Sep 2014 06:50:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ed42c8d-1530-42d0-b8ec-d61f96f50b1e</guid><dc:creator>Nikita</dc:creator><description>&lt;p&gt;You can start timer on button press event and stop timer on button release event. Thus you can measure button press time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>