Show Palette Only After a Custom Delay and if No Palette Action Triggered

I have a Symbol Palette that inserts some special symbols and map it to ⌘\

For some frequently entered symbols I remember the key combo that triggers a specific palette item, so I press it right away, but I still get an annoying palette flash.
Then for some other rarely used symbols I don't remember the letter and would appreciate this palette showing up and showing me the shortcut to insert it.

So I'd like to be able to configure an inactivity delay timer that would only show this palette if I don't press any key after triggering the palette with ⌘\

This way I can insert frequent items from memory and use visual palette cue when memory fails

Not exactly what you want, but maybe even better. If you want, try this macro.

Pressing and holding this key "<" shows a palette. If you just briefly tap the key "<" is typed without showing the palette. (the time can be adjusted, at the moment is set to 0.5 s) Additionally, when adjusting the values for the mouse, the cursor goes to the open palette (so you can click) and the original mouse position is restored when the palette disappears.

You can replace "<" with any other key.

PaletteTEST.kmmacros (7.5 KB)

Hey @esv,

It is not possible to prevent a palette-based macro from showing the palette – if you want different behavior you'll have to use different tools (perhaps text-expansion macros).

I use Typinator for this sort of thing myself and have a searchable sub-group for characters:

If I was to use Keyboard Maestro for this I'd probably use a Prompt With List action along with direct text-expansion macros for my most used characters.

-Chris

1 Like

Thanks for your example, though I don't understand how to make it work for my use case: I need to invoke a shortcut that is WITHIN the palette, so the fact that the palette doesn't show up until some delay doesn't help.

I thought so, so this is a Suggestion for improving KM :slight_smile:

I'm aware of some of the other alternatives, but then this type of search is suboptimal — I usually know the char group I want to enter (as in this example), and when I invoke that group I don't really want to type any full/partial name to insert a single symbol, but just use whatever single key combo I've mapped to it. So palette works better (and it also allows a more dense multi-column layout), except for the extra flashes

Sorry, I must have misunderstood you. :wink:

So you want to use a shortcut and then use the sigle key trigger of a palette, but without the palette becoming visible?

Well, the single key trigger exists because the palette exists.

@peternlewis?

We've asked Peter for chorded hotkey triggers, and so far he's declined.

There are ways to accomplish a similar result with Keyboard Maestro though.

1 Like

Oh, chords are awesome, I'm using them with dead keys with Ukelele and also with Karabiner Elements, so I'm all up for them being implemented anywhere and everywhere :slight_smile:

However, afaik this suggestion is simpler: it only deals with visibility, not functionality. The palette should still trigger right away on the first shortcut, there is no waiting for another chord, the only thing that's different from now is that it that it's invisible for the first 0.X seconds to avoid the flash when you select a palette's item right away

Unlikely to happen, because a palette is a visible UI element – therefore you cannot have a palette-driven macro sans the palette.

I'm quite certain Peter won't like the incongruity, but hopefully he'll chime in and speak for himself.

1 Like

And I do need this visibility, just not every single time! Another thought: palette has this transparency style property, can this be made dynamic? This way I could have it fully transparent for X second and then let it become opaque.
Alternatively this could be used for some stylistic fade in/out effects even if you don't need to hide it

You cannot get the conflict palette-like behavior without the conflict palette.

You can have delayed behaviour and delayed palettes, but not that and the conflict palette behaviour of automatically selecting temporary hot keys.

You could do things like use the Activate Macro Group action to activate the macro group for one action, and then if nothing happens after a period of time, instead deactivate the macro group and show a palette of macros.

But you can't have it both ways - if you want the auto-generated temporary pseudo hot keys, then you need the palette to display the list.

I likely wont implement chords because chords do not lend themselves to reasonable behaviour. When the "dead key" is pressed, it must be swallowed, and can never be resent - otherwise keys end up out of order. And so the only reasonable implementation is for the initial key to be a hot key itself, which is what Keyboard Maestro supports.

You can, for example, use a hot key to activate a macro group for one action, and the macros within that group can have hot keys like plain letters (eg “a”), and so pressing the hot key followed by “a” would trigger the macro. But there is no ambiguity that the hot key is gone - it wont resurface. It has been consumed and used. So it is not the same a chorded trigger of “hotkey, a” which implies that if the “a” is not pressed, nothing happens and the hotkey behaves as normal, which is not possible at the level of kk, though it might well be possible in Karabiner which can keep the hotkey from progressing in to the event queue until after a specific amount of time or after the next key comes along, and thus maintain consistency.

Well, let the palette display the list, that's fine, just make the initial list fully transparent and transition to fully opaque after X seconds

Don't get it, I don't have/need any conflict, and nothing is auto-generated/automatically selected, the keys are manually uniquely assigned within the palette, and the palette is invoked via a unique shortcut set manulaly.

But then I'd have to duplicate everything (in the macro group and in the palette), so that's not a good option

That's exactly what I'm doing here! My palette is for 1 action, and that action is (mostly) a plain letter, so 8 (withint this palette) inserts ∗, but then I get the palette to always flash, hence this topic!

Yes, that's the beauty of Karabiner, would be awesome if KM became as powerful since KM's GUI is much more ergonomic for many types of tasks.

It it's not a conflict palette, then just use a macro that activates the macro group for one action, and then after a short period of time if none of the macros have fired, shows the macro group as a palette.

It's not a question of power, it's a question of layers.

Karabiner works at a very low layer, basically between the hardware keyboard and the system event queue.

Keyboard Maestro works at a much higher level. Keyboard Maestro doesn't try to do what Karabiner does well already because they operate at entirely different layers.

Sure, and then combining those two layers in one app is where the power lies. For example, you could have low level triggers with various conditions that are possible in Karabiner to show output in higher-level concepts like Palettes and app menus and OCRs etc

I see, I misunderstood it the first time, I wouldn't need to duplicate anything, and when I activate the palette the previous "hanging" activation doesn't persist, so don't even need to cancel anything

(The only trick I forgot was to have the group enabled, but have no activation trigger attached so it's always inactive, otherwise was trying to do the "enable/disable" macro group action, but activation action seems better).


ActivateThenShowPalette.kmmacros (20.3 KB)
image

1 Like