How to set physical button to run app in android custom rom
<p>I've  got new mobile from ebay, Blackview bv6000, which has 3 special physical buttons</p>

<ol>
<li>Camera</li>
<li>Sos</li>
<li>Ptt</li>
</ol>

<p>Then i need to assign those buttons to run my app and some functions</p>

<p>I got stock rom from Blackview forum, after i extract system.img file and found </p>

<pre><code>\usr\keylayout\Generic.kl 
</code></pre>

<p>which contains list of key function that i need</p>

<pre><code>key 212   CAMERA

...

#[AGOLD][2015.04.08]Fengjun merge
key 249   FUNC1
key 250   FUNC2
#[AGOLD]End
</code></pre>

<p>The question is how can i assign that key to run my app or function in my app?</p>

<p><strong>Edit</strong></p>

<p>More info:</p>

<p>I want to catch button event in home screen or in other app or even the screen is off </p>