ctrl-z does not suspend to background in debugger #10254

Closed
nonagonal opened this Issue Feb 7, 2017 · 5 comments

Comments

Projects
None yet
3 participants
@nonagonal

I'm using IPython 5.2.2 under Ubuntu and within ipdb, ctrl-z no longer suspends the process.

It looks like the problem is that in terminal/debugger.py, the call to create_prompt_application is not passing enable_system_bindings=True, so prompt_toolkit is not enabling the shortcut ctrl-z -> suspend process.

Would it be possible to have system bindings enabled? From the prompt toolkit source it looks like this simply enabled ctrl-z on systems which support suspending the process. The only other side effects I see are applicable only in emacs and vi modes (where other system shortcuts are enabled).

@takluyver

This comment has been minimized.

Show comment
Hide comment
@takluyver

takluyver Feb 7, 2017

Member

You're always in one of emacs or vi modes (emacs is the default, vi is an option), so I'd like to know what the other ones are before doing this. If it's too much, we can just set a shortcut for Ctrl-Z specifically.

Member

takluyver commented Feb 7, 2017

You're always in one of emacs or vi modes (emacs is the default, vi is an option), so I'd like to know what the other ones are before doing this. If it's too much, we can just set a shortcut for Ctrl-Z specifically.

@nonagonal

This comment has been minimized.

Show comment
Hide comment
@nonagonal

nonagonal Feb 8, 2017

Aha I didn't realize you're always in one of those modes. There's indeed a few more then (from prompt_toolkit/key_binding/bindings/emacs.py): meta-! to open system prompt, esc/ctrl-g/ctrl-c to cancel it, ctrl-j to run a system command.

Aha I didn't realize you're always in one of those modes. There's indeed a few more then (from prompt_toolkit/key_binding/bindings/emacs.py): meta-! to open system prompt, esc/ctrl-g/ctrl-c to cancel it, ctrl-j to run a system command.

@takluyver

This comment has been minimized.

Show comment
Hide comment
@takluyver

takluyver Feb 8, 2017

Member

OK, I think in that case I'd rather just enable Ctrl-Z. PR coming up.

Member

takluyver commented Feb 8, 2017

OK, I think in that case I'd rather just enable Ctrl-Z. PR coming up.

@nonagonal

This comment has been minimized.

Show comment
Hide comment
@nonagonal

nonagonal Feb 8, 2017

Awesome, thanks! Apologies for my ignorance but should I close the issue or will someone else do that at a later time?

Awesome, thanks! Apologies for my ignorance but should I close the issue or will someone else do that at a later time?

@takluyver

This comment has been minimized.

Show comment
Hide comment
@takluyver

takluyver Feb 8, 2017

Member

No problem - it will get closed automatically when someone merges the PR.

Member

takluyver commented Feb 8, 2017

No problem - it will get closed automatically when someone merges the PR.

@Carreau Carreau closed this in #10261 Feb 9, 2017

meeseeksdev bot pushed a commit that referenced this issue Feb 9, 2017

@Carreau Carreau modified the milestone: no action May 30, 2017

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