Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 456 Bytes

hooks.md

File metadata and controls

18 lines (13 loc) · 456 Bytes

Hooks

Name Underlying Event Description
Hooks:Backspace() on.backspaceKey() Runs when the backspace key is pressed
Hooks:CharIn(c) on.charIn(c) Runs on character input, only when no component is focused
Hooks:Paint(gc) on.paint(gc) Runs when the screen is re-drawn, use raw nspire draw api

How to define a hook

/hooks.lua:

function Hooks:CharIn(c)
    Lib.Debug.Print("pressed " .. tostring(c))
end