Finally I found a solution for something I always wanted to do with KM.
Show/hide a palette by pressing/releasing a key. This feels more natural to me than the default way. I find this especially useful when navigating text with the arrow keys. But it can be used for anything. This is the palette.
To open this navigation palette I press and hold "4". I chose this key because I can reach it blindly with my left index finger. The rest I do with my right hand. "j" = left arrow, "k" = right arrow, etc.
The palette is visible as long as I keep "4" pressed and disappears when I release "4". So I don't have to choose between "show for one action" and "always visible".
If someone wants to try this, these are the triggers.
Glad you solved it - although it would drive me crazy to lose being able to type "4"...
A few suggestions:
As your first two Macros do the same thing but just have alternative triggers you can combine them into one Macro.
Instead of having the Macro press a key combination like ⌃⌥⇧⌘V to show/hide the Palette you can use the Keyboard Maestro Action to show/hide the Palette.
Instead of using the "4" as your trigger key why not use the Section Sign key § which is on the extreme left of the number keys?
In the Group of Macros that you are show/hiding you should set the Group to Shows/hides a palette when: (as this will only have the Macros active when the Palette is showing) but then you can leave the hot key field blank:
If you keep scrolling down or up the list, you should find it. The list seems to be divided into two alphabetically ordered parts (I think to do with whether the Groups are enabled or not).
Yes, it works fine for me. Here are the Macros and Groups I used for testing. When they import in, you need to enable the two Groups.
Holding and Releasing "6" shows/hides the Palette and when the Palette is showing, tapping L,R or U runs the Macros (they just display text in the test).
With karabiner, yes, thanks for pointing it out. I would certainly do that if it would not work with KM. But it works very well. @Zabobon just helps me to open the palette differently.
@Zabobon May I ask for your expertise one more time? Or of course the expertise of someone else.
To my global navigation palette I have added two app specific ones. These are only displayed when the right app is in front. This works fine. What doesn't work is moving the mouse to the palettes and back to the original position when "4" is released.
Obviously I am doing something wrong. Can anyone help? Thanks a lot!
It is not working because the mouse position will be recorded and restored when you press "4" (as that will run the whole Macro). And when you release "4" the Macro runs again and basically stores and restores the mouse wherever it is.
Also, a Local Variable to store the mouse position won't work as it only lasts for a single Macro run (and you are running the Macro a second time when you release "4").
So, you need to use a Global variable (any name without "Local" in it) such as mouse_position
You need to only store the mouse position if the "4" key is down.
You need to only restore the mouse position if the "4" key not down.
Ok, I understand your explanations (to some extent ).
But I had to add an action to move the mouse to the palettes. Is that the way it is intended? Anyway, it works exactly the way I want it to.. Thanks again for your great support!
I don't know if there's a way to do that "natively" in KM, but you can use some AppleScript. This demo pops the "Menu Glyphs" palette (from the Macros Library), uses an AS to grab the top-left corner coordinates, positions the pointer to an offset of that (on my machine, hallway down and halfway across the palette), then uses another AS to pause while the palette remains open. It'll then return the pointer to the original position.
Main advantage is that you aren't required to keep your palette in a fixed position.