diff --git a/plugins/c9.ide.keys/dataprovider.js b/plugins/c9.ide.keys/dataprovider.js
index c9e74f69..bfb4505e 100644
--- a/plugins/c9.ide.keys/dataprovider.js
+++ b/plugins/c9.ide.keys/dataprovider.js
@@ -106,22 +106,24 @@ define(function(require, exports, module) {
+ (available && this.getClassName(row))
+ (available ? "" : " notAvailable")
+ "' style='height:" + this.innerRowHeight + "px'>"
- + "" + keys + ""
+ ""
- + this.replaceStrong((command.group || "General") + ": " + name)
- + ""
- + (command.hint
- ? this.replaceStrong(command.hint)
- : "")
+ + this.replaceStrong(name)
+ + "" + keys + ""
+ + ""
+ + ((command.group || "General"))
+ "");
};
this.getText = function(node) {
var command = this.commands.commands[node.id];
if (!command) return "";
+
+ var keys = (command.bindKey || 0)[this.commands.platform] || "";
return (command.group || "General") + ": "
+ (command.displayName || command.name || node.id)
- + (command.hint ? "\n" + command.hint : "");
+ + (command.hint ? "\n" + command.hint : "")
+ + (keys ? "\n" + keys : "")
+ + "\nPress F2 to change keybinding";
};
this.getClassName = function(row) {
diff --git a/plugins/c9.ide.keys/panel.js b/plugins/c9.ide.keys/panel.js
index 418449e0..483a84a0 100644
--- a/plugins/c9.ide.keys/panel.js
+++ b/plugins/c9.ide.keys/panel.js
@@ -94,6 +94,9 @@ define(function(require, exports, module) {
}, {
bindKey: "Shift-Enter",
exec: function() { execCommand(false, true); }
+ }, {
+ bindKey: "F2",
+ exec: function() { showKeyEditor(); }
}
]);
function forwardToTree() {
@@ -166,6 +169,10 @@ define(function(require, exports, module) {
}
/***** Methods *****/
+
+ function showKeyEditor() {
+ commands.exec("openpreferences", null, { panel: "preferences.keybindings" });
+ }
/**
* Searches through the dataset