Languages

Menu
Sites
Language
Catching key events not working for all remote buttons except navigation,ok and return button

Hi Guys,

 

I have trouble with the catching remote controls button except up, down, left, right, ok, return buttons. All other buttons are not working. This is tested on emulator, I don't have tv to test it.

 

Can you send me example of code where all this key events working.

 

Thanks.

View Selected Answer

Responses

6 Replies
Mark as answer
Armaan-Ul- Islam

Please check the User input overview and Key code table Guide from SamsungDForum. You may use the key handling code snippet along with the list of keys from Key code table. Example Code Snippet:  

window.onload = function() {
    document.addEventListener("keydown", function(e) {
        switch(e.keyCode) {
            // ChannelUp
            case 427:
                break;
            // VolumeDown
            case 448:
                break;
            // Menu
            case 457:
                break;
            case 10009:
                handleBackKey();
                break;
        }
    });
};
Yosi Golan

Hey.

i am facing the same issue.

did you managed to solve it?

Thanks

Armaan-Ul- Islam

Guides for catching remote controls button event resides here now, Check it out.

Remote Control

Yosi Golan

Thank you Armaan.

I followed these guieds, but as the original post explains, the only events that are fired are the arrows, enter and back events. all other events (color buttons for example) are not fired.

do you know how to solve it?

 

Thanks Yosi

Armaan-Ul- Islam

As per the Guide I mentioned above, It should have been working, But as you say it not...

Please try your app on TV Emulator (in Different versions: 2.3, 2.4, 3.0, 4.0), Based on Version, Remote functionality may change.

Yosi Golan

Hey.

i just noticed that the guide includes a command i missed. every key must be registerd for use before using it. the arrow keys are auto registerd, this is why they worked for me from the begining.

Thanks You