Samsung TV SDK 2.5 – Javascript Error keyCode

Samsung SDK 2.5 editor provides ‘Basic Javascript Project’; however, it contains Reference Error when you launch first time like below:

 

Error Detail : ReferenceError: keyCode is not defined

 

It is caused because template code has capitalize error.

Find below code:

 

Main.MainKeyHandler = function()

{

	var KeyCode = event.keyCode;

        switch(keyCode)

	{

            ...

        }

}

 

Change to below:

Main.MainKeyHandler = function()
{
var keyCode = event.keyCode;
switch(keyCode)
{
...
}
}

 

One Reply to “Samsung TV SDK 2.5 – Javascript Error keyCode”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.