diff options
Diffstat (limited to 'vendor/libghostty-vt/src/input/KeymapNoop.zig')
| -rw-r--r-- | vendor/libghostty-vt/src/input/KeymapNoop.zig | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/vendor/libghostty-vt/src/input/KeymapNoop.zig b/vendor/libghostty-vt/src/input/KeymapNoop.zig new file mode 100644 index 00000000..b6a9d57b --- /dev/null +++ b/vendor/libghostty-vt/src/input/KeymapNoop.zig @@ -0,0 +1,39 @@ +//! A noop implementation of the keymap interface so that the embedded +//! library can compile on non-macOS platforms. +const KeymapNoop = @This(); + +const Mods = @import("key.zig").Mods; + +pub const State = struct {}; +pub const Translation = struct { + text: []const u8 = "", + composing: bool = false, + mods: Mods = .{}, +}; + +pub fn init() !KeymapNoop { + return .{}; +} + +pub fn deinit(self: *const KeymapNoop) void { + _ = self; +} + +pub fn reload(self: *KeymapNoop) !void { + _ = self; +} + +pub fn translate( + self: *const KeymapNoop, + out: []u8, + state: *State, + code: u16, + mods: Mods, +) !Translation { + _ = self; + _ = out; + _ = state; + _ = code; + _ = mods; + return .{ .text = "", .composing = false }; +} |
