I am trying to create a keybinding for CMD (on Mac)/CTRL (on Linux) + Backspace to delete everything before the cursor. I cannot for the life of me figure out what key sequence I should use. I am currently trying this on a Mac (Alacritty terminal) but would like to learn about the correct sequence for Linux as well. I tried ^[[3;9~
, ^[[3;9?
and a few others but nothing seems to work. I was able to verify the functionality of my widget by using ^?
(just the backspace key) and it seems to work fine, I just can’t figure out how to combine it with the CMD/CTRL key. Any help would be much appreciated.
On a side note, could you help me decode what the key sequences mean? I have figured out that the last number is the combination of modifier keys and any letters that come after are the key being modified. What is the first number? What are the double square brackets? What is the semicolon? Why are some sequences only ^A
while others are include all the other stuff?
Thank you for your help.