From d74b64c55b83d025be92a7b092660dbd3539538d Mon Sep 17 00:00:00 2001 From: Anurag Awasthi <43956255+anuragaw@users.noreply.github.com> Date: Thu, 6 Jun 2019 13:24:12 +0530 Subject: [PATCH] console-proxy: ignore META key mask if control was pressed (#3308) On VMware Zone, hitting CTRL over Console Proxy will send a mask of Meta key as well. This makes Ctrl+A, Ctrl+E and many functionalities to not work in console. Read https://github.com/apache/cloudstack/issues/3229 for details For fixing ignore Meta key flag passed by SDK if Control was pressed. The Jquery implementation sets the meta key to control key to support IE. Fixes #3229 --- systemvm/agent/js/ajaxviewer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/systemvm/agent/js/ajaxviewer.js b/systemvm/agent/js/ajaxviewer.js index f160abc9b58..1a44b3e7c1f 100644 --- a/systemvm/agent/js/ajaxviewer.js +++ b/systemvm/agent/js/ajaxviewer.js @@ -1431,7 +1431,9 @@ AjaxViewer.prototype = { if(e.shiftLeft) modifiers |= AjaxViewer.LEFT_SHIFT_MASK; - if(e.metaKey) + // Don't pass meta key modifier filter if control key is pressed. + // For more details see https://github.com/apache/cloudstack/issues/3229 + if(e.metaKey && !e.ctrlKey) modifiers |= AjaxViewer.META_KEY_MASK; return modifiers;