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
This commit is contained in:
Anurag Awasthi 2019-06-06 13:24:12 +05:30 committed by Rohit Yadav
parent 7247c5e97e
commit d74b64c55b

View File

@ -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;