Languages

Menu
Sites
Language
Hardware Key 이벤트 발생 시점 문의

 

menu, back 키를 터치시,

손가락을 땔 때 이벤트가 실행되는거 같은데

혹시 손가락이 닿았을 때 이벤트가 실행되게 할 순 없을까요?

코드는 다음과 같습니다.

 

document.addEventListener("tizenhwkey", hardwareKey_Event);
 
function hardwareKey_Event(event)
{
    if (( event.keyName == "back" ) || ( event.keyName == "menu" ))
    {
     tizen.application.getCurrentApplication().exit();
    }
}

Responses

2 Replies
colin Rao

Hi,

I don't face such possible to handle the hardware key event by finger down/up. 

Alex Dem

Hi,
I did not face the way to separate 'press' , 'release' & 'longpress' events for hardware keys processing.
p.s. I guess I could explain why hardware keys is triggered on 'release' (finger is up). In case of 'press' (finger down) or in case of 'longpress' Web App will exit at once. Now with provided code on 'longpress' nothing happens. Web App does not exit.
Alexey.