From 88818dcfbad5aff35ab71fd3b511a067d4854a72 Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Fri, 14 Nov 2014 15:37:14 -0800 Subject: [PATCH] Override Ctrl-S shortcut to save text editor contents --- IPython/html/static/texteditor/js/editor.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/IPython/html/static/texteditor/js/editor.js b/IPython/html/static/texteditor/js/editor.js index a373a41b8..2efc6f084 100644 --- a/IPython/html/static/texteditor/js/editor.js +++ b/IPython/html/static/texteditor/js/editor.js @@ -46,6 +46,9 @@ function($, that.save_enabled = false; } ); + cm.setOption("extraKeys", { + "Ctrl-S": $.proxy(this.save, this), + }); }; Editor.prototype.save = function() {