prompt-toolkit / python-prompt-toolkit

Library for building powerful interactive command line applications in Python
https://python-prompt-toolkit.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
9.1k stars 717 forks source link

Can I bind _back_to_navigation from a multikey? #1790

Open idvorkin opened 8 months ago

idvorkin commented 8 months ago

VI folks often map a key sequence to escape, for example, I use fj like this in readline

bindkey -M viins 'fj' vi-cmd-mode

Can I do something similar? I see some keybinding code in prompttoolkit prompt, e.g. _back_to_navigation , but I don't know how to handle a double key.

I want this to enable the ability in ipython https://github.com/ipython/ipython/issues/14205