终端配置
Pi 使用 Kitty 键盘协议 实现可靠的修饰键检测。
开箱即用
- Kitty
- iTerm2
Ghostty
在 Ghostty 配置中添加:
keybind = alt+backspace=text:\x1b\x7f
WezTerm
创建 ~/.wezterm.lua:
local wezterm = require 'wezterm'
local config = wezterm.config_builder()
config.enable_kitty_keyboard = true
return config
Windows Terminal
无需特殊配置。
VS Code 集成终端
在 keybindings.json 中添加:
[
{
"key": "enter",
"mods": "shift",
"command": "type",
"args": { "text": "\n" }
}
]