prompt-toolkit/python-prompt-toolkit

[feature] support c-enter/c-s-enter/s-enter

Opened this issue · 0 comments

showkey -a display:

  • Shift + Enter: ^[[27;2;13~
  • Control + Enter: ^[[27;5;13~
  • Control + Shift + Enter: ^[[27;6;13~

First, prompt-toolkit miss c-enter, s-enter, ...

Second, Even if I

    @add_key_binding(*["escape", "[27;2;13~"])
    def _(event: KeyPressEvent) -> None:
        print("hi")

It still cannot work.

Weirdly, the following keys can work.

  • Alt + Control + Enter
  • Alt + Control + Shift + Enter
    @add_key_binding(["escape", *"[27;8;13~"])
    def _(event: KeyPressEvent) ->jkone:
        print("hi")