Ok, so it turns out there are two ways of using input in the Smart TV app depending on which type of project you are using. If you are creating an AppFramework project you need to have ime
listed as a module in the app.json at the root of the project:
{
"theme" : "base",
"languages" : ["en"],
"resolutions": ["540p", "720p", "1080p"],
"modules" : ["ime"]
}
Then you need to include the AppFramework script in the index.html of your project:
<script type="text/javascript" src="$MANAGER_WIDGET/Common/af/2.0.0/loader.js"></script>
Alternatively you can create a javascript project which doesn't use the AppFramewrok code and doesn't require that the project be split into 'scenes'. In this case there are a large number of scripts that need to be included:
<!-- Common API -->
<!-- Taken from http://www.samsungdforum.com/SamsungDForum/ForumView/df3455b529adf7c4?forumID=8c1afcc0709c2097 -->
<script type="text/javascript" src="$MANAGER_WIDGET/Common/OpenSrc/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="$MANAGER_WIDGET/Common/API/Widget.js"></script>
<script type="text/javascript" src="$MANAGER_WIDGET/Common/API/Plugin.js"></script>
<script type="text/javascript" src="$MANAGER_WIDGET/Common/API/TVKeyValue.js"></script>
<script type="text/javascript" src="$MANAGER_WIDGET/Common/Util/Include.js"></script>
<script type="text/javascript" src="$MANAGER_WIDGET/Common/Util/Language.js"></script>
<script type="text/javascript" src="$MANAGER_WIDGET/Common/Plugin/Define.js"></script>
<script type="text/javascript" src="$MANAGER_WIDGET/Common/IME/ime2.js"></script>
This will create a numeric keypad; to create a QWERTY keyboard add the following script within the body tag.
<script type="text/javascript" src="$MANAGER_WIDGET/Common/IME_XT9/ime.js"></script>
There is an example of this on the Samsung Forum.
Once the scripts have been included by one of these methods the rest of the input control docs should work.