The following function calls the IME module. var focusIME = function() { oIME = new IMEShell_Common(); oIME.inputboxID = "login_form"; oIME.onKeyPressFunc = function(nKeyCode) { switch(nKeyCode) {
case tvKey.KEY_RETURN:
break;
case tvKey.KEY_EXIT:
break;
case tvKey.KEY_ENTER:
return false;
break;
} }; Main.login.form.focus(); oIME.onShow(); };
See the end part of the focusIME functions that call the onShow() function of the IME object to confirm it. As mentioned earlier, the Enter key calls the IME module in the following remote key event handling function. Main.login.keyDown = function(){
var keyCode = event.keyCode;
switch(keyCode)
{ case tvKey.KEY_RETURN: event.preventDefault(); widgetAPI.sendReturnEvent(); break;
12. Hands Frame Application 2 – Advanced Version
205