Escape: Close pager if open otherwise unmark all

pull/657/head
Jonathan Frederic 10 years ago
parent aaffd891b5
commit 33bd6d4d1e

@ -437,7 +437,18 @@ define(function(require){
$('.header-bar').toggle();
events.trigger('resize-header.Page');
}
}
},
'escape': {
help : 'close the pager or unmark all cells',
handler : function(env) {
// Collapse the page if it is open, otherwise unmark all.
if (env.pager && env.pager.expanded) {
env.pager.collapse();
} else {
env.notebook.unmark_all_cells();
}
}
},
};
/**

@ -96,7 +96,7 @@ define([
'i,i' : 'jupyter-notebook:interrupt-kernel',
'0,0' : 'jupyter-notebook:confirm-restart-kernel',
'd,d' : 'jupyter-notebook:delete-cell',
'esc': 'jupyter-notebook:close-pager',
'esc': 'jupyter-notebook:escape',
'up' : 'jupyter-notebook:select-previous-cell',
'k' : 'jupyter-notebook:select-previous-cell',
'j' : 'jupyter-notebook:select-next-cell',

Loading…
Cancel
Save