feat(input): port keyboard, keybinding and mouse input handling
Ports ZIG/src/input (except macOS keymaps) into ghostty-input: - key, key_mods (incl. RemapSet), the physical keycode table - key_encode: legacy, modifyOtherKeys and kitty keyboard protocol encoders, function key tables - Binding: all keybinding actions with their user-visible docs (for +list-actions), triggers, sets with sequences, chains, leader keys and key tables, and formatting back to config strings - command palette defaults, mouse, paste safety checks, kitty helpers, links, helpgen action docs Deviations (docs/rewrite/notes/ghostty-input.md): Mods.super is named super_; case folding uses char::to_lowercase plus Ghostty's special cases instead of uucode tables; chain parents are trigger paths instead of pointers; a Zig bug where chained leaves inside sequences corrupted the shared prefix when formatting is fixed (covered by a test). Integration left: building encode/paste Options from terminal modes, and implementing the EntryFormatter trait in ghostty-config. Test Plan: - cargo test -p ghostty-input (220 tests; 8 macOS-only skipped) - cargo clippy -p ghostty-input --all-targets -- -D warnings
This commit is contained in:
1 parent
5b8c92b98c
commit
e03432241b
21 files changed
+13413
-1
No files matched your search
@@ -0,0 +1,13 @@
|
||||
//! Input-related config enums (ZIG/src/input/config.zig).
|
||||
|
||||
/// Determines the macOS option key behavior. See the config
|
||||
/// `macos-option-as-alt` for a lot more details.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
|
||||
#[repr(i32)]
|
||||
pub enum OptionAsAlt {
|
||||
#[default]
|
||||
False,
|
||||
True,
|
||||
Left,
|
||||
Right,
|
||||
}
|
||||
Reference in new issue
Block a user