From 3f79d6dad13a3c158f6e519443547af81a9adeda Mon Sep 17 00:00:00 2001 From: patricktokeeffe Date: Fri, 1 Aug 2014 16:20:50 -0700 Subject: [PATCH 1/2] Update custom.js Explain different semantics required for instances versus functions or classes. Based on comments of @minrk in #5985. --- IPython/html/static/custom/custom.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/IPython/html/static/custom/custom.js b/IPython/html/static/custom/custom.js index b618cd3ae..2f28784a4 100644 --- a/IPython/html/static/custom/custom.js +++ b/IPython/html/static/custom/custom.js @@ -11,6 +11,16 @@ * It will be executed by the ipython notebook at load time. * * Same thing with `profile/static/custom/custom.css` to inject custom css into the notebook. + * + * Classes and functions are available at load time and may be accessed plainly: + * + * IPython.Cell.options_default.cm_config.extraKeys = {Home: "goLineLeft", End: "goLineRight"}; + * + * Instances are created later however and must be accessed using events: + * + * $([IPython.events]).on("app_initialized.NotebookApp", function () { + * IPython.keyboard_manager.... + * }); * * __Example 1:__ * From c1971e9d42613a5d86351ae09b982b1bb1c30084 Mon Sep 17 00:00:00 2001 From: patricktokeeffe Date: Tue, 5 Aug 2014 11:19:48 -0700 Subject: [PATCH 2/2] Update custom.js --- IPython/html/static/custom/custom.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/IPython/html/static/custom/custom.js b/IPython/html/static/custom/custom.js index 2f28784a4..efb420e99 100644 --- a/IPython/html/static/custom/custom.js +++ b/IPython/html/static/custom/custom.js @@ -14,7 +14,8 @@ * * Classes and functions are available at load time and may be accessed plainly: * - * IPython.Cell.options_default.cm_config.extraKeys = {Home: "goLineLeft", End: "goLineRight"}; + * IPython.Cell.options_default.cm_config.extraKeys['Home'] = 'goLineLeft'; + * IPython.Cell.options_default.cm_config.extraKeys['End'] = 'goLineRight'; * * Instances are created later however and must be accessed using events: *