Macro shortcut with special key

Hi all,
Sorry if this is a duplicate but i wasn’t able to fined anything to solve my issue.
As per title, I have a easy and silly question.
I’m trying to build a very simple macro as test, the macro should bring the W/L tool up.
So reading the documentation on macro shortcut:

In this example, pressing ‘a’ runs the first macro and pressing ‘1’ runs the second. These shortcuts duplicate the shortcuts for Edit>Selection>Select All and Analyze>Gels>Select First Lane so you now have to hold down control (command on the Mac) to use the keyboard shortcuts for these commands.

So, in the StartupMacros.txt i wrote:
macro "Window/Level [W]" {run("Window/Level...");}
If I click on the macro it works as intended but holding Ctrl-w execute the w short cut.

I also tried to build the macro as “Window/Leve [Ctrl+W]” and different other stuff but nothing worked.
What am I missing?

Hi @frankmtl,

I think the only problem is that the shortcut you defined is the uppercase letter W. That means you run the macro with shift+w.

Best regards,
Volker

2 Likes

HI @volker,
thank you very much for your answer. Actually that mistake was very silly of me.
I still have one more question: what if I want to set something with Ctrl or Alt? lets say I’d like Ctrl+w (lower case). Again I’ve tried multiple combinations like [Ctrl w], [Ctrl+w],[ctrl+w] and so on

I’m not completely sure, but I think you can’t. I think only uppercase and lowercase letters, digits and function keys are possible.

That’s a strange behaviour since for example the shortcut for contrast tool is Ctrl+Shift+C.
Anyway, thank you again for your help!