implement keymaps! they still have quite a bit of work to be any good...

but now our key do stuff when pressed (at the compositor level)
This commit is contained in:
Squibid 2025-10-23 23:24:49 -04:00
parent 8e4f56d147
commit faa44dc4af
Signed by: squibid
GPG key ID: BECE5684D3C4005D
8 changed files with 163 additions and 13 deletions

View file

@ -10,6 +10,7 @@ const Cursor = @import("cursor.zig");
const Keyboard = @import("keyboard.zig");
const Output = @import("output.zig");
const View = @import("view.zig");
const Keymap = @import("keymap.zig");
const gpa = std.heap.c_allocator;
const server = &@import("main.zig").server;
@ -32,6 +33,7 @@ root: Root,
seat: Seat,
cursor: Cursor,
keyboard: Keyboard,
keymaps: std.AutoHashMap(u64, Keymap),
// Backend listeners
new_input: wl.Listener(*wlr.InputDevice) = .init(handleNewInput),
@ -69,6 +71,7 @@ pub fn init(self: *Server) !void {
.seat = undefined,
.cursor = undefined,
.keyboard = undefined,
.keymaps = .init(gpa),
};
try self.renderer.initServer(wl_server);