Are you using named slots? Namely:

Asking, as there should never be any need to loop through anything to do something like this. You press the slot key and execute what’s in the relevant slot directly.
Worst case scenario in some uncanny and unique setup, I’d map key-widget. I am judging by the description but may not see the whole picture here, ofc.
The usual way of doing this:
- a user widget with a Named Slot
You then tell the user widget to execute what’s inside its NamedSlot, do nothing if no child is present. This make re-parenting and handling drag & drop pretty straightforward.
Re: original question:

If this triggers for all - the mapping is incorrectly set up. What do you get when you print-compare the keys?
