From f2874d0f228680b0dcd3299bb070215a2648a4a8 Mon Sep 17 00:00:00 2001 From: Sanjay Tripathi Date: Wed, 28 Aug 2013 14:22:21 +0530 Subject: [PATCH] CLOUDSTACK-4434: EN: Ubuntu: Direct input "- _ ", "? /", "keyboard /" ,"keyboard -" keys are not working well for the US keyboard. Reviewed-by: Fang Wang Signed-off-by: Vijayendra Bhamidipati --- services/console-proxy/server/js/ajaxviewer.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/services/console-proxy/server/js/ajaxviewer.js b/services/console-proxy/server/js/ajaxviewer.js index d3f3aa9557a..96432049227 100644 --- a/services/console-proxy/server/js/ajaxviewer.js +++ b/services/console-proxy/server/js/ajaxviewer.js @@ -140,9 +140,13 @@ KeyboardMapper.prototype = { this.jsX11KeysymMap[AjaxViewer.JS_KEY_SELECT_KEY] = AjaxViewer.X11_KEY_SELECT_KEY; this.jsX11KeysymMap[AjaxViewer.JS_KEY_DECIMAL_POINT] = AjaxViewer.X11_KEY_DECIMAL_POINT; this.jsKeyPressX11KeysymMap[45] = [{type: AjaxViewer.KEY_DOWN, code: AjaxViewer.X11_KEY_SUBSTRACT, modifiers: 0, shift: true }, - {type: AjaxViewer.KEY_DOWN, code: AjaxViewer.X11_KEY_SUBSTRACT, modifiers: 0, shift: false }]; + {type: AjaxViewer.KEY_UP, code: AjaxViewer.X11_KEY_SUBSTRACT, modifiers: 0, shift: true }, + {type: AjaxViewer.KEY_DOWN, code: AjaxViewer.X11_KEY_SUBSTRACT, modifiers: 0, shift: false }, + {type: AjaxViewer.KEY_UP, code: AjaxViewer.X11_KEY_SUBSTRACT, modifiers: 0, shift: false }]; this.jsKeyPressX11KeysymMap[47] = [{type: AjaxViewer.KEY_DOWN, code: 0x2f, modifiers: 0, shift: true }, - {type: AjaxViewer.KEY_DOWN, code: 0x2f, modifiers: 0, shift: false }]; + {type: AjaxViewer.KEY_UP, code: 0x2f, modifiers: 0, shift: true }, + {type: AjaxViewer.KEY_DOWN, code: 0x2f, modifiers: 0, shift: false }, + {type: AjaxViewer.KEY_UP, code: 0x2f, modifiers: 0, shift: false }]; } }, RawkeyboardInputHandler : function(eventType, code, modifiers, guestos, browser, browserVersion) {