Skip to content

matplotlib %notebook steals focus in jupyter notebooks #4758

Closed

Description

@ericdill

On matplotlib master, executing a cell that displays a plot steals focus from the jupyter notebook with the %matplotlib notebook magic enabled. By 'steals focus' I mean that the only key combination that will interact with the notebook is shift+enter, which @tacaswell tells me is because matplotlib special cases that one. I'm conflicted by this behavior, as, I can see compelling arguments for both stealing keyboard focus and NOT stealing keyboard focus. I personally like using the notebook keyboard shortcuts (up arrow to move up, down arrow to move down, 00 to restart the kernel, etc...), so this is very disruptive behaviour to my work flow. I would be happy with a new keyboard shortcut in the matplotlib notebook front-end that returns focus to the notebook.

Activity

  1. added this to the milestone on Jul 22, 2015
  2. ericdill commented on Jul 23, 2015

    @ericdill
    ContributorAuthor

    @tacaswell so shift+enter actually does exactly what I suggested above. I thought that, once the mpl widget stole the focus that shift+enter was executing the next cell. In actuality, it is returning focus to the notebook and moving to the next cell, but not executing it. My apologies for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions