ENH: auto-save data even without a loop (keyboard only for now)

This commit shows how it can be done for keyboard components. Presumably easy to extend
to other component types.