added key handler for control-s to notebook, seems to work pretty well #1334
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
There was a thread on the dev list about key bindings and hooking ctrl-save to trigger a new save (http://mail.scipy.org/pipermail/ipython-dev/2012-January/008674.html).
What makes this hard is that the browser will only trigger keyboard events for the element that currently has focus. To see what this means, open a google docs spreadsheet. Hit ctrl-s, and you'll see a quick status in the header that your doc is being saved. Now, click on a menu and leave the menu dropped down - ctrl-s now will ask you to (completely pointlessly) save the html of the page. In google's spreadsheet this oddity is almost never an issue, because you almost never notice this discrepancy as you're almost always keyboard focused on the sheet.
In the updated UI, notebook's layout has the same convenient property as google docs, where focus is almost always in the notebook element or a child. The only way I was able to end up without focus in the notebook was to click the menu. As long as a menu is dropped down, the ctrl-s triggers the browser's dialog.
thanks,
fawce
p.s.
This PR is from a branch based on a pull from ellisonbg/master.