Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In PTK terminal, would be nice if shift-enter and control-enter acted like alt-enter #9587

Open
njsmith opened this issue Jun 9, 2016 · 5 comments
Milestone

Comments

@njsmith
Copy link
Contributor

njsmith commented Jun 9, 2016

In the notebook, shift-enter, control-enter, and alt-enter all evaluate the current cell (and then do different things).

With 5.0-beta with the new prompt toolkit stuff in the terminal, alt-enter evaluates the current cell, but shift-enter and control-enter act like regular enter, i.e., they insert a new blank indented line. This is annoying if my fingers reach for the wrong one, because then I have to backspace out the indentation etc. (Also I was misremembering how the notebook worked, and was trying control-enter first, and got frustrated.)

@takluyver
Copy link
Member

IIRC, the only ?-enter combo we can detect in a reliable way in the terminal is alt-enter. See #9401. PTK is amazing, but some things are still not possible.

@Carreau Carreau added this to the wishlist milestone Jun 9, 2016
@embray
Copy link
Contributor

embray commented Sep 2, 2016

And for some reason in mintty Alt-Enter is being caught and handled the same as Alt-F11, which is the shortcut for Full Screen. Not sure why, but just thought I'd make a note of it :)

@takluyver
Copy link
Member

I'm told that in some terminals Alt-Enter is not detected either, and you have to do Esc, Enter (i.e. press and release escape, then press and release enter). I don't think there's much we can do about any of this, because it depends on the terminal emulator, but I'm happy to be proved wrong.

@embray
Copy link
Contributor

embray commented Sep 2, 2016

Thanks for the hint--I'll try it out. I agree there's probably not much for IPython to do, other than have an easy way to set alternate key bindings...?

@takluyver
Copy link
Member

Not the easiest, but it is possible: http://ipython.readthedocs.io/en/stable/config/details.html#keyboard-shortcuts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants