mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
terminal: support disable modify key format sequence ESC[>n
This commit is contained in:
@ -508,17 +508,38 @@ pub fn Stream(comptime Handler: type) type {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
// CPR - Request Cursor Position Report
|
|
||||||
// TODO: test
|
// TODO: test
|
||||||
'n' => if (@hasDecl(T, "deviceStatusReport")) try self.handler.deviceStatusReport(
|
'n' => switch (action.intermediates.len) {
|
||||||
switch (action.params.len) {
|
0 => if (@hasDecl(T, "deviceStatusReport")) try self.handler.deviceStatusReport(
|
||||||
1 => @enumFromInt(action.params[0]),
|
switch (action.params.len) {
|
||||||
else => {
|
1 => @enumFromInt(action.params[0]),
|
||||||
log.warn("invalid erase characters command: {}", .{action});
|
else => {
|
||||||
return;
|
log.warn("invalid erase characters command: {}", .{action});
|
||||||
|
return;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
) else log.warn("unimplemented CSI callback: {}", .{action}),
|
||||||
|
|
||||||
|
1 => switch (action.intermediates[0]) {
|
||||||
|
'>' => if (@hasDecl(T, "setModifyKeyFormat")) {
|
||||||
|
// This isn't strictly correct. CSI > n has parameters that
|
||||||
|
// control what exactly is being disabled. However, we
|
||||||
|
// only support reverting back to modify other keys in
|
||||||
|
// numeric except format.
|
||||||
|
try self.handler.setModifyKeyFormat(.{ .other_keys = .numeric_except });
|
||||||
|
} else log.warn("unimplemented setModifyKeyFormat: {}", .{action}),
|
||||||
|
|
||||||
|
else => log.warn(
|
||||||
|
"unknown CSI m with intermediate: {}",
|
||||||
|
.{action.intermediates[0]},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
) else log.warn("unimplemented CSI callback: {}", .{action}),
|
|
||||||
|
else => log.warn(
|
||||||
|
"ignoring unimplemented CSI n with intermediates: {s}",
|
||||||
|
.{action.intermediates},
|
||||||
|
),
|
||||||
|
},
|
||||||
|
|
||||||
// DECSCUSR - Select Cursor Style
|
// DECSCUSR - Select Cursor Style
|
||||||
// TODO: test
|
// TODO: test
|
||||||
|
Reference in New Issue
Block a user