Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8BDCD17A83 for ; Tue, 20 Jan 2015 06:41:47 +0000 (UTC) Received: (qmail 68844 invoked by uid 500); 20 Jan 2015 06:41:48 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 68751 invoked by uid 500); 20 Jan 2015 06:41:48 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 68388 invoked by uid 99); 20 Jan 2015 06:41:48 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Jan 2015 06:41:48 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id F116BE07FA; Tue, 20 Jan 2015 06:41:46 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: bhaisaab@apache.org To: commits@cloudstack.apache.org Date: Tue, 20 Jan 2015 06:41:49 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [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 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 Authored: Thu Nov 13 18:56:29 2014 +0530 Committer: Rohit Yadav 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; + } } } }