feat: add check for kitty scaled text support
This commit is contained in:
parent
bcf4babd9f
commit
8454ebc9f4
1 changed files with 8 additions and 1 deletions
|
@ -244,7 +244,7 @@ pub fn process_renderer_event(self: *Self, msg: []const u8) Error!void {
|
|||
const event = std.mem.bytesAsValue(vaxis.Event, input_);
|
||||
switch (event.*) {
|
||||
.key_press => |key__| {
|
||||
// Check for a cursor position response for our explicity width query. This will
|
||||
// Check for a cursor position response for our explicit width query. This will
|
||||
// always be an F3 key with shift = true, and we must be looking for queries
|
||||
if (key__.codepoint == vaxis.Key.f3 and key__.mods.shift and !self.queries_done) {
|
||||
self.logger.print("explicit width capability detected", .{});
|
||||
|
@ -253,6 +253,13 @@ pub fn process_renderer_event(self: *Self, msg: []const u8) Error!void {
|
|||
self.vx.screen.width_method = .unicode;
|
||||
return;
|
||||
}
|
||||
// Check for a cursor position response for our scaled text query. This will
|
||||
// always be an F3 key with alt = true, and we must be looking for queries
|
||||
if (key__.codepoint == vaxis.Key.f3 and key__.mods.alt and !self.queries_done) {
|
||||
self.logger.print("scaled text capability detected", .{});
|
||||
self.vx.caps.scaled_text = true;
|
||||
return;
|
||||
}
|
||||
const key_ = filter_mods(normalize_shifted_alphas(key__));
|
||||
try self.sync_mod_state(key_.codepoint, key_.mods);
|
||||
const cbor_msg = try self.fmtmsg(.{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue