From 8f111d0f8d98e210cd27610d20aa2057fb9eeaa1 Mon Sep 17 00:00:00 2001 From: Alexander Belopolsky Date: Mon, 16 Mar 2015 14:12:12 -0400 Subject: [PATCH] Added basic scroll to bottom binding for ctrl-l. --- IPython/html/static/notebook/js/actions.js | 9 +++++++++ IPython/html/static/notebook/js/keyboardmanager.js | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/IPython/html/static/notebook/js/actions.js b/IPython/html/static/notebook/js/actions.js index d3f194e9f..7fcd6b4b2 100644 --- a/IPython/html/static/notebook/js/actions.js +++ b/IPython/html/static/notebook/js/actions.js @@ -368,6 +368,15 @@ define(function(require){ return env.notebook.scroll_manager.scroll(-1); }, }, + 'recenter-top-bottom': { + help: "Move the current cell to the center, top or bottom", + handler: function (env, event) { + if(event){ + event.preventDefault(); + } + return env.notebook.scroll_to_bottom(); + } + }, 'save-notebook':{ help: "Save and Checkpoint", help_index : 'fb', diff --git a/IPython/html/static/notebook/js/keyboardmanager.js b/IPython/html/static/notebook/js/keyboardmanager.js index 82d3d36e2..3e41fa740 100644 --- a/IPython/html/static/notebook/js/keyboardmanager.js +++ b/IPython/html/static/notebook/js/keyboardmanager.js @@ -79,7 +79,8 @@ define([ 'up' : 'ipython.move-cursor-up-or-previous-cell', 'down' : 'ipython.move-cursor-down-or-next-cell', 'ctrl-shift--' : 'ipython.split-cell-at-cursor', - 'ctrl-shift-subtract' : 'ipython.split-cell-at-cursor' + 'ctrl-shift-subtract' : 'ipython.split-cell-at-cursor', + 'ctrl-l' : 'ipython.recenter-top-bottom' }; };