input: move flags to a packed struct

This commit is contained in:
Mitchell Hashimoto
2024-09-23 10:16:35 -07:00
parent 0394c8e2df
commit 66143a33ef
4 changed files with 129 additions and 91 deletions

View File

@@ -116,7 +116,7 @@ fn prettyPrint(alloc: Allocator, keybinds: Config.Keybinds) !u8 {
while (iter.next()) |bind| {
const action = switch (bind.value_ptr.*) {
.leader => continue, // TODO: support this
.action, .action_unconsumed => |action| action,
.leaf => |leaf| leaf.action,
};
const key = switch (bind.key_ptr.key) {
.translated => |k| try std.fmt.bufPrint(&buf, "{s}", .{@tagName(k)}),