##// END OF EJS Templates
Remove 5s wait on inactivity on GUI inputhook loops...
Remove 5s wait on inactivity on GUI inputhook loops The 5s (and 1s) waits were originally added in commit 5074878, but the 5 second wait meant if you left the console for 5+ minutes idle, it would take up to 5 seconds for a response to a keypress. This tradeoff of CPU cycles for battery life seems too far. Note that commit 5074878 was originally for wx, glut and pyglet are based on the wx version and came into existence after commit 5074878.

File last commit:

r12103:dc60758c
r13125:f9e20986
Show More
quickhelp.js
76 lines | 3.1 KiB | application/javascript | JavascriptLexer
Fernando Perez
Add quick help button: broken ATM, style and binding aren't working....
r5023 //----------------------------------------------------------------------------
// Copyright (C) 2008-2011 The IPython Development Team
//
// Distributed under the terms of the BSD License. The full license is in
// the file COPYING, distributed as part of this software.
//----------------------------------------------------------------------------
//============================================================================
MinRK
fix quickhelp widget...
r5066 // QuickHelp button
Fernando Perez
Add quick help button: broken ATM, style and binding aren't working....
r5023 //============================================================================
var IPython = (function (IPython) {
Matthias BUSSONNIER
"use strict" in most (if not all) our javascript...
r12103 "use strict";
Fernando Perez
Add quick help button: broken ATM, style and binding aren't working....
r5023
MinRK
fix quickhelp widget...
r5066 var QuickHelp = function (selector) {
Fernando Perez
Add quick help button: broken ATM, style and binding aren't working....
r5023 };
Brian Granger
Cleaning up menu code....
r5858 QuickHelp.prototype.show_keyboard_shortcuts = function () {
// toggles display of keyboard shortcut dialog
Fernando Perez
Add quick help button: broken ATM, style and binding aren't working....
r5023 var that = this;
Brian Granger
Cleaning up menu code....
r5858 if ( this.shortcut_dialog ){
// if dialog is already shown, close it
MinRK
tweak quick-help...
r10939 $(this.shortcut_dialog).modal("toggle");
Brian Granger
Cleaning up menu code....
r5858 return;
}
MinRK
bootstrapify quickhelp
r10922 var body = $('<div/>');
Brian Granger
Cleaning up menu code....
r5858 var shortcuts = [
{key: 'Shift-Enter', help: 'run cell'},
{key: 'Ctrl-Enter', help: 'run cell in-place'},
Zoltán Vörös
Added new short key for cell execution
r7806 {key: 'Alt-Enter', help: 'run cell, insert below'},
Brian Granger
Adding keyboard sortcuts for cut/copy/paste.
r5880 {key: 'Ctrl-m x', help: 'cut cell'},
{key: 'Ctrl-m c', help: 'copy cell'},
{key: 'Ctrl-m v', help: 'paste cell'},
Brian Granger
Cleaning up menu code....
r5858 {key: 'Ctrl-m d', help: 'delete cell'},
David Warde-Farley
Move undo quickhelp to more appropriate spot.
r8692 {key: 'Ctrl-m z', help: 'undo last cell deletion'},
damianavila
Added '-' as a shortcut for splitting cells.
r11276 {key: 'Ctrl-m -', help: 'split cell'},
Brian Granger
Cleaning up menu code....
r5858 {key: 'Ctrl-m a', help: 'insert cell above'},
{key: 'Ctrl-m b', help: 'insert cell below'},
Brian Granger
Updating JS part of plaintext cell handling.
r6027 {key: 'Ctrl-m o', help: 'toggle output'},
MinRK
add toggle output scroll to quickhelp
r7430 {key: 'Ctrl-m O', help: 'toggle output scroll'},
Brian Granger
Cleaning up menu code....
r5858 {key: 'Ctrl-m l', help: 'toggle line numbers'},
{key: 'Ctrl-m s', help: 'save notebook'},
{key: 'Ctrl-m j', help: 'move cell down'},
{key: 'Ctrl-m k', help: 'move cell up'},
Brian Granger
Adding keyboard sortcuts for cut/copy/paste.
r5880 {key: 'Ctrl-m y', help: 'code cell'},
Brian Granger
Cleaning up menu code....
r5858 {key: 'Ctrl-m m', help: 'markdown cell'},
MinRK
rename plaintext cell -> raw cell
r6248 {key: 'Ctrl-m t', help: 'raw cell'},
Brian Granger
Fixing minor bugs in nbformat and saving....
r6032 {key: 'Ctrl-m 1-6', help: 'heading 1-6 cell'},
Brian Granger
Cleaning up menu code....
r5858 {key: 'Ctrl-m p', help: 'select previous'},
{key: 'Ctrl-m n', help: 'select next'},
{key: 'Ctrl-m i', help: 'interrupt kernel'},
{key: 'Ctrl-m .', help: 'restart kernel'},
David Warde-Farley
Move undo quickhelp to more appropriate spot.
r8692 {key: 'Ctrl-m h', help: 'show keyboard shortcuts'}
Brian Granger
Cleaning up menu code....
r5858 ];
for (var i=0; i<shortcuts.length; i++) {
Paul Ivanov
two column quickhelp dialog, closes #3895...
r11981 body.append($('<div>').addClass('quickhelp').
Brian Granger
Cleaning up menu code....
r5858 append($('<span/>').addClass('shortcut_key').html(shortcuts[i].key)).
append($('<span/>').addClass('shortcut_descr').html(' : ' + shortcuts[i].help))
);
};
MinRK
bootstrapify quickhelp
r10922 this.shortcut_dialog = IPython.dialog.modal({
title : "Keyboard shortcuts",
body : body,
MinRK
tweak quick-help...
r10939 destroy : false,
MinRK
bootstrapify quickhelp
r10922 buttons : {
Close : {}
}
Fernando Perez
Add quick help button: broken ATM, style and binding aren't working....
r5023 });
};
// Set module variables
MinRK
fix quickhelp widget...
r5066 IPython.QuickHelp = QuickHelp;
Fernando Perez
Add quick help button: broken ATM, style and binding aren't working....
r5023
return IPython;
}(IPython));