Fix key handling for CTRL and CMD keys#14
Open
chavan-arvind wants to merge 1 commit intocorbt:mainfrom
Open
Conversation
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
approved these changes
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. |
corbt
reviewed
Oct 24, 2024
| } | ||
|
|
||
| // Replace 'ctrl' with 'cmd' for Mac OS | ||
| if (process.platform === 'darwin' && action.type === 'key') { |
Owner
There was a problem hiding this comment.
This should happen in the key mapping on line 183 I think?
physics-coder
approved these changes
Oct 28, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #12
Update
performActionandrunAgentfunctions to handle 'ctrl' and 'cmd' keys for Mac OS.Key Mapping:
keyMapinperformActionfunction.Key.LeftControland 'cmd' toKey.LeftSuper.Mac OS Specific Logic:
runAgentfunction to replace 'ctrl' with 'cmd' for Mac OS.