Solvedalacritty Alt-Left/Right and Home/End don't work and prevent alacritty from closing

Not sure what's up but Alt-Left, Alt-Right, Home, and End do not work as expected.

For example: hitting Alt-Left will make the terminal flash and then type a literal D.

However hitting Alt-b works and does the config suggets Alt-Left should do. Issue with escaping somehow?

Even weirder is that after I try any of those "faulty" shortcuts typing exit does not quit the terminal and the entire program seems to freeze. It's not even possible to close the window by hitting the "X" in the corner. I have to manually kill the process.

Config is pretty much default:

key_bindings:
  - { key: V,        mods: Shift|Control, action: Paste                        }
  - { key: C,        mods: Shift|Control, action: Copy                         }
  - { key: Home,                    chars: "\x1b[H",   mode: ~AppCursor  }
  - { key: Home,                    chars: "\x1b[1~",  mode: AppCursor   }
  - { key: End,                     chars: "\x1b[F",   mode: ~AppCursor  }
  - { key: End,                     chars: "\x1b[4~",  mode: AppCursor   }
  - { key: PageUp,                  chars: "\x1b[5~"                     }
  - { key: PageDown,                chars: "\x1b[6~"                     }
  - { key: Left,     mods: Shift,   chars: "\x1b[1;2D"                   }
  - { key: Left,     mods: Control, chars: "\x1b[1;5D"                   }
  - { key: Left,     mods: Alt,     chars: "\x1b[1;3D"                   }
  - { key: Left,                    chars: "\x1b[D",   mode: ~AppCursor  }
  - { key: Left,                    chars: "\x1bOD",   mode: AppCursor   }
  - { key: Right,    mods: Shift,   chars: "\x1b[1;2C"                   }
  - { key: Right,    mods: Control, chars: "\x1b[1;5C"                   }
  - { key: Right,    mods: Alt,     chars: "\x1b[1;3C"                   }
  - { key: Right,                   chars: "\x1b[C",   mode: ~AppCursor  }
  - { key: Right,                   chars: "\x1bOC",   mode: AppCursor   }
  - { key: Up,       mods: Shift,   chars: "\x1b[1;2A"                   }
  - { key: Up,       mods: Control, chars: "\x1b[1;5A"                   }
  - { key: Up,       mods: Alt,     chars: "\x1b[1;3A"                   }
  - { key: Up,                      chars: "\x1b[A",   mode: ~AppCursor  }
  - { key: Up,                      chars: "\x1bOA",   mode: AppCursor   }
  - { key: Down,     mods: Shift,   chars: "\x1b[1;2B"                   }
  - { key: Down,     mods: Control, chars: "\x1b[1;5B"                   }
  - { key: Down,     mods: Alt,     chars: "\x1b[1;3B"                   }
  - { key: Down,                    chars: "\x1b[B",   mode: ~AppCursor  }
  - { key: Down,                    chars: "\x1bOB",   mode: AppCursor   }
  - { key: F1,                      chars: "\x1bOP"                      }
  - { key: F2,                      chars: "\x1bOQ"                      }
  - { key: F3,                      chars: "\x1bOR"                      }
  - { key: F4,                      chars: "\x1bOS"                      }
  - { key: F5,                      chars: "\x1b[15~"                    }
  - { key: F6,                      chars: "\x1b[17~"                    }
  - { key: F7,                      chars: "\x1b[18~"                    }
  - { key: F8,                      chars: "\x1b[19~"                    }
  - { key: F9,                      chars: "\x1b[20~"                    }
  - { key: F10,                     chars: "\x1b[21~"                    }
  - { key: F11,                     chars: "\x1b[23~"                    }
  - { key: F12,                     chars: "\x1b[24~"                    }
  - { key: Back,                    chars: "\x7f"                        }
  - { key: Delete,                  chars: "\x1b[3~",  mode: AppKeypad   }
  - { key: Delete,                  chars: "\x1b[P",   mode: ~AppKeypad  }
18 Answers

✔️Accepted Answer

@spacecowboy I added the following lines to support skipping words via Alt+Left and Alt+Right on macOS:

  - { key: Left,     mods: Alt,     chars: "\x1bb"                       } # Skip word left
  - { key: Right,    mods: Alt,     chars: "\x1bf"                       } # Skip word right
  - { key: Left,     mods: Command, chars: "\x1bOH",   mode: AppCursor   } # Home
  - { key: Right,    mods: Command, chars: "\x1bOF",   mode: AppCursor   } # End
  - { key: Back,     mods: Command, chars: "\x15"                        } # Delete line
  - { key: Back,     mods: Alt,     chars: "\x1b\x7f"                    } # Delete word

(thanks to #93)

I'm still trying to figure out how to get Command+Left (home), Command+Right (End), Command+Delete (delete line) to work, however. (Edited)

EDIT (2021): Updated to include all macOS bindings.

More Issues: