I also support this idea. But I think a power button would be enough and there is no need for a restart button(because you could just click the power button two times).
Would also work fine
I think that shutdown, restart and terminate would be best
I don't so much agree with terminate. It could cause problems if people override it in their programs, they could turn around and complain to Dan/Cloudy saying the button isn't working.
This shutdown button should call os.shutdown() as opposed to just terminating the computer in case the user wants to override os.shutdown().
I don't agree with this, I feel that the usage of this button would better suit to use the Java-side shutdown over the Lua-side.
There shouldn't be a terminate button, but it would be nice ^T didn't take so long - instead, pushing ^T should immediately fire a terminate_warn event or something to that effect, and then the real terminate event will fire 3 seconds later like it does now. That way, you can terminate programs (that haven't crashed) more quickly. But this terminate_warn event can be easily done in code by a keyboard handler daemon.
Uhhh what? there is a "terminate" event, this is given to the program when CTRL+T is held so that the program can handle it appropriately, whether it is to nicely quit, or to prevent terminating… Basically as it stands now, when people use any yielding functions (i.e. sleep, read, any turtle or http function, etc) those functions call `os.pullEvent`, which in turn calls `os.pullEventRaw`, which in turn calls `coroutine.yield`. The program waits at `coroutine.yield` until an event occurs, the event then gets passed all the way back to `os.pullEvent` it is in here that the "terminate" event is processed like so
function os.pullEvent( filter )
local event = { os.pullEventRaw(filter) }
if event[1] == "terminate" then
error("Terminated", 0)
end
return unpack(event)
end
So basically what I'm saying here it that programs can be made in a way that doesn't terminate a program when CTRL+T is pressed so there is no need to having a "terminate_warn" event.