Skip to content

Control + Backspace is not recognized #6622

Closed

Description

@Saturn745

Describe the bug

Control + Backspace is not recognized as a keybind.

How to reproduce

  1. Execute keybindings listen
  2. Press Control + Backspace

Expected behavior

I expect it to be detected.

Screenshots

No response

Configuration

key value
version 0.68.2
branch main
commit_hash f764758
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.63.0 (Fedora 1.63.0-1.fc36)
cargo_version cargo 1.63.0
pkg_version 0.68.2
build_time 2022-09-26 19:39:03 -07:00
build_rust_channel release
features database, dataframe, default, trash, which, zip
installed_plugins

Additional context

No response

Activity

  1. fdncred commented on Sep 27, 2022

    @fdncred
    Contributor

    If keybindings listen doesn't see ctrl+backspace it could be your terminal or the particular version of crossterm we're using (0.24). I think on *nix systems this is mostly fixed with crossterm 0.25 but it's not integrated into reedline yet. My general comment to people that don't get a response with keybindings listen is that your terminal doesn't support it.

  2. Saturn745 commented on Sep 27, 2022

    @Saturn745
    Author

    If keybindings listen doesn't see ctrl+backspace it could be your terminal or the particular version of crossterm we're using (0.24). I think on *nix systems this is mostly fixed with crossterm 0.25 but it's not integrated into reedline yet. My general comment to people that don't get a response with keybindings listen is that your terminal doesn't support it.

    I would assume that my terminal supports it as I had previously been using zsh shell with ctrl+backspace in the same terminal.

  3. fdncred commented on Sep 27, 2022

    @fdncred
    Contributor

    Then it's a crossterm problem. Hopefully that PR listed above in reedline will help, if we can get it landed sometime soon.

  4. Saturn745 commented on Sep 27, 2022

    @Saturn745
    Author

    Any ETA on will that will be merged?

  5. fdncred commented on Sep 28, 2022

    @fdncred
    Contributor

    no eta - hopefully within the next 3 weeks.

  6. Saturn745 commented on Sep 28, 2022

    @Saturn745
    Author

    no eta - hopefully within the next 3 weeks.

    Alright, thanks!

  7. added
    category:upstream
    A:line-editor
    deprecated:platform-specific
    on Sep 28, 2022
  8. Saturn745 commented on Nov 26, 2022

    @Saturn745
    Author

    Any updates?

  9. fdncred commented on Nov 26, 2022

    @fdncred
    Contributor

    That PR is looking for someone to finish it. Feel free to jump in and help.

  10. Saturn745 commented on Nov 26, 2022

    @Saturn745
    Author

    That PR is looking for someone to finish it. Feel free to jump in and help.

    Alright! I will take a look here in a bit.

  11. weirdan commented on Aug 14, 2024

    @weirdan
    Contributor

    This works for me with nu 0.96 in wezterm 20240203-110809-5046fc22 on Debian Sid, with kitty keyboard protocol enabled in wezterm and nu:

    $ keybindings listen
    Type any key combination to see key details. Press ESC to abort.
    code: Backspace, modifier: KeyModifiers(CONTROL), flags: 0b000010, kind: Press, state: KeyEventState(0x0)
    code: Backspace, modifier: KeyModifiers(SHIFT), flags: 0b000001, kind: Press, state: KeyEventState(0x0)
    code: Backspace, modifier: KeyModifiers(ALT), flags: 0b000100, kind: Press, state: KeyEventState(0x0)
    code: Backspace, modifier: KeyModifiers(SUPER), flags: 0b001000, kind: Press, state: KeyEventState(0x0)
  12. sholderbach commented on Aug 14, 2024

    @sholderbach
    Member

    Does it work without the kitty keyboard protocol?

  13. weirdan commented on Aug 14, 2024

    @weirdan
    Contributor

    Does it work without the kitty keyboard protocol?

    No, and it probably won't. Kitty protocol was invented for a reason.

    The same sequence of keypresses produces the following with kitty protocol disabled:

    $ keybindings listen
    Type any key combination to see key details. Press ESC to abort.
    char: h, code: 0x000068, modifier: KeyModifiers(CONTROL), flags: 0b000010, kind: Press, state: KeyEventState(0x0)
    code: Backspace, modifier: KeyModifiers(0x0), flags: 0b000000, kind: Press, state: KeyEventState(0x0)
    code: Backspace, modifier: KeyModifiers(ALT), flags: 0b000100, kind: Press, state: KeyEventState(0x0)
    code: Backspace, modifier: KeyModifiers(0x0), flags: 0b000000, kind: Press, state: KeyEventState(0x0)
  14. sholderbach commented on Aug 15, 2024

    @sholderbach
    Member

    Yeah kind of expected that based on how the OG ANSI terminal protocol works.

    So the resolution for this issue if you care about those extra bindings, use a terminal that supports the kitty keyboard enhancement protocol and enable the option for it.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A:line-editorcategory:upstreamdeprecated:platform-specific

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions