that's simple:
on_space=light_on;
IMPORTANT: when using the on_... (on_enter,on_f1 (that works for every key))
the function (in this case) light_on will just called once if you press the key. So you don't have the problem, that the function will called more than once per keypress.
and you just have to call it once, or if you want to bind the key to another function. And you can't use brackets: on_space=light_on(); doesn't work
i hope this helps you
Kartoffel