-- -- clicktest.lua -- -- Diagnostic: prints the input events that actually reach a program, so we can -- tell whether this computer sees mouse clicks and whether each monitor sends -- touches (and under what peripheral name). -- -- clicktest -- -- Then: click THIS computer's screen, and touch each monitor. Ctrl+T to stop. -- term.clear(); term.setCursorPos(1, 1) print("clicktest - click this screen, and touch each monitor.") print("(Ctrl+T to stop)") print("") print("This computer is " .. (term.isColour() and "ADVANCED (mouse should work)" or "BASIC (no mouse - needs an Advanced Computer!)")) print("") while true do local e = { os.pullEvent() } if e[1] == "mouse_click" then print("terminal mouse_click OK (button " .. e[2] .. " at " .. e[3] .. "," .. e[4] .. ")") elseif e[1] == "monitor_touch" then print("MONITOR touch OK -> name '" .. tostring(e[2]) .. "' at " .. e[3] .. "," .. e[4]) elseif e[1] == "key" and e[2] == keys.q then return end end