Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request fails when trying to use CTRL or CMD keys #12

Open
jasononaquest opened this issue Oct 24, 2024 · 0 comments · May be fixed by #14
Open

Request fails when trying to use CTRL or CMD keys #12

jasononaquest opened this issue Oct 24, 2024 · 0 comments · May be fixed by #14

Comments

@jasononaquest
Copy link

Environment:

Mac OS Sonoma 14.5
Firefox 131.0.3
Node 22.9.0

When trying to manipulate Firefox to open a new tab using

ACTION { type: 'key', text: 'ctrl+t' }

I get the error message:

UnhandledPromiseRejectionWarning: Error: Tried to press unknown key: ctrl

I told the agent it was running on a Mac and to replace actions with ctrl to cmd and it still failed with:

UnhandledPromiseRejectionWarning: Error: Tried to press unknown key: cmd

I don't have this problem when running in the Computer Use Demo (it correctly opens new tabs).

chavan-arvind added a commit to chavan-arvind/agent.exe that referenced this issue Oct 24, 2024
Fixes corbt#12

Update `performAction` and `runAgent` functions to handle 'ctrl' and 'cmd' keys for Mac OS.

* **Key Mapping:**
  - Add 'ctrl' and 'cmd' keys to the `keyMap` in `performAction` function.
  - Map 'ctrl' to `Key.LeftControl` and 'cmd' to `Key.LeftSuper`.

* **Mac OS Specific Logic:**
  - Add logic in `runAgent` function to replace 'ctrl' with 'cmd' for Mac OS.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/corbt/agent.exe/issues/12?shareId=XXXX-XXXX-XXXX-XXXX).
@chavan-arvind chavan-arvind linked a pull request Oct 24, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant