wezterm: Ensure CTRL and SHIFT mods passed through

These bindings ensure that wezterm understands (and informs the shell)
that `<C-Return>` and `<S-Return>` are different key binds than just
`<Return>` on its own.

For example 'euporie' uses it to mimic the python notebook 'enter means
newline but ctrl-enter means execute' style of quick coding.
This commit is contained in:
Marty Oehme 2024-06-17 08:30:06 +02:00
parent d8823d4661
commit c4f2522f2b
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -101,6 +101,8 @@ local keys = {
}, },
{ key = "a", mods = "CTRL|ALT", action = act.EmitEvent("toggle-leader") }, { key = "a", mods = "CTRL|ALT", action = act.EmitEvent("toggle-leader") },
{ key = "t", mods = "LEADER", action = act.EmitEvent("toggle-tabbar") }, { key = "t", mods = "LEADER", action = act.EmitEvent("toggle-tabbar") },
{ key = "Enter", mods = "CTRL", action = wezterm.action({ SendString = "\x1b[13;5u" }) },
{ key = "Enter", mods = "SHIFT", action = wezterm.action({ SendString = "\x1b[13;2u" }) },
} }
-- Leader + number to activate that tab -- Leader + number to activate that tab
for i = 1, 8 do for i = 1, 8 do