rednet.open("left") forward = {} for i,v in pairs(term.native()) do forward[i] = function(...) rednet.send(5,{i,{...}}) return v(...) end end term.redirect(forward) parallel.waitForAny( function() shell.run("shell") end, function() while true do id,message,protocol = rednet.receive("pocketevent") os.queueEvent(unpack(message)) end end ) shell.exit()