diff --git a/package.json b/package.json index 563df54d..42a4336e 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "c9.ide.run.debug": "#8421e5e3a5", "c9.ide.ace.emmet": "#e5f1a92ac3", "c9.ide.ace.gotoline": "#4d1a93172c", - "c9.ide.ace.keymaps": "#1e42293fb9", + "c9.ide.ace.keymaps": "#2477fd8ac6", "c9.ide.ace.repl": "#ada99852fa", "c9.ide.ace.split": "#0ae0151c78", "c9.ide.ace.statusbar": "#d7b45bb7c3", diff --git a/plugins/c9.ide.keys/commands.js b/plugins/c9.ide.keys/commands.js index 2232c6ce..0815c7df 100644 --- a/plugins/c9.ide.keys/commands.js +++ b/plugins/c9.ide.keys/commands.js @@ -288,12 +288,12 @@ define(function(require, exports, module) { return commands; } - function reset(noReload){ + function reset(noReload, toDefault){ commandManager.commandKeyBinding = {}; Object.keys(commands).forEach(function(name) { var cmd = commands[name]; - bindKey(cmd.originalBindKey, cmd); + bindKey(toDefault ? cmd.originalBindKey : cmd.bindKey, cmd); }); if (noReload) diff --git a/plugins/c9.ide.keys/editor.js b/plugins/c9.ide.keys/editor.js index 7a2f5118..e6c90708 100644 --- a/plugins/c9.ide.keys/editor.js +++ b/plugins/c9.ide.keys/editor.js @@ -173,9 +173,10 @@ define(function(require, exports, module) { "By resetting your keybindings to their " + "defaults you will lose all custom keybindings.", function(){ + settings.setJson("user/key-bindings", []); settings.set("user/ace/@keyboardmode", "default"); settings.set("user/key-bindings/@platform", "auto"); - reset(); + commands.reset(false, true); }, function(){}); }, position: 90