This was very helpful, thank you Matthias.

For convenience, here is how to dump the list of Jupyter commands to 
console from a notebooks:

%%javascript
console.log(Object.keys(IPython.notebook.keyboard_manager.command_shortcuts.actions._actions))


...and here is how to print a list of Jupyter commands as notebook cell 
output:

from IPython.core.display import Javascript

js = """
  var jc_html = "";
  var jc_array = 
Object.keys(IPython.notebook.keyboard_manager.command_shortcuts.actions._actions);
  for (var i=0;i<jc_array.length;i++) {
    jc_html = jc_html + jc_array[i] + "<br >";
  }
  element.html(jc_html);
  """

Javascript(data=js, lib=None, css=None)



On Friday, October 14, 2016 at 9:29:50 PM UTC-7, Peter Cederholm wrote:
>
> Thank you, Matthias
>
> (: Peter
>
> Den fredag den 14. oktober 2016 kl. 19.36.21 UTC+2 skrev Matthias 
> Bussonnier:
>>
>> It's kind of a hackish way but in classical notebooks you can do the 
>> following in a Js Console: 
>>
>> >>> 
>> Object.keys(IPython.notebook.keyboard_manager.command_shortcuts.actions._actions)
>>  
>>
>>
>> Which for me give the following: 
>>
>> ["jupyter-notebook:restart-kernel", 
>> "jupyter-notebook:confirm-restart-kernel", 
>> "jupyter-notebook:restart-kernel-and-run-all-cells", 
>> "jupyter-notebook:confirm-restart-kernel-and-run-all-cells", 
>> "jupyter-notebook:restart-kernel-and-clear-output", 
>> "jupyter-notebook:confirm-restart-kernel-and-clear-output", 
>> "jupyter-notebook:interrupt-kernel", 
>> "jupyter-notebook:run-cell-and-select-next", 
>> "jupyter-notebook:run-cell", 
>> "jupyter-notebook:run-cell-and-insert-below", 
>> "jupyter-notebook:run-all-cells", 
>> "jupyter-notebook:run-all-cells-above", 
>> "jupyter-notebook:run-all-cells-below", 
>> "jupyter-notebook:enter-command-mode", 
>> "jupyter-notebook:split-cell-at-cursor", 
>> "jupyter-notebook:enter-edit-mode", 
>> "jupyter-notebook:select-previous-cell", 
>> "jupyter-notebook:select-next-cell", 
>> "jupyter-notebook:extend-selection-above", 
>> "jupyter-notebook:extend-selection-below", 
>> "jupyter-notebook:cut-cell", "jupyter-notebook:copy-cell", 
>> "jupyter-notebook:paste-cell-above", 
>> "jupyter-notebook:paste-cell-below", 
>> "jupyter-notebook:insert-cell-above", 
>> "jupyter-notebook:insert-cell-below", 
>> "jupyter-notebook:change-cell-to-code", 
>> "jupyter-notebook:change-cell-to-markdown", 
>> "jupyter-notebook:change-cell-to-raw", 
>> "jupyter-notebook:change-cell-to-heading-1", 
>> "jupyter-notebook:change-cell-to-heading-2", 
>> "jupyter-notebook:change-cell-to-heading-3", 
>> "jupyter-notebook:change-cell-to-heading-4", 
>> "jupyter-notebook:change-cell-to-heading-5", 
>> "jupyter-notebook:change-cell-to-heading-6", 
>> "jupyter-notebook:toggle-cell-output-collapsed", 
>> "jupyter-notebook:toggle-cell-output-scrolled", 
>> "jupyter-notebook:clear-cell-output", 
>> "jupyter-notebook:move-cell-down", "jupyter-notebook:move-cell-up", 
>> "jupyter-notebook:toggle-cell-line-numbers", 
>> "jupyter-notebook:show-keyboard-shortcuts", 
>> "jupyter-notebook:delete-cell", "jupyter-notebook:undo-cell-deletion", 
>> "jupyter-notebook:merge-cell-with-previous-cell", 
>> "jupyter-notebook:merge-cell-with-next-cell", 
>> "jupyter-notebook:merge-selected-cells", 
>> "jupyter-notebook:merge-cells", 
>> "jupyter-notebook:show-command-palette", 
>> "jupyter-notebook:toggle-toolbar", "jupyter-notebook:toggle-header", 
>> "jupyter-notebook:close-pager", "jupyter-notebook:ignore", 
>> "jupyter-notebook:move-cursor-up", 
>> "jupyter-notebook:move-cursor-down", 
>> "jupyter-notebook:scroll-notebook-down", 
>> "jupyter-notebook:scroll-notebook-up", 
>> "jupyter-notebook:scroll-cell-center", 
>> "jupyter-notebook:scroll-cell-top", 
>> "jupyter-notebook:duplicate-notebook", 
>> "jupyter-notebook:trust-notebook", "jupyter-notebook:rename-notebook", 
>> "jupyter-notebook:toggle-all-cells-output-collapsed", 
>> "jupyter-notebook:toggle-all-cells-output-scrolled", 
>> "jupyter-notebook:clear-all-cells-output", 
>> "jupyter-notebook:save-notebook", "jupyter-notebook:find-and-replace", 
>> "widgets:save-widget-state", "widgets:embed-interactive-widgets", 
>> "widgets:save-with-snapshots", "nbpresent:show-sorter", 
>> "nbpresent:show-presentation"] 
>>
>> It's dynamic and may depend (a bit) on your system. 
>>
>> Note that the Js API is not guarantied to be stable. 
>> -- 
>> M 
>>
>> On Thu, Oct 13, 2016 at 11:52 PM, Peter Cederholm 
>> <cederho...@gmail.com> wrote: 
>> > Hi 
>> > 
>> > I have been looking for a complete list of Jupyter commands (like 
>> > clear_all_output(), execute_cell(), ... and so on). Where/how do I find 
>> it? 
>> > Any clues? 
>> > 
>> > Regards 
>> > Peter 
>> > 
>> > -- 
>> > You received this message because you are subscribed to the Google 
>> Groups 
>> > "Project Jupyter" group. 
>> > To unsubscribe from this group and stop receiving emails from it, send 
>> an 
>> > email to jupyter+u...@googlegroups.com. 
>> > To post to this group, send email to jup...@googlegroups.com. 
>> > To view this discussion on the web visit 
>> > 
>> https://groups.google.com/d/msgid/jupyter/ac36e454-89c7-464f-851d-b8f07a096f39%40googlegroups.com.
>>  
>>
>> > For more options, visit https://groups.google.com/d/optout. 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/407b68d2-032c-44f1-97a6-0de2604f3cde%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to