Line 1: |
Line 1: |
| + | on.'''arrowKey'''() is an event handler. <br> 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).<br> |
| | | |
| + | == Example == |
| | | |
| + | <source lang="lua"> |
| + | msg = "" |
| + | |
| + | function on.paint(gc) |
| + | gc:drawString(msg, 10, 10, "top") |
| + | end |
| + | |
| + | function on.arrowKey(key) |
| + | msg = "Key " .. key |
| + | platform.window:invalidate() |
| + | end |
| + | |
| + | </source> |
| + | |
| + | == See Also == |
| + | |
| + | *[[on.arrowDown]] |
| + | *[[on.arrowUp]] |
| + | *[[on.arrowRight]] |
| + | *[[on.arrowLeft]] |
| | | |
| [[Category:Events]] | | [[Category:Events]] |