on.mouse_press = function(x,y, mouse_button) if Mode == 'teach' then teach_mouse_press(x,y, mouse_button) else learn_mouse_press(x,y, mouse_button) end end