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

Projects

None yet

4 participants

@njsmith
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
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
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
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
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...?

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