A lightweight programming environment for desktop and mobile devices
on.text_input = function(t)
	if Show_file_dialog then
		text_input_on_file_dialog(t)
	elseif Show_code then
		if Current_pane.editor_state.cursor_x then
			edit.text_input(Current_pane.editor_state, t)
		end
	else
		-- editors hidden
		if car.text_input then
			call_protected(car.text_input, t)
		end
		if car.textinput then
			call_protected(car.textinput, t)
		end
	end
end