I'm trying to create a shortcut to "quit the kernel" in Mathematica. To do this manually, I need to go into the menu and execute: Evaluation->Quit Kernel->Local. This then brings up a dialog asking me if I really want to quit the kernel, giving me the the option of answering in the affirmative by pressing "Return":
Thanks! Tried using Press a Button "Quit", and it works, except for one buggy thing: When you do this w/o KM, immediately after pressing Return, a "working" icon appears on the screen for a second and then goes away. But with the KM macro, that icon sometimes persists on the screen for several seconds (you can make it go away by moving the cursor). Not sure why that's happening, but I I can live with that.
Also tried your Space-Return suggestion, but I'm not sure how you meant me to implement it. I tried adding a command to press and hold the space bar, followed by press and release Return, and that didn't do anything. Also curious why you suggested that, since the action itself is to just hit Return.
Finally, I'm curious why my original macro wouldn't work, since asking KM to simply press Return would seem to be the cleanest solution.
If you use @theorist instead of Return the Space key in "Type a Keystroke" you would press the Cancel button.
If a button like this is highlighted in blue, you can work with either Return or the button action (Quit).
Thanks! That explains why my original approach didn't work! With that, it does. Though I'll note the same small bugginess I found with tjluoma's Press Button approach (the persistence of the "working" icon (i.e., "waiting for system to respond") (which actually looks like a wrist watch) also appears here. But as mentioned above, I can live with that.