pilotmoon / PopClip-Extensions

Source code for extensions in the official PopClip Extensions directory.

Home Page:https://www.popclip.app/extensions/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: Is there a way to select text and then trigger a shortcut

stevenlis opened this issue · comments

I'm trying to find an extension to trigger a shortcut after some texts are selected.

This could be useful when I need to select two lines of code and then run them in vscode (the run command is triggered by a shortcut)

CS-2CQKSy4i.mp4

@invariant Am I missing something here?
I get an invalid key combo error and tried the following two snippets.

# popclip
name: run code
key combo: return shift
# popclip
name: run code
key combo: shift

The modifiers have to be listed first so you need:

# popclip
name: run code
key combo: shift return

Also a modifier on its own (just shift) is invalid.

@invariant Thanks you. That works! Btw, is there a way to set a whitelist for this extension so that I could customize different shortcuts for different apps? I only found a global blacklist in the settings.
CS-X8adMv5A

Yes you can use the required apps field in the extension configuration. Details are in the extensions documentation in this repository readme

@invariant thank you!