apprt/embedded: do not depend on macOS APIs on non-macOS

This commit is contained in:
Mitchell Hashimoto
2024-01-14 14:31:14 -08:00
parent 83b004b6e1
commit 87f5d6f6a8
3 changed files with 43 additions and 2 deletions

View File

@@ -17,8 +17,8 @@ pub const SplitResizeDirection = Binding.Action.SplitResizeDirection;
// Keymap is only available on macOS right now. We could implement it
// in theory for XKB too on Linux but we don't need it right now.
pub const Keymap = switch (builtin.os.tag) {
.ios, .macos => @import("input/KeymapDarwin.zig"),
else => struct {},
.macos => @import("input/KeymapDarwin.zig"),
else => @import("input/KeymapNoop.zig"),
};
test {