how to turn off computer using ESC key

    Jul 07 2013 | 9:51 am
    I will make my patch running automatically as the computer boots, I also want the user press ESC key to turn off the computer, as normal as possible. I don't want it to be forced shutdown.

    • Jul 07 2013 | 10:21 am
      You could experiment with launching a shell script (using the shell object) which contains a shutdown command. However, I've never tried it.
      HTH, Ádám
    • Jul 07 2013 | 3:14 pm
      You will likely have a much easier time doing this with the free trial of Controllermate.
    • Jul 07 2013 | 6:39 pm
      Presuming you're working on a Mac:
      on windows you can send the shutdown /s command via the mxj class
    • Jul 08 2013 | 2:12 am
      If you're on windows it might be easiest to use Auto Hot Key
    • Jul 08 2013 | 8:50 am
      [OT sorry] mmmm by the way, anyone knows if it is possible to easily disable the windows key, in windows ?
    • Feb 02 2017 | 2:44 pm
      Hey LSKA,
      Could you drop off some example? I am also in the need of PC control via max, and project must to be in windows OS... Unfortunately, mxj object is very poorly documented, reference do not says much, and I cannot find java-doc to read more about it...
      What kind of class in mxj should be use to execute shutdown /s command?
      Many thanks!
    • Feb 04 2017 | 7:48 am
      I agree with jdudeo, autohotkey is the way to go.
    • Feb 09 2017 | 8:10 pm
      Hey to everyone who reads this thread
      I found a nice solution to shutdown, restart or hibernate your pc from max. Process is pretty simple.
      First you need to create link with setting to shutdown your pc. Here are link, that explains how to do it in different versions of windows.
      After that you need to set in Max to run this link via message box.
      ; max launchbrowser yourlink.lnk
      for example: ; max launchbrowser C:/User/me/Desktop/shutdown.lnk
      once you click it, max will launch link, which triggers system to shutdown. You can even use ; max quit then shutdown by using trigger b b, first quits max, then shutdown pc, or set it to ESC button or anything you like.
      Hope this will help someone.