feat: 完成最新的可构建版本

This commit is contained in:
claude-code-best
2026-04-01 10:42:53 +08:00
parent 604110272f
commit 9a57642d3a
4 changed files with 59 additions and 21 deletions

View File

@@ -1,5 +1,3 @@
import { dlopen, FFIType, suffix } from "bun:ffi";
const FLAG_SHIFT = 0x20000;
const FLAG_CONTROL = 0x40000;
const FLAG_OPTION = 0x80000;
@@ -23,12 +21,13 @@ function loadFFI(): void {
}
try {
const lib = dlopen(
const ffi = require("bun:ffi") as typeof import("bun:ffi");
const lib = ffi.dlopen(
`/System/Library/Frameworks/Carbon.framework/Carbon`,
{
CGEventSourceFlagsState: {
args: [FFIType.i32],
returns: FFIType.u64,
args: [ffi.FFIType.i32],
returns: ffi.FFIType.u64,
},
}
);