mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
website: document srm mode
This commit is contained in:
@ -147,6 +147,7 @@ pub fn modeFromInt(v: u16, ansi: bool) ?Mode {
|
||||
}
|
||||
|
||||
fn entryForMode(comptime mode: Mode) ModeEntry {
|
||||
@setEvalBranchQuota(10_000);
|
||||
const name = @tagName(mode);
|
||||
for (entries) |entry| {
|
||||
if (std.mem.eql(u8, entry.name, name)) return entry;
|
||||
@ -172,6 +173,7 @@ const entries: []const ModeEntry = &.{
|
||||
// ANSI
|
||||
.{ .name = "disable_keyboard", .value = 2, .ansi = true }, // KAM
|
||||
.{ .name = "insert", .value = 4, .ansi = true },
|
||||
.{ .name = "send_receive_mode", .value = 12, .ansi = true, .default = true }, // SRM
|
||||
|
||||
// DEC
|
||||
.{ .name = "cursor_keys", .value = 1 }, // DECCKM
|
||||
@ -213,7 +215,7 @@ test modeFromInt {
|
||||
try testing.expect(modeFromInt(4, true).? == .insert);
|
||||
try testing.expect(modeFromInt(9, true) == null);
|
||||
try testing.expect(modeFromInt(9, false).? == .mouse_event_x10);
|
||||
try testing.expect(modeFromInt(12, true) == null);
|
||||
try testing.expect(modeFromInt(14, true) == null);
|
||||
}
|
||||
|
||||
test ModeState {
|
||||
|
17
website/app/vt/modes/srm/page.mdx
Normal file
17
website/app/vt/modes/srm/page.mdx
Normal file
@ -0,0 +1,17 @@
|
||||
import VTMode from "@/components/VTMode";
|
||||
|
||||
# Send-Receive Mode (SRM)
|
||||
|
||||
<VTMode value={12} ansi={true} />
|
||||
|
||||
If reset, characters entered by the keyboard are shown on the screen
|
||||
as well as being sent to the running program. If set, keyboard input
|
||||
is sent only to the running program and the running program can choose
|
||||
whether it wants to echo it back.
|
||||
|
||||
This mode is typically enabled on terminal startup.
|
||||
|
||||
This mode is generally unsupported across most terminals today and
|
||||
is recommended to be retired.[^1]
|
||||
|
||||
[^1]: https://gitlab.gnome.org/GNOME/vte/-/issues/69
|
Reference in New Issue
Block a user