Skip to content


Underline keyboard shortcut characters on appropriate buttons #718

merged 1 commit into from

2 participants

IPython member

This adds underlines on the relevant characters on buttons, so 'A' is underlined on Above, 'S' on Save, etc.

IPython member

Looks good to me, I just tested it and it works fine. Since we'd already discussed it and the code looks clean, merging. It's really useful to make the UI more discoverable/memorizable.

@fperez fperez merged commit de11baf into ipython:htmlnotebook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 22, 2011
  1. @minrk
2 IPython/frontend/html/notebook/static/js/savewidget.js
@@ -112,7 +112,7 @@ var IPython = (function (IPython) {
SaveWidget.prototype.status_save = function () {
- this.element.find('button#save_notebook').button('option', 'label', 'Save');
+ this.element.find('button#save_notebook').button('option', 'label', '<u>S</u>ave');
14 IPython/frontend/html/notebook/templates/notebook.html
@@ -42,7 +42,7 @@
<span id="save_widget">
<input type="text" id="notebook_name" size="20"></textarea>
<span id="notebook_id" style="display:none">{{notebook_id}}</span>
- <button id="save_notebook">Save</button>
+ <button id="save_notebook"><u>S</u>ave</button>
<span id="kernel_status">Idle</span>
@@ -87,29 +87,29 @@ <h3 class="section_header">Cell</h3>
<div class="section_content">
<div class="section_row">
<span class="section_row_buttons">
- <button id="delete_cell">Delete</button>
+ <button id="delete_cell"><u>D</u>elete</button>
<span class="section_row_header">Actions</span>
<div class="section_row">
<span id="cell_type" class="section_row_buttons">
- <button id="to_code">Code</button>
+ <button id="to_code"><u>C</u>ode</button>
<!-- <button id="to_html">HTML</button>-->
- <button id="to_markdown">Markdown</button>
+ <button id="to_markdown"><u>M</u>arkdown</button>
<span class="button_label">Format</span>
<div class="section_row">
<span id="cell_output" class="section_row_buttons">
- <button id="toggle_output">Toggle</button>
+ <button id="toggle_output"><u>T</u>oggle</button>
<button id="clear_all_output">ClearAll</button>
<span class="button_label">Output</span>
<div class="section_row">
<span id="insert" class="section_row_buttons">
- <button id="insert_cell_above">Above</button>
- <button id="insert_cell_below">Below</button>
+ <button id="insert_cell_above"><u>A</u>bove</button>
+ <button id="insert_cell_below"><u>B</u>elow</button>
<span class="button_label">Insert</span>
Something went wrong with that request. Please try again.