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

feature request: make keyboard shortcuts customizable #87

Open
wuesten-fuchs opened this issue Aug 11, 2022 · 4 comments
Open

feature request: make keyboard shortcuts customizable #87

wuesten-fuchs opened this issue Aug 11, 2022 · 4 comments

Comments

@wuesten-fuchs
Copy link

I personally only ever insert emojis directly and never need them in my clipboard.

And I couldn't figure out how to change the keyboard shortcuts but maybe that's super easy to do myself?

@Stickyhavr
Copy link

Agreed. 99% of the time I want the workflow to paste directly into the frontmost application. On those rare cases where I want it in the clipboard I would like to use cmd+return to copy to the clipboard instead.

It would be great if this were updated for Alfred 5 and then used the user configuration page to allow you to customize the default action when you push return.

I ended up changing it myself. I'm no coder, so please follow these steps at your own risk:

  1. In the workflow, right-click on the top Copy to Clipboard (the one labeled "auto-paste") and configure object. Uncheck both of the checkmarks. Optionally, you could right-click again and edit the note to say "copy"

  2. Right-click the bottom Copy to Clipboard action, configure object, and then check both boxes. Optionally, you could edit the note to say auto-paste.

  3. Double click on the ⌘ and change the modifier subtext to "Copy {query} to the clipboard instead of pasting" (or whatever you want it to say).
    [alternatively, instead of these first three steps, you could just switch the outputs of the filters and the cmd key modifier, but I thought my way was easier and less confusing.]

  4. Now double click on the script filter. In the bottom left of that window, there should be a folder icon. Click that to reveal the workflow in Finder.

  5. It's probably a good idea to quit Alfred preferences while doing the next steps. It might not matter, but that's what I did just to be safe.

  6. Open the emoji.js with Textedit.

  7. Search for "let verb"

  8. Change the verb to "paste" (or insert) and the preposition to "to frontmost app" (or whatever you want it to say).

  9. Save and close emoji.js.

Now it should paste automatically by default. The only downside of doing it this hack way is that the alternate actions (control and option keys) also paste instead of going to the clipboard. But in my usage, I use that rarely and don't mind pasting it and then copying it again if I ever do need that functionality.

You might also want to disable the auto-update in case that would cause these hacks to break. Hope that works for you!

@jsumners
Copy link
Owner

jsumners commented Sep 4, 2022

#42 (comment)

I did not know Alfred 5 had been released. Reading the release notes, I don't see anything that makes it immediately obvious that keyboard shortcut remapping is possible, but it could be. If someone wants to research that, we welcome PRs.

@Stickyhavr
Copy link

Stickyhavr commented Sep 4, 2022 via email

@vitorgalvao
Copy link
Contributor

vitorgalvao commented Oct 3, 2022

It is indeed possible to customise the shortcuts, see for example the 1Password Workflow:

You use a popover like #88 then the mod subtext and action is changed in the code. After #88 I can also make the search and snippet keyword be user-settable, then look into the custom shortcuts.

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

No branches or pull requests

4 participants