Potential bug: You can’t use arrow keys to move between popup options (if triggered by a typed string?)

I think that I might have come across a bug in Keyboard Maestro that can crop up when you’re prompting for user input that has a popup (dropdown) field.

Namely, if you have a Prompt for User Input dialog with a popup field, you should be able to use the arrow keys to move between the options; but if you trigger such a macro through a Typed String input, that no longer seems to work?

Here’s a test macro that I believe can demonstrate this:

Test macro for popup options.kmmacros (3.7 KB)
Keyboard%20Maestro%20-%20test%20macro

Here are the set of steps where this works fine:

  1. From Keyboard Maestro’s menubar dropdown, choose “Test macro for popup options”.
  2. When the prompt is shown, the “Favorite dessert” popup will be focused by default. Press the Down Arrow to open the popup.
  3. Then press the Down Arrow again to move the selection point between the options. (This should all work fine.)

And here are the set of steps where this doesn’t seem to work:

  1. Open a new, blank window in TextEdit and type the string “ttestmacro” to trigger the macro through its Typed String trigger.
  2. When the prompt is shown, the “Favorite dessert” popup will be focused by default. Press the Down Arrow to open the popup.
  3. Then press the Down Arrow a few more times to try to move the selection point between the options. (This part doesn’t work for me.)

For reasons that are unclear to me, there seem to be some occasions where the above steps might actually allow you to move the selection point using the arrow keys? If you happen run into that, I believe that this alternate set of steps will still trigger this issue:

  1. Open two new, blank windows in TextEdit.
  2. First, click on the body of the first TextEdit window to focus it; then click on the body of the second TextEdit window to focus it. (I have no idea why this step seems to be necessary.)
  3. Then type the string “ttestmacro” to trigger the macro through its Typed String trigger.
  4. When the prompt is shown, the “Favorite dessert” popup will be focused by default. Press the Down Arrow to open the popup.
  5. Then press the Down Arrow a few more times to try to move the selection point between the options. (This part doesn’t work for me.)

P.S. Just for completeness: I’m running Keyboard Maestro 9.0.4 on macOS Mojave (10.14.6).

1 Like

I have a similar (or possibly same) issue where drop down lists in prompts for user input cannot be navigated with arrow keys. It's a big hassle. I however do not start these macros with typed string triggers. Usually hotkeys, palettes, or the Alfred launcher (not sure how Alfred starts KM, maybe URL?).

1 Like

Thanks for chiming in, @vincent_ardern! It’s good to know that this isn’t just me.

(@peternlewis: Since this is reproducible, would you by chance like me to file an official bug report somewhere? Or does my description and steps here give enough to go off of?)

Unfortunately, this is all managed by the system and there is little that I can do. I've seen this behaviour, and it is often very odd (for example, waiting, or pressing a bunch of arrow keys, will often get it working again). I do not know why the system is behaving like this, probably some weird interaction of background apps, UI, popup menus, and who knows what other factors, so I have never been able to figure out how to get the system to behave correctly in this instance.

2 Likes

Ah, I gotcha. Well, that sure is a weird one, eh?

For what it’s worth, @peternlewis, I’ve also just noticed that if I trigger this test macro through the “ttestmacro” Typed String trigger, and then if I press Tab to move focus to the “Cancel” button, and then press Shift+Tab to move focus back to the popup/dropdown, I’ll then be able to use the Up and Down arrow keys to move between the popup’s options.

I’m not sure whether that offers any insights, but it might seem to suggest that the OS may be losing track of the currently focused UI element somewhere along the way? And if by any chance that might be the case, would it by chance do any good if Keyboard Maestro were to force the focused UI element whenever a KM dialog is shown? (Or am I out in left field?)

@handcoding do you have Little Snitch installed?