T59: a plain click on the line the shell reads moves its cursor there, which a user asked for after 0.1.6, as Ghostty's cursor-click-to-move: while OSC 133 says the shell reads a line, a click that stays in its cell, past the prompt the cursor's line shows, sends Left or Right arrows through the key encoder, one per character, soft wraps joined; never on the alternate screen, under mouse tracking or with a selection

This commit is contained in:
ZacharyZhang-NY committed 2026-10-19 15:18:17 -04:00
1 parent 8ef91855cd
commit 82cfe91810
12 files changed
+234 -4

No files matched your search

+12
View File
@@ -121,6 +121,18 @@ impl TerminalView {
}
}
/// Presses and lets go of `name` without modifiers, as the keyboard would.
pub(super) fn tap_key(&mut self, name: &str, cx: &mut Context<Self>) {
let keystroke = Keystroke {
modifiers: Default::default(),
key: name.into(),
key_char: None,
};
let facts = Facts::default();
let record = self.send(&keystroke, Action::Press, facts, false, cx) == Some(true);
self.send(&keystroke, Action::Release, facts, record, cx);
}
/// Sends what `keystroke` means to the program: none when it is text the input method types, else whether it went as Windows' record; `pressed` says that of a held key's press.
fn send(
&mut self,