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
In Menu shortcut override Global shortcut #1435
Comments
@beefeater7, this is an interesting problem. In the Convert Markdown to ... command, I fallback to
|
That's a nice workaround @pbodnar. |
I actually thought I had a magic solution here - the temporary kind at least...
Using the
|
Ok, this is getting weird. It's safe to say we need a proper fix at this point. @pbodnar, you sure that trick is working for you?
|
Let me share a few hints. I'm not exactly sure what you need to do, but I hope this helps. You can use You can also check, if needed, the shortcut that triggered the command: var shortcut = str(data(mimeShortcut))
if (shortcut == "shift+f4")
... The The See also: https://copyq.readthedocs.io/en/latest/scripting-api.html |
In fact for me (on Windows 10), this seems to depend on the shortcut used. When using for example @hluk, thanks for your useful tips, mainly the |
@hluk Huh, I completely overlooked the mimetype variables, thanks! However
@pbodnar This issue actually lies at the core of this. It was resolved in a past commit, but I hopped on a later build without the fix. I tried pressing the hotkeys super quick and the script works. With v3.12.0 in the pipeline it's a done deal. However, my feature request stands. It would be useful for |
Glad it works for you. Version 3.12.0 is fresh out of the press! :)
I'll take a look into this if I have time. But currently I don't see this as being a big problem since I don't see benefit in using both application and global shortcut in the commands I used or have created in the past. |
If global shortcut for a menu command is triggered when the main window is active, the command will be executed as if it has been trigger from menu - i.e. with item selection and item data available. Fixes #1435 Signed-off-by: Lukas Holecek <hluk@email.cz>
If global shortcut for a menu command is triggered when the main window is active, the command will be executed as if it has been trigger from menu - i.e. with item selection and item data available. Fixes #1435 Signed-off-by: Lukas Holecek <hluk@email.cz>
Changing it to following:
Basically, if you check "In Menu" and "Global Shortcut" in a command and press the global shortcut when the main window has focus, then Does it make sense? |
Absolutely! Nice one 😄 |
If global shortcut for a menu command is triggered when the main window is active, the command will be executed as if it has been triggered from menu - i.e. with item selection and item data available. Fixes #1435 Signed-off-by: Lukas Holecek <hluk@email.cz>
Is your feature request related to a problem? Please describe.
I'm working on a 'global' hotkey that adapts to its environment. If CopyQ focused, do X, if not, do Y. This is how far I got.
input()
falls through toclipboard()
because Global overrides App.Describe the solution you'd like
S-F4 works like S-F3 when app is focused.
Describe alternatives you've considered
I can always use S-F3 and S-F4 depending on context, but this seems neater.
Another option is to let Global shortcuts access app functions like
input
, if application is focused.The text was updated successfully, but these errors were encountered: