Enter key should do the same as pressing "OK". Esc key should do the same as pressing "Cancel". Reproducible: Always
(Regarding plasma-desktop/kcms/activities/)
I recall this not working but I can't reproduce on Plasma 5.13, it's a proper QDialog with QDialogButtonBox. Works fine from Plasma activity manager and the KCM