[IPython-dev] Min: Cmd-P/Ctrl-P for new print code question..
Tue Oct 26 15:51:32 CDT 2010
On Tue, Oct 26, 2010 at 1:06 PM, Fernando Perez <email@example.com> wrote:
> Hey Min,
> in console/console_widget.py:
> e11b615e (MinRK 2010-10-18 16:34:07 -0700 170) #
> Configure actions.
> e11b615e (MinRK 2010-10-18 16:34:07 -0700 171)
> action = QtGui.QAction('Print', None)
> e11b615e (MinRK 2010-10-18 16:34:07 -0700 172)
> e11b615e (MinRK 2010-10-18 16:34:07 -0700 173)
> e11b615e (MinRK 2010-10-18 16:34:07 -0700 174)
> e11b615e (MinRK 2010-10-18 16:34:07 -0700 175)
> e11b615e (MinRK 2010-10-18 16:34:07 -0700 176)
> self._print_action = action
> you added in line 173 the default print keybinding to the Print
> action. One problem that introduces is that it overwrites the
> keybinding we had for Ctrl-P, which was equivalent to 'smart up arrow'
> (history-aware). Since that keybinding has been there for a long
> time, is consistent with the terminal and we want to preserve as much
> similarity as reasonable with habits from the terminal, we need to
> change this. I think a reasonable compromise is to make:
> Ctrl-P -> 'smart up arrow'
> Ctrl-Shift-P -> Print
> But I don't want to make any changes, as I don't know if on the Mac,
> there is no problem. I don't know if on the mac, Control-p and Cmd-p
> are different, so that Ctrl-p remains as before and only Cmd-p goes to
Yes, on the Mac I think this is the right approach.
> If that's the case, then we should probably leave it as you did for
> the Mac, and only change the keybinding for Linux/windows (which don't
> have a separate Cmd key).
> IPython-dev mailing list
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
More information about the IPython-dev