I am trying to send key codes to a samsung smart tv using UPnP. I found the list of available key codes here. But How can i represent the same in integer, because samsung wants to receive this as integer values in the UPnP services.
Thanks
You can use the emulator to get a list of the key codes:
tvKey = new Common.API.TVKeyValue()
for(key in tvKey) {
alert(key+": "+tvKey[key]);
}
Not a great solution, but might work for your purposes.
Here you have manual way. So pressing any button on remote give you info what int
value it has:
$('body').keydown(function(event) {
var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
alert("You pressed: " + keyCode);
}