Difference between revisions of "Hardcoded Events"

From ComputerCraft Wiki
Jump to: navigation, search
(Created page with "Hardcode are the shutdown, reboot and terminate events. You can run them with ctrl + s, r, t. There's a way how they can be denied...Please say me how leave a command here: ht...")
 
Line 1: Line 1:
Hardcode are the shutdown, reboot and terminate events. You can run them with ctrl + s, r, t.
+
There are two hard-coded commands in ComputerCraft. To use these commands, you must hold down the appropriate key combination for about 1 second.
There's a way how they can be denied...Please say me how leave a command here:
+
 
http://www.computercraft.info/forums2/index.php?/topic/1945-hardcoding/page__pid__14329#entry14329
+
{| border="1" cellpadding="2" cellspacing="0"
 +
!style="background:#EEE" width="200px"|Shortcut
 +
!style="background:#EEE" width="*"|Usage
 +
|-
 +
|CTRL + R
 +
|Reboots the console.
 +
|-
 +
|CTRL + S
 +
|Forcefully shuts down the computer.
 +
|}
 +
 
 +
There is no way to override these commands. There is also another commonly used command, Ctrl+T to close the current program, but this is not hard-coded. To override this command, use [[Os#pullEvent|os.pullEvent]].

Revision as of 13:57, 3 June 2012

There are two hard-coded commands in ComputerCraft. To use these commands, you must hold down the appropriate key combination for about 1 second.

Shortcut Usage
CTRL + R Reboots the console.
CTRL + S Forcefully shuts down the computer.

There is no way to override these commands. There is also another commonly used command, Ctrl+T to close the current program, but this is not hard-coded. To override this command, use os.pullEvent.