You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2015/01/20 07:41:49 UTC

[4/8] git commit: updated refs/heads/4.5 to 31a6517

CLOUDSTACK-7904: EN-UK: CentOS 6.5 GUI: Key translation fails for some  EN- UK keyboard keys.

(cherry picked from commit 7f2219bcbb4835123bdb24ba733651b9a1f2bdc6)
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b3e84cad
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b3e84cad
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b3e84cad

Branch: refs/heads/4.5
Commit: b3e84cad2d37ef1d266bf49c0367dabe8589ace0
Parents: be0882b
Author: Sanjay Tripathi <sa...@citrix.com>
Authored: Thu Nov 13 18:56:29 2014 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Tue Jan 20 11:59:32 2015 +0530

----------------------------------------------------------------------
 systemvm/js/ajaxkeys.js   | 43 +++++++++++-------------------------------
 systemvm/js/ajaxviewer.js |  4 +++-
 2 files changed, 14 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b3e84cad/systemvm/js/ajaxkeys.js
----------------------------------------------------------------------
diff --git a/systemvm/js/ajaxkeys.js b/systemvm/js/ajaxkeys.js
index 26c2996..3053b7d 100644
--- a/systemvm/js/ajaxkeys.js
+++ b/systemvm/js/ajaxkeys.js
@@ -289,47 +289,26 @@ var	keyboardTables = [
                             ]
            }
            }, {tindex: 2, keyboardType: KEYBOARD_TYPE_UK, mappingTable:
-                 {X11: [
-                          //[223 = `¬¦]
-                          {keycode: 223,		entry : 0x60, 	browser: "IE"},
-                          ],
+                 {X11: [],
                   keyPress: [
-                             //[34 = "]
-                          {keycode: 34, entry:
-                              [{type : KEY_DOWN, code : 0x40, modifiers : 64, shift : true}]
-                          },
+                          //[34 = "]
+                          {keycode: 34,		entry: 0x40,	guestos: "windows"},
                           //[35 = #]
-                          {keycode: 35, entry:
-                              [{type : KEY_DOWN, code : 0x5c, modifiers : 0, shift : false}]
-                          },
+                          {keycode: 35,		entry: 0x5c,	guestos: "windows"},
                           // [64 = @]
-                          {keycode: 64, entry:
-                              [{type : KEY_DOWN, code : 0x22, modifiers : 64, shift : true}]
-                          },
+                          {keycode: 64,		entry: 0x22,	guestos: "windows"},
                           // [92 = \]
-                          {keycode: 92, entry:
-                              [{type : KEY_DOWN, code : 0xa6, modifiers : 0, shift : false}]
-                          },
+                          {keycode: 92,		entry: 0xa6,	guestos: "windows"},
                           // [124 = |]
-                          {keycode: 124, entry:
-                              [{type : KEY_DOWN, code : 0xa6, modifiers : 64, shift : true}]
-                          },
+                          {keycode: 124,	entry: 0xa6,	guestos: "windows"},
                           // [126 = ~]
-                          {keycode: 126, entry:
-                              [{type : KEY_DOWN, code : 0x7c, modifiers : 64, shift : true}]
-                          },
+                          {keycode: 126,	entry: 0x7c,	guestos: "windows"},
                           // [163 = £]
-                          {keycode: 163, entry:
-                              [{type : KEY_DOWN, code : 0x23, modifiers : 64, shift : true}]
-                          },
+                          {keycode: 163,	entry: 0x23,	guestos: "windows"},
                           // [172 = ¬]
-                          {keycode: 172, entry:
-                              [{type : KEY_DOWN, code : 0x7e, modifiers : 64, shift : true}]
-                          },
+                          {keycode: 172,	entry: 0x7e,	guestos: "windows"},
                           // [166 = ¦]
-                          {keycode: 166, entry:
-                              [{type : KEY_DOWN, code : 0x60, modifiers : 896, shift : false}]
-                          }
+                          {keycode: 166,	entry: [{type : KEY_DOWN, code : 0x60, modifiers : 896, shift : false}],	guestos: "windows"}
                           ]
            }
            }]

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b3e84cad/systemvm/js/ajaxviewer.js
----------------------------------------------------------------------
diff --git a/systemvm/js/ajaxviewer.js b/systemvm/js/ajaxviewer.js
index 123f182..db5ed45 100644
--- a/systemvm/js/ajaxviewer.js
+++ b/systemvm/js/ajaxviewer.js
@@ -761,7 +761,9 @@ AjaxViewer.prototype = {
 			for (var j = 0; j < keyPressMaps.length; j++) {
 				var code = keyPressMaps[j].keycode;
 				var mappedEntry = keyPressMaps[j].entry;
-				this.keyboardMappers[keyboardType].jsKeyPressX11KeysymMap[code] = mappedEntry;
+				if(keyPressMaps[j].guestos == undefined || keyPressMaps[j].guestos == this.guestos) {
+					this.keyboardMappers[keyboardType].jsKeyPressX11KeysymMap[code] = mappedEntry;
+				}
 			}
 		}
 	}