title: Changing the functionality of key in android
body: <p>I have developed an android application in which some "OK" button (soft key) is present in the layout and it is used to handle some event .I want to map its functionality to hard key(like home key ) in my mobile during application run. I also want to know how to differentiate between single click and double click on an button. How to know the time gap between two button clicks and can we change that time period to handle double click.</p>