Send Keyboard Events to Dialog.children instead of Dialog.contentItem.children.
The only children of contentItem are a Plasma::FrameSvgItem and a ColorScope, and not the very important mainItem which is where most Keys.onPressed is defined.
BUG: 370185
Assuming this is backportable:
Fixed In: 5.12.7 (released tomorrow so too late for that)
Fixed In: 5.12.8 (Feb 12th) <= Most likely?
Fixed In: 5.14.0 (Beta was Sep 13, Tagged Oct 4, Released Oct 9)
Fixed In: 5.14.1 (Oct 16)
Here's where FrameSvgItem is defined / set as a child on contentItem.
https://github.com/KDE/plasma-framework/blob/master/src/plasmaquick/dialog.cpp#L758
Here's where mainItem *should* be a child of contentItem.
https://github.com/KDE/plasma-framework/blob/master/src/plasmaquick/dialog.cpp#L797
I've no idea where ColorScope is defined as a child, but when I logged it, it had a null parent.
kwin_tabbox: d->window() PlasmaQuick::Dialog(0x15bcc30 exposed, ...) kwin_tabbox: d->window()->contentItem() QQuickRootItem(0x15820e0, parent=0x0, geometry=0,0 932x206) kwin_tabbox: d->window()->sendEvent Plasma::FrameSvgItem(0x15be890, parent=0x15820e0, geometry=0,0 932x206) kwin_tabbox: d->window()->sendEvent ColorScope(0x16862a0, parent=0x0, geometry=0,0 0x0)
Seeing as mainItem is not a child of contentItem, this could actually be a plasma-framework bug too. That said, I don't really see a need to send keyboard events to the PlasmaCore.Dialog background svg or the ColorScope.
Here's what it sends to now:
kwin_tabbox: d->window() PlasmaQuick::Dialog(0x1b97d00 exposed, ...) kwin_tabbox: d->window()->contentItem() QQuickRootItem(0x1b94be0, parent=0x0, geometry=0,0 932x602) kwin_tabbox: d->window()->sendEvent QQuickRootItem(0x1b94be0, parent=0x0, geometry=0,0 932x602) kwin_tabbox: d->window()->sendEvent QQuickItem_QML_72(0x1b99a60, parent=0x1b94be0, geometry=4,4 924x594)