key code 10182 for Exit button in tizen studio?

83 Views Asked by At

key code 10182 for Exit button in tizen studio does not work ? you proposals

document.addEventListener('keydown', function(event) {
    if (event.keyCode === 10182) { // 101 is the key code for the Exit key on Samsung TVs
     alert('Exit');
    }
});
2

There are 2 best solutions below

0
stuckatzero On

Assuming you have reviewed other prerequisites such as inputdevice privilege, definition of listeners, etc. from the official documentation in Samsung dev. Remote control maybe you are using the smart remote instead the basic remote which has two separate keys for back and exit functions

In the smart remote the function depends on the following:

  • Key: "Back/Exit"
  • Click key name:Back
  • Long press key name: Exit

Regards

0
15kokos On

The main requirement for getting key events is to properly register a key using this API. Then and only then, you can register listener to do some actions on these events as you presented in code snippet.