Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Keyboard and Screen Binder
- This tool should only be run on a computer that currently has the correct
- keyboard and screen assigned to it.
- Best practice is to set up your computer and run this before connecting a
- cable to the rest of your OC network.
- ]]
- local component = require("component")
- output = io.open("/etc/rc.d/bind_perphs.lua", "w")
- output:write("function start(config)\n")
- output:write(" local component = require(\"component\")\n\n")
- output:write(" component.setPrimary(\"keyboard\", \"")
- output:write((component.getPrimary("keyboard").address))
- output:write("\")\n")
- output:write(" component.gpu.bind(\"")
- output:write((component.getPrimary("screen").address))
- output:write("\")\n\n")
- output:write("end")
- output:close()
- os.execute("rc bind_perphs enable")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement