Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Default quit keymap - support for cmd+w on OSX #1902

Merged
merged 1 commit into from May 11, 2013

Conversation

Projects
None yet
4 participants
Contributor

cimarronm commented Apr 12, 2013

Updated default quit keymap to include cmd+w so people running on OS X would have a native cmd+w to close the window.

Member

pelson commented Apr 12, 2013

Thanks @cimarronm - I agree that any user on OSX should expect cmd+w to quit the plot window.

Is this on the macosx backend? For me, (tkagg on mountain lion) cmd+w quits anyway, I'd be interested to know how many of the other backends are the same. Maybe we should have a specific (non-configurable) keymapping in the macosx backend which adds this directly.

Contributor

cimarronm commented Apr 13, 2013

Yeah, this is on the macosx backend. It is the only one which generates a cmd modifier so I think the default keymap modification from ctrl+w to ctrl+w, cmd+w should be safe.

Updated default quit keymap to include cmd+w so people running on OS …
…X would have a native cmd+w to close the window.

efiring added a commit that referenced this pull request May 11, 2013

Merge pull request #1902 from cimarronm/native_osx_quit
Default quit keymap - support for cmd+w on OSX

@efiring efiring merged commit 9e734b6 into matplotlib:master May 11, 2013

1 check passed

default The Travis build passed
Details
Owner

efiring commented May 11, 2013

This works on the macosx backend, and does not change the others. tkagg apparently internally translates Ctrl-W into Cmd-W. Wx does the same, based on my version 2.9, for which mpl is mostly broken. qt4agg backend did nothing with Cmd-W before, and still does nothing. That's because it is calling the command prefix "super" instead of "cmd", after having un-done the swap that qt does: http://qt-project.org/doc/qt-4.8/qkeysequence.html.

Member

dmcdougall commented Jun 19, 2013

That's because it is calling the command prefix "super" instead of "cmd", after having un-done the swap that qt does: http://qt-project.org/doc/qt-4.8/qkeysequence.html.

I'd be amenable to opening an issue for that. Any objections?

Owner

efiring commented Jun 19, 2013

No objections.

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