MACRO: Display all Dictionaries, keys, and values

I'm just starting to work with Keyboard Maestro Dictionaries, and wanted an easy way to see what I'd created and what was in them. There's no easy way to view these, unlike variables, so I wrote this simple viewer. It just lists all the keys and values in all your Dictionaries:

This is a very simple macro, other than a bit of Perl (which ChatGPT helped me write a while ago) to align the values column within each Dictionary.

Download Macro(s): Display Dictionary info.kmmacros (15 KB)

Macro screenshot

Macro notes
  • Macros are always disabled when imported into the Keyboard Maestro Editor.
    • The user must ensure the macro is enabled.
    • The user must also ensure the macro's parent macro-group is enabled.
System information
  • macOS 14.4.1
  • Keyboard Maestro v11.0.2

I just run it manually from the tool bar, so there's no assigned trigger.



Thank for sharing, @griffman.

At some point you must of set the Display Text default to a monospaced font. I haven't and frankly I've forgotten how to set the default. Could it be one of the Preferences Set by Command Line?

Since my default is not monospaced, my output is not aligned.

2024-05-10 14.06.49@2x

When I open the macro Display Text action, select %Variable%local_dictInfo%, right-click and select Font > Show Fonts, I see Helvetica 14.

If I change to Menlo 13 the macro displays the values aligned.

2024-05-10 14.52.35@2x

Thus, if I'm correct, I think you need to explicitly set the font characteristics if you want your shared macro to display as intended for the masses.

I've done just that in a few of my shared macros, e.g., Insert Action to Check Accessed Variables.

Ah, you are right—and I learned something new today. I never realized that those font settings were saved with the action. It makes sense, but they just always struck me as a "local-only" kind of thing.

Updated macro is now live.

Yea, you're right:

$ defaults read com.stairways.keyboardmaestro.editor | grep Font
    "Font-HTML" = "Menlo:12";
    "Font-Normal" = "Menlo:12";
    "Font-Shell" = "Menlo:12";


I think I'm right. If not @peternlewis will set us straight.


Maybe not, unless you think Font-HTML sets that default. Here's what I see:

defaults read com.stairways.keyboardmaestro.editor | grep Font            ─╯
    "Font-AppleScript" = "Menlo:13";
    "Font-Shell" = "Menlo:13";
    "NSWindow Frame NSFontPanel" = "639 422 445 232 0 0 1728 1055 ";

Sorry, I should have checked before I made that suggestion. @peternlewis, what are we overlooking?