on.arrowKey

From Inspired-Lua Wiki
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