on.arrowKey

From Inspired-Lua Wiki
Revision as of 14:40, 1 June 2011 by Jimbauwens (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

on.arrowKey() is an event handler.
This handler get called when a arrow key gets pressed. This handler will not be called if you already use other handlers to catch arrow keys (such as on.arrowLeft).

Example

msg = ""

function on.paint(gc)
	gc:drawString(msg, 10, 10, "top")
end

function on.arrowKey(key)
	msg = "Key " .. key
	platform.window:invalidate()
end

See Also