Suggestion: "selection mode" like in ATOM

I learned something cool today while using Atom (https://atom.io/). It has a feature that I really like called "selection mode".

You type in normal, then you press ESC to enter "selection mode" and then press 1, 2, 3, 4 to prioritize lines.

Here's is a gif

It would be a really cool thing to replicate with many useful applications.

For example

  • imagine we are in a text editor and we are just formatting lines. We can enter "selection mode" by pressing a shortcut key, then 1, 2, 3 (on a given line) to put some markdown headers.
  • mail program. Shortcut key to enter "selection mode" and then a to archive, s to snooze, t to trash (on a given message) and so on.

Am I making sense? Maybe this would be considered for a future version.

Thanks!

2 Likes

I'm not sure. You animated GIF does not show what happens as a result of the setting of "priorities" of the lines. Does it sort the line by priority, or something else?

That is the result. If you press "1" outside of "selection mode", 1 will be inserted in the text. If you press "1" while on "selection mode", it works as a shortcut to set the priority.

Ideally keyboard maestro would replicate this selection mode. Let's say one press "CMD+SHIFT+S" on finder that that triggers KM to enter "selection mode". Then if you press "d" it will trigger a macro to delete the file, if you press "1" it will trigger a macro to label red.

Basically this selection mode is a shortcut that you press that will enable you to use simpler shortcuts (1,2,3, a,b,c etc).

Another example. Let's say you have 3 macros on finder that tag files in Red, Blue and Yellow.

Right now in KM you can create a shortcut like CMD+SHIFT+R for the Red macro, CMD+SHIFT+B for the Blue and CMD+SHIFT+Y for the Yellow. With this "selection mode" you could instead press "CMD+SHIFT+S" to enter selection mode. Then while at it you just select the file and press r to trigger the red macro, b for blue, or y for yellow.

Is that any better?

1 Like

If you set up 2 macros with the exact same shortcut a palette will show and then you can press just 1 letter to execute one of the macros. The problem is the palette (not even sure if it’s a palette, I think palettes work in a different way and this is just to resolve ambiguity) goes away as soon as the macro is executed. If only there was a way to make the palette stay open until you press a specific shortcut to hide it again.

1 Like

Thank you, @Thankful, for posting on this topic.
Your questions helped clarify some of my own ideas about palettes.


.

That's a neat description of exactly what happens.
Yes, it is a palette.

KM has two kinds of palettes.
The behavior you described is specific to the "Conflict Palette".
The second kind is the ordinary, macro group palette.

Each macro group may have its own palette.
Not required, optional, up to you.

You may specify how each palette behaves.
Also, up to you.


.

Nice catch.
And the good news is, there is a way, an easy way.

The "conflict palette" works as you described.
After you select one macro, the conflict palette does go away.
No option there.
That's its job.

But, if you specify an ordinary, macro group palette, then "the palette can stay open until you press a specific short cut to hit it again."

Specify that behavior in KM Editor, macro group display panel, like this:

(The hot key is your choice.)


.

[quote="thankful_dude, post:3, topic:5679"]
If you press "1" outside of "selection mode", 1 will be inserted in the text. If you press "1" while on "selection mode", it works as a shortcut to set the priority. [/quote]

To mimic that behavior, using KM, instead of "selection mode", think of "palette mode".

That is exactly how an ordinary, macro group palette can work, when you specify, "Shows/hides a palette when:"


.

When I started to learn about palettes, it was awfully confusing.
There is a lot in KM wiki and docs, and on this forum, but I still was mighty confused.
So if you try this, and it doesn't work as you expect, please post with screen pictures or a GIF.
You're sure to get plenty of advice here.

Hi Mark, thank you for your reply. It seems that the behaviour I am looking for only exists in the Conflict Palette

Normal palette, note how you can't trigger macros by pressing only a single key

Conflict palette
Note how if you press 1, the first macro will be triggered, 2 the second

So the suggestion was for a way to have the "Conflict palette" stay open even after a macro is seletect, so you can hit the macros as many times as you one just by pressing a single key.

makes sense? Thanks for your reply :+1:

1 Like

Not correct.
Single-key-trigger behavior exists in ordinary macro group palettes, too.
And a normal group palette can stay open; up to you.

Here's one example I use often:
(I wish I had a way to make a nice animated GIF like you did.)


1) No KM palette:
I typed "abc" into a search field like this:


2) Active KM palette:
I type 'abc' again, but only 'bc' appears in that field.
KM swallowed the 'a' before it could get to the field.
KM used that 'a' to execute a macro in the palette.
Ordinary, macro group palette.

Your further thoughts, please.

I am trying to replicate what you've done but I can't find this search field :frowning2:
My palettes shortcuts don't have the shortcut key on the right like yours do (U, A, F , N).

The option to change that is difficult to find; buried several levels deep in the macro group specification.

So, here's how to find it, and how to fix the problem:

(Comment for @thankful_dude: Your skill on KM is well above the level of detail I'm going to use here, but I'll make this step-by-step, for beginners who might need this topic in the future.)


KM Editor consists of three panels, three columns:

"Groups" __________ "Macros" _______________________ Edit (no name at the top)




.


.

Close the Theme Editor window.
Done.


.
Final notes:

(1) Does that solve the problem?
If not, please tell me, so I can revise and improve the information.
If yes, please click below to indicate on the forum that the problem is solved.


.

(2) This topic is a perfect example of when a "suggestion" is not a suggestion,
but really a request for help.

I commented about that in this recent post:
https://forum.keyboardmaestro.com/t/handling-feature-requests-on-the-forum/5683?u=mark

1 Like