get("#185") function lineAbove() return lines[curY] or '' end function userFunction(line) return "Hello.\n" end function extensions(hook) if hook == 'processEvents1' then if inputEvents then for _, e in ipairs(inputEvents) do if e[1] == 'keyTyped' and e.keyChar == '\n' and userFunction then local s = userFunction(lineAbove()) if s ~= nil then insertText(s) end end end end end end