From maintainer Florian Stinglmayr. Tweaks from and ok sthen@ lua-term exposes low level terminal functions to Lua.