Can Conflict Menus and Prompt With List Menus be Made Case-Sensitive?

Hotkey triggers for macros can be defined to distinguish whether or not the Shift key is down. In fact, if you want a trigger to be case-INsensitive, you have to specify both triggers as distinct hotkeys.

But with Conflict Menus and Prompt With List menus, choosing from the menu list is by default case-INsensitive.

Is there a way to make Conflict Menus and Prompt With List menus be case-sensitive so that when you press a key to make a choice, holding the Shift down or not could choose different menu options?

In keeping with that distinction, does %TriggerValue% capture what the actual keypress was, including whether it was shifted or not?

It seems this was asked before, nearly two years ago, without getting an answer.
Can Prompt With List search case-sensitive?


Both %TriggerValue% and the new %PromptWithListModifiers% tokens show what modifiers were used, including the ⇧ modifier. The %PromptWithListModifiers% token is new to KM 10.2. So the prompt with list is now able to do different things depending on which modifiers are used.

The below macro will show you the results of said tokens if you want to see it for yourself.

I do not know however if this is possible with conflict palettes.

01)Scratchpad.kmmacros (3.2 KB)

Macro screenshot (click to expand/collapse)

1 Like

Thanks, that helps.

Your sample notes that there is a difference, but does not illustrate the difference between Trigger, Trigger Base, and Trigger Value. When I get a chance, hopefully soon, I'll bang on that a bit.

Glad to help!

By "does not illustrate the difference" what are you referring to specifically? The alert action in the sample macro shows the different results of each token, so likely I'm just misunderstanding what you mean by that.

All I see in the macro definition above is the %PromptWithListModifiers% token.

Is there more to it? Maybe I need to download and try it. Unfortunately, I can't do that right now.

Hey August I just realized I missed your last reply and never responded. Did you get a chance to tinker around with the example macro I posted?

I see how the display of the symbols, etc. works, but in terms of the Prompt With List menu that shows "Option 1" and "Option 2", I put a "a" and "b" at the ends of those lines so that I could actually pick one of the options with and without the Shift key being down. Only the alphabetic letters with match shifted and unshifted in a Prompt With List menu.

That is exactly the distinction that I want to be able to make, "a" vs "A" and "b" vs "B". In your original list, typing "1" vs "⇧1" just got "!" as input, and that did not match anything in the list. with my mod to the list, typing "a" or "A" got the same entry, and there is still no way to tell them apart, because %PromptWithListModifiers% only applies to the [Return] character.

To test more easily, I wrapped your PWL and the following Alert in a Execute Until ... loop and set the ending to the press of the Esc key. That way I could just keep trying combinations without having to rerun the macro.

I can't yet see a way to get that value for the character, or the last character in a string, that is choosing the Prompt With List entry, because it is always, as far as I can tell, followed by a [Return]} character to actually continue executing the macro. The entire value of the PWL entry is returned to the PWL action.

I can use any combination of zero, one, two, three, or all four modifiers when I press [Return] and the macro correctly identifies them. But there doesn't appear to be any way to get the value of what was pressed right before the [Return]`.

Whether I pick Option 1 or Option 2 in your test list, I seem to be able to use any combination of modifiers on the [Return] keypress and get them accurately in the %PromptWithListModifiers% token, but I can't use modifiers in the menu choice characters so there is nothing for that token to report.

If I type lowercase a and [Return] your Scratchpad macro reports that no modiers were used. If I type uppercase A and ⇧[Return] your Scratchpad macro reports that the ⇧ modifier was used. But I have to have the ⇧ down for both characters. If I type lowercase a and ⇧[Return] your Scratchpad macro reports that ⇧ was used. It doesn't care about the A.

I had particularly been hoping to use %PromptWithListModifiers% with my
Macro: “Follow Menu Choice with Return” (v0.5) , which works by making each lowercase character be a trigger for a macro that sends its trigger followed by a [Return] character. But it's not going to work. In that macro, in order to distinguish shifted letters, I would have to define another 26 triggers for the capital letters.

What it comes down to is that a [Return] character is always needed to make a Prompt WIth List selection, so the value of the %PromptWithListModifiers% token is always the set of modifiers that were applied to the [Return] character.

That means for any one Prompt With List menu item choice, there are 16 variations on the [Return] character that can be used, and that could have some very interesting uses.

But that's not the "case sensitive" that I was describing in the original question.