bug 13637: don't send ENTER/BACKSPACE in javascript KEY-PRESS event. Reviewed-By: Anthony

This commit is contained in:
Kelven Yang 2012-02-14 16:01:20 -08:00
parent 6094787cdb
commit a19dff444c
1 changed files with 4 additions and 0 deletions

View File

@ -323,6 +323,10 @@ JsCookedKeyboardMapper.prototype.inputFeed = function(eventType, code, modifiers
this.mappedInput.push({type : AjaxViewer.KEY_UP, code: AjaxViewer.X11_KEY_SHIFT, modifiers: modifiers});
return;
}
// ENTER/BACKSPACE key should already have been sent through KEY DOWN/KEY UP event
if(code == AjaxViewer.JS_KEY_ENTER || code == AjaxViewer.JS_KEY_BACKSPACE)
return;
this.mappedInput.push({type : AjaxViewer.KEY_DOWN, code: X11Keysym, modifiers: modifiers});
this.mappedInput.push({type : AjaxViewer.KEY_UP, code: X11Keysym, modifiers: modifiers});