Feature request - Close the app with ESC.

64 views
Skip to first unread message

Johann Kok

unread,
May 27, 2020, 11:58:41 AM5/27/20
to speedcrunch
Since it is a calculator that is constantly opened and closed, opened and closed while doing other work how about creating an option to close it with ESC button?
And maybe a keyboard shortcut to open it also, like ALT CTRL C or something?

Helder Correia

unread,
May 27, 2020, 12:04:11 PM5/27/20
to speed...@googlegroups.com
Hi, Johann.  I believe those are tasks to be handled by window managers, not applications.  All major desktop operating systems already allow for that kind of customization.


May 27, 2020, 06:01 by johan...@gmail.com:
Since it is a calculator that is constantly opened and closed, opened and closed while doing other work how about creating an option to close it with ESC button?
And maybe a keyboard shortcut to open it also, like ALT CTRL C or something?


--
You received this message because you are subscribed to the Google Groups "speedcrunch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to speedcrunch...@googlegroups.com.

Roy Wiseman

unread,
May 31, 2020, 3:33:21 PM5/31/20
to speed...@googlegroups.com, johan...@gmail.com
Hi Johann,

I've built automation for you to do this. Just go to https://www.autohotkey.com/ and grab the latest version and install. Now you can run .ahk scripts which define hotkeys for you, so I created a toggle for you, using CTRL-WIN-C  (c for calculator)

Just open notepad and put the below code in and save it as "MyTools.ahk" or whatever (you can add to more and more functions to it if you want to learn AutoHotkey).
Double click on the .ahk file to load it and now your CTRL-WIN-C toggle is running, hit CTRL-WIN-C to make speedcrunch appear and CTRL-WIN-C to kill it again!
I could modify that to just minimise speedcrunch instead of killing it. Let me know if you want that and we can change it ☺

Regards,
Roy.

^#c::
    if ProcessExist("speedcrunch.exe")
    {
        ProcessKill("speedcrunch.exe")
        Sleep500
        WinMaximize, ahk_exe speedcruch.exe

    }
    else
    {
        Run"C:\Program Files (x86)\SpeedCrunch\speedcrunch.exe"
    }
return

ProcessExist(PIDorName:="")
{
    Process Exist, %PIDorName%
    return ErrorLevel
}

ProcessKill(name)
{
    Process, Exist, %name%
    If (!ErrorLevel0)
    {
        ProcessClose, %name%
    }
    Else
    {
        MsgBox ErrorProcess wasn't found.
    }
    Return 
} 



Reply all
Reply to author
Forward
0 new messages