-- lua libdraw sample function eresized() draw.draw() end draw.initdraw('lua sample') draw.einit(draw.Emouse|draw.Ekeyboard) eresized() while true do local e, ev = draw.event() if e == draw.Emouse then --print 'Mouse event' elseif e == draw.Ekeyboard then --print 'Keyboard event' if string.char(ev.kbdc) == 'q' then os.exit() end end end