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

Add universal-commands extension #13129

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

cyxn
Copy link
Contributor

@cyxn cyxn commented Jun 23, 2024

Description

Sometimes, I encounter difficulties in finding the right shortcut for the same action across different applications.
For instance, in various meeting platforms like Google Meet, Slack Huddle, and Zoom, each has a different shortcut for
muting the microphone.
Furthermore, in Slack, the ability to rebind shortcuts is limited.

To address this issue, the solution is the Universal
Commands extension for Raycast. This extension provides users with the ability to
configure commands to execute specific shortcuts based on the application in use. As the result, users can use a single
command to toggle between mute and unmute, and this action will be tailored to the current application and it will
execute corresponding shortcut.

Screencast

CleanShot.2024-06-23.at.13.54.49-converted.mp4

Checklist

- add screenshots of extension, improve language of forms
- Merge pull request raycast#2 from cyxn/NEW-FUNCTIONALITY
- fix typing and prettify code
- Only one key could be passed in shortcut
- add run command
- Fix comments
- Add create, edit and delete command functionality
- add extension icon
- ensure hotkeys work without modifier
- fix build
- improve readme, add manage custom commands
- initial draft version
@raycastbot
Copy link
Collaborator

raycastbot commented Jun 23, 2024

Congratulations on your new Raycast extension! 🚀

We're currently experiencing high demand and limited capacity. As a result, extension reviews might take longer than usual to get the initial review. Please expect an initial review within 5-10 business days.

Once the PR is approved and merged, the extension will be available on our Store.

Sorry for the inconvenience

@raycastbot raycastbot added the new extension Label for PRs with new extensions label Jun 23, 2024
@mil3na
Copy link
Contributor

mil3na commented Jul 2, 2024

Hi!
Thank you for your contribution! My name is Milena and I will be reviewing it today.

Is your extension designed for working on web apps only? Also, how come it would be different in functionality than adding the option to be app/website specific to this extension? https://www.raycast.com/HelloImSteven/keyboard-shortcut-sequences

@mil3na mil3na self-assigned this Jul 2, 2024
@cyxn
Copy link
Contributor Author

cyxn commented Jul 3, 2024

Hi Milena!

Is your extension designed for working on web apps only?
It works with both web applications and mac applications.

My extension is different from the one mentioned above and aims for a different use case. The extension above can't solve my use-case.

Good example of usage of my extension is toggle mute/unmute for different call apps (zoom, google meet, teams, slack etc). In different apps, it is a different shortcut. You can't remap the shortcut in Slack and Google Meet, and both are different. With my extension, you can use the same Raycast command for all your apps to toggle mute/unmute. Extension will execute the correct shortcut under the hood depending on what app is opened right now. Mute/unmute is just an example. You can build your own universal commands.

@mil3na
Copy link
Contributor

mil3na commented Jul 3, 2024

Hey! I think you didn't answered my question. I saw you example, but my question is: the only difference I see from your extension and the one I pointed out was the app awareness, which I believe can be added to the other extension. Are there any other differences I am missing?

@cyxn
Copy link
Contributor Author

cyxn commented Jul 3, 2024

It is an entirely different perspective. My extension is more like if/else, depending on what app is running.
1/ There is no sequence of shortcuts — just a single shortcut that will be executed only to that exact app.
2/ If app is not matched, it won't execute any shortcut. keyboard-shortcut-sequences will always send shortcuts whatever is set up
3/ because of the different perspective and use cases: UI, commands, and naming of commands/extensions are tailored to that exact envisioned experiences.

I think the main point from me is — it is not only about the number of differences but more about how huge that single difference is.


If you still believe those two extensions should be together, I can foresee that it will be quite challenging:

  • to put it together in convenient UX
  • position it properly in terms of naming (keyboard-shortcut-sequences doesn't really explain my use-case)

But before diving into that, I want to hear your thoughts.

@mil3na
Copy link
Contributor

mil3na commented Jul 4, 2024

I will do some thinking and will get back to this review tomorrow!

@mil3na
Copy link
Contributor

mil3na commented Jul 5, 2024

I guess I understand the use case of this. However I have a few comments:

  • The "run command" command expects an id that I'm not sure where to get it. Can you explain to me why this command is necessary?
  • I miss a "Create Command" command, it took me a while to find it on the action menu
  • Maybe an option to pin or favorite commands on the list would be useful?

Please, take a look at my comments and tell me what you think :)

@cyxn
Copy link
Contributor Author

cyxn commented Jul 5, 2024

The "run command" command expects an id that I'm not sure where to get it. Can you explain to me why this command is necessary?

The command is meant to be called by a Raycast QuickLink rather than by the user directly. When you view list of commands, you can create it as quicklink. This is the way I call my commands.
Do you think I should enter the primary action (instead of running the command) to guide users using it the same way I do?

CleanShot 2024-07-05 at 16 06 50

Maybe an option to pin or favorite commands on the list would be useful?

The way it works right now is that the list is auto-sorted by the frontmost application. Pinning may be additional nice thing but in my eyes "List Custom Commands" is mostly for managing the commands rather than running them. QuickLink, I believe, is the right way to call your shortcuts. But who knows, maybe it's only me who thinks QuickLinks is the best way to call commands. This is why the primary action is to run the command and not save it as quick link — I want users to use the extension the way it works best for them.

@cyxn
Copy link
Contributor Author

cyxn commented Jul 5, 2024

I miss a "Create Command" command, it took me a while to find it on the action menu

yes, it is cmd + N in "List Custom Commands".

Should I create new command just for create flow?

@mil3na
Copy link
Contributor

mil3na commented Jul 9, 2024

Do you think I should enter the primary action (instead of running the command) to guide users using it the same way I do?

Yes!

Should I create new command just for create flow?

I believe so. It would make the process easier.

But who knows, maybe it's only me who thinks QuickLinks is the best way to call commands. This is why the primary action is to run the command and not save it as quick link — I want users to use the extension the way it works best for them.

It's up to you. I'd recommend to implement this now, but you can wait for user feedback as well. Anyway, I would explain your vision on the README file anyway, to avoid confusion.

@cyxn
Copy link
Contributor Author

cyxn commented Jul 14, 2024

I have updated my extension, @mil3na please look

@mil3na
Copy link
Contributor

mil3na commented Jul 16, 2024

Hi!
Thanks for addressing my comments!
Talking about comments, I see some commented code, do you mind removing it, if it is not relevant?
And I still don't understand how to get the input for the Run Custom Command command.

@cyxn
Copy link
Contributor Author

cyxn commented Jul 16, 2024

And I still don't understand how to get the input for the Run Custom Command command.

as I said, the command is not supposed to be used by the user directly. You can create a Quicklink to the command (for example mute/unmute) from "List Custom Commands" command. This Quickling will use Run Custom Command

- Merge branch \'contributions/merge-1721150201782028000\'
- Pull contributions
- cleanup mock.ts file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new extension Label for PRs with new extensions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants