Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

Keep the global-shortcut setter bound to its host object (#5992)

cua-agents[bot]08848273eaee
diff --git a/apps/cua-spaces-desktop/src/bridge/settings.ts b/apps/cua-spaces-desktop/src/bridge/settings.ts
index 54b246c062..cda93acca2 100644
--- a/apps/cua-spaces-desktop/src/bridge/settings.ts
+++ b/apps/cua-spaces-desktop/src/bridge/settings.ts
@@ -157,10 +157,10 @@ export function settingsMethods(ctx: BridgeContext): Handlers {
return;
case "global-shortcut": {
// The keys that bring the app forward from any app (Mac). The option is the accelerator.
- const change = parts().system?.setGlobalShortcut;
- if (!change) throw Failure.failed("This computer has no shortcut to change.");
+ const system = parts().system;
+ if (!system?.setGlobalShortcut) throw Failure.failed("This computer has no shortcut to change.");
try {
- change(option);
+ system.setGlobalShortcut(option);
} catch (e) {
throw Failure.failed(e instanceof Error ? e.message : String(e));
}