It depends on the interface implementation.
The RETURN key is set as default key for OK button. Once you press RETURN the default action going to be executed.
SPACE works slightly different. Actually it acts like a pointer. The action what belongs to the selected button will be executed.
Ah ok, now that’s interesting. Is there any way I can change it, because to me that’s completely unintuitive. If the button is selected with the cursor keys and I press RETURN, logic says the selected button should be “clicked”. My habit is to select and press return, and I’m never going to be able to change that habit.
I don’t think so that it can be changed - as I said it depends on the implemetation, on code level and not on the interface. Ask the guys on KDE Community Forums maybe they can do something for you. I don’t have any idea, sorry.