Which event to use when text field Enter key is pressed or focus lost?

I feel that this should be pretty simple but I don't remember having done it before ...

I have several text fields on a view. All of these are bound to an object in the view's custom properties. I want to update the config database table any time one of the text fields is updated - either by pressing Enter or losing focus.

What's the most intuitive other than adding a Save button? I suspect that onCompositionEnd is the one I want but it doesn't seem to do the business.

Have you tried onBlur? This would fire anytime you click out of the text field with the event on it, I'd probably add some check that if the text fields value hasn't changed, nothing happens, so you don't run queries just by clicking on and off the text field.

You should probably just enable deferUpdates, and then use a change script.

That was the possibility I'd forgotten about!