17 posts
Posted 03 August 2012 - 10:36 AM
For example, how would you get CTRL + T using os.pullEventRaw()?
I know you can get a single character pretty easily, but how would you get multiple key's at once? I want to allow the user to press CTRL+T/CTRL+S/CTRL+R but they will be prompted for a password first.
Thanks
Tom
992 posts
Posted 03 August 2012 - 10:41 AM
It is not currently possible to to to that.
how ever if you use os.pullEventRaw() it will return "terminate" when Ctrl+T is pressed.It is how it terminates actually
there is no way to detect or prevent Ctrl+S or Ctrl+R
17 posts
Posted 03 August 2012 - 10:53 AM
really? How does the OS do it then? Because CTRL+R reboots, and CTRL+S issues the shutdown command :S
1548 posts
Location
That dark shadow under your bed...
Posted 03 August 2012 - 10:58 AM
It's in the Java of the cc mod
992 posts
Posted 03 August 2012 - 11:00 AM
Crtl+ R and Crtl + S are run from higher lever code in java They cause no even because the environment no longer exists after they are activated. Crtl+t is a event returned to os.pullEventRaw() that causes it to kill the running program while maintaining environment.
That is why People can make doors where Crtl+t don't work but know one can make a computer keep running after Crtl + R or Crtl + S is used.
89 posts
Location
Puerto Rico
Posted 03 August 2012 - 11:11 AM
More or less CTRL + R,S Are hard-coded into the mod and cannot be modified in-game.