Ok, not perfectly. I forgot about when the key is visible but doesn’t successfully get implicitly taken. For example when it’s in a locked, transparent container, the rule will fire even if the key hasn’t been obtained, making for a nonsensical response. Nix that last before rule I added above and replace with:
The cashbox is transparent.
Before unlocking the safe with the strange key when the strange key is not the matching key of the safe:
if the strange key is carried or the strange key is touchable:
now the matching key of the safe is the strange key;
[we don't want to print anything here because with the implicit actions it will be out of order]
continue the action.
After unlocking the safe with the strange key:
say "[one of]Holy smokes! The key fits.[or][run paragraph on][stopping]";
continue the action.
test key2 with "unlock safe with strange / open cashbox / unlock safe / unlock safe with strange / lock it / unlock it".