Skip to content

Conversation

@chavan-arvind
Copy link

@chavan-arvind chavan-arvind commented Oct 24, 2024

Fixes #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.

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).
@physics-coder
Copy link

physics-coder commented Oct 24, 2024

Replacing super and its variations (commands containing super, such as L_super) with cmd could also be added for mac, because Claude loves trying to press it for opening spotlight for example. Also, perhaps add arrows and Tab for DE and app navigation.

}

// Replace 'ctrl' with 'cmd' for Mac OS
if (process.platform === 'darwin' && action.type === 'key') {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should happen in the key mapping on line 183 I think?

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 this pull request may close these issues.

Request fails when trying to use CTRL or CMD keys

3 participants