diff --git a/ghostty/config b/ghostty/config index 38dc3ef..1996113 100644 --- a/ghostty/config +++ b/ghostty/config @@ -64,8 +64,13 @@ keybind = alt+right=unbind keybind = ctrl+shift+left=unbind keybind = ctrl+shift+right=unbind -# send CSI-u style codes for Ctrl+Shift+H/J/K/L +# send CSI-u style codes for Ctrl bindings keybind = ctrl+shift+h=csi:11~ keybind = ctrl+shift+j=csi:12~ keybind = ctrl+shift+k=csi:13~ keybind = ctrl+shift+l=csi:14~ +keybind = ctrl+1=csi:15~ +keybind = ctrl+2=csi:19~ +keybind = ctrl+3=csi:21~ +keybind = ctrl+4=csi:23~ +keybind = ctrl+5=csi:24~ diff --git a/nvim/lua/keymaps.lua b/nvim/lua/keymaps.lua index 87b75f0..5365778 100644 --- a/nvim/lua/keymaps.lua +++ b/nvim/lua/keymaps.lua @@ -66,16 +66,13 @@ utils.foreach({ vim.cmd.normal({ cmd }) end end }, - { "", ":$tabnew %", { silent = true }, }, - { "1", ":1tabn", { silent = true }, }, - { "2", ":2tabn", { silent = true }, }, - { "3", ":3tabn", { silent = true }, }, - { "4", ":4tabn", { silent = true }, }, - { "5", ":5tabn", { silent = true }, }, - { "6", ":6tabn", { silent = true }, }, - { "7", ":7tabn", { silent = true }, }, - { "8", ":8tabn", { silent = true }, }, - { "9", ":9tabn", { silent = true }, }, + { "", ":$tabnew %", { silent = true }, }, + -- These are mapped to C-1 through C-5 in ghostty, sending escape codes for F keys + { "", ":1tabn", { silent = true }, }, + { "", ":2tabn", { silent = true }, }, + { "", ":3tabn", { silent = true }, }, + { "", ":4tabn", { silent = true }, }, + { "", ":5tabn", { silent = true }, }, } }, {