aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Macdonald2012-02-21 18:18:35 (EST)
committersfranklin2012-02-21 22:30:08 (EST)
commite6a67442982a89b16e2e3a0870374b0c8561288e (patch)
tree34f49f33cb7c3146dc8f9c7d164c4b2d15da015e
parent75cac64c46c0b555df2614504313465a2587cee4 (diff)
downloadorg.eclipse.orion.client-e6a67442982a89b16e2e3a0870374b0c8561288e.zip
org.eclipse.orion.client-e6a67442982a89b16e2e3a0870374b0c8561288e.tar.gz
org.eclipse.orion.client-e6a67442982a89b16e2e3a0870374b0c8561288e.tar.bz2
Bug 371914 - keybinding collision for editor and key assistv20120222-0330
-rw-r--r--bundles/org.eclipse.orion.client.core/web/orion/globalCommands.js2
-rw-r--r--bundles/org.eclipse.orion.client.editor/web/orion/editor/editorFeatures.js5
2 files changed, 4 insertions, 3 deletions
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/globalCommands.js b/bundles/org.eclipse.orion.client.core/web/orion/globalCommands.js
index 22b31e3..a7cde97 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/globalCommands.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/globalCommands.js
@@ -663,7 +663,7 @@ define(['require', 'dojo', 'dijit', 'orion/commonHTMLFragments', 'orion/commands
commandService.registerCommandContribution("eclipse.keyAssist", 100, "globalActions", null, true, new mCommands.CommandKeyBinding(191, false, true));
if (editor) {
var isMac = window.navigator.platform.indexOf("Mac") !== -1;
- editor.getTextView().setKeyBinding(new mCommands.CommandKeyBinding(191, !isMac, true, false, isMac), "Show Keys");
+ editor.getTextView().setKeyBinding(new mCommands.CommandKeyBinding(191, false, true, !isMac, isMac), "Show Keys");
editor.getTextView().setAction("Show Keys", keyAssistCommand.callback);
}
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/editor/editorFeatures.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/editorFeatures.js
index 40957c8..074e9ae 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/editor/editorFeatures.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/editorFeatures.js
@@ -664,7 +664,8 @@ function(messages, mUndoStack, mKeyBinding, mRulers, mAnnotations, mTextDND, mRe
return {commentStart: commentStart, commentEnd: commentEnd};
}
- this.textView.setKeyBinding(new mKeyBinding.KeyBinding(191, true, true), messages.addBlockComment);
+ var isMac = navigator.platform.indexOf("Mac") !== -1;
+ this.textView.setKeyBinding(new mKeyBinding.KeyBinding(191, true, !isMac, false, isMac), messages.addBlockComment);
this.textView.setAction(messages.addBlockComment, function() {
var editor = this.editor;
var model = editor.getModel();
@@ -688,7 +689,7 @@ function(messages, mUndoStack, mKeyBinding, mRulers, mAnnotations, mTextDND, mRe
return true;
}.bind(this));
- this.textView.setKeyBinding(new mKeyBinding.KeyBinding(220, true, true), messages.removeBlockComment);
+ this.textView.setKeyBinding(new mKeyBinding.KeyBinding(220, true, !isMac, false, isMac), messages.removeBlockComment);
this.textView.setAction(messages.removeBlockComment, function() {
var editor = this.editor;
var model = editor.getModel();