OQ
I have a completely isolated computer. a user can interact with this computer. the computer is running a program. the program will detect if a user enters a key sequence such as CTRL+D. if this sequence is detected, the program will call another function within the same program which is a CLI [aka console or shell]. once the user is finished with the CLI they will 'exit' the CLI and the loop which was running to detect the key sequence will again be running, as the CLI returned because it is simply a function.
How can I do this?
function console() --console end function run() while true do if ([key sequence]) then console() else --run program normally end end end
ANSWER
Edited by jacky500, 21 March 2016 - 10:01 PM.