Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control Backspace mapping #51

Closed
orhnk opened this issue Jul 15, 2023 · 2 comments
Closed

Control Backspace mapping #51

orhnk opened this issue Jul 15, 2023 · 2 comments

Comments

@orhnk
Copy link

orhnk commented Jul 15, 2023

Summary

When I press ctrl+backspace I expect the last word to get deleted but the last character gets.

Note: Generally these kind of issues relate to terminal emulator mappings.


I had the same issue when using kitty & alacritty.

  • Here is the solution I used to address this on kitty:
map ctrl+backspace send_text all \x17
@orhnk
Copy link
Author

orhnk commented Jul 16, 2023

Here are some info about st termkeys.

It turns out to be ctrl-alt-h deletes the previous word.
Also I didn't realized that I can achieve the same thing using alt-backspace.

I just need to map a key for it

@orhnk
Copy link
Author

orhnk commented Jul 16, 2023

Wasted time on finding the keybinding instead of trying the kitty's mapping.

Note I thought It was ^[^H or ^[^? as it was the result of showkey -a for ctrl + alr + h and alt + backspace
which were deleting the whole word previously

I have added this to my configuration:

static Key key[] = {
  /*
      ...
  */
  /* keysym           mask            string      appkey appcursor */
  { XK_BackSpace,     ControlMask,    "\x17",          0,    0},
  /*
      ...
  */
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant