I'm trying to make a simple notepad-like program. That means that it would have to understand input from the keyboard and the mouse, but the code below doesn't work for me.
while true do local event, p1, p2, p3 = os.pullEvent() if event == "char" then term.write(p1) elseif event == "mouse_click" and p1 == 1 and p2 <= 3 and p3 <= 3 then break end sleep(0.01) end
What's confusing me is that the mouse_click works fine, but the char doesn't.
Doe anyone have any idea how to make this run?