Dictionaries with empty keys - is this a bug?

I feel obliged to report what appears to be a bug, despite saying that I would stay away from the forums for a year due to being too argumentative. Here's the code that seems to be bugged:

The reason it appears to be bugged is that if you create any dictionary item with an empty key value, it allows the entry to be created, but you can't delete that entry which you just created by using the same key value. It gives you an error. Therefore you have to resort to AppleScript to delete the dictionary.

I notice a couple of threads on this subject on this website, and it appears that they didn't recognize this specific problem as a bug, just as some unexplained behaviour.

Of course my diagnosis here could be wrong, in which case I apologize in advance to everyone.

I'm excited about MacOS Monterey and I'm using KM to do fascinating things with (the beta of) Monterey's OCR and voice recognition. And I hope KM will be able to hook into those features in some way.

For the next version I have removed trimming white space from keys and ensured an empty key is valid, both better match JSON semantics, which allow any string as the key.

Keyboard Maestro has its own OCR, and as far as I am aware Apple has not made any API available for the Monterey OCR so I'm not sure what I can do to support it other than indirectly. I also don't know anything about Monterey’s voice recognition, but you can use the existing system to trigger macros so I presume that remains possible in Monterey.

1 Like