5. [DEPRECATED] Optional Keyboard Shortcut (AutoHotkey) - adolan5/myCMD GitHub Wiki

WARNING: THIS KEYBOARD SHORTCUT METHOD SHOULD BE CONSIDERED DEPRECATED

I was sad to find out recently that Chrome will, on occasion, flag AutoHotKey as malicious software. I was just able to download it (as I edit this wiki page), so it seems hit-or-miss. However, I have been able to replicate the AHK keyboard shortcut's behavior in vanilla Windows (I've tested only on 10, but I believe the method will work for versions down to at least 7).

On the subject of the keyboard shortcut

AutoHotkey (ahk) is a great "Bodging tool".

An ahk script has recently been introduced to the repository. What can I say? I like the way that ctrl+alt+t on Linux devices often pops up a fresh terminal, and the keyboard shortcut feature of a Windows shortcut doesn't quite make the cut.
Additionally, the script may be disabled (killed, really) with ctrl+alt+y; a confirmation dialogue will be displayed in this case, to make sure you really do want to stop the process. When stopped, it can be re-run via shortcut.ahk.
Important Note: The shortcut causes myCMD to technically not be spawned by Windows Explorer. Therefore, if you make a change to your environment variables, you'll need to manually launch myCMD or restart the shortcut script; otherwise, those changes will not be read in until reboot.

Basic configuration of shortcut.ahk

shortcut.ahk is located in the executables/ directory. If you have AutoHotkey installed, then you can execute it immediately. It will not work immediately, however; you need to add a new environment variable first.
You can refer to step 4 of Installation in Basic Installation and Use for this step. Your PATH is located in the same place as all your other user and system variables. Instead of editing the PATH, however, you'll want to add an entirely new variable.

  1. If you haven't already, create a shortcut to myCMD (again, refer to Basic Installation and Use) for this step.
  2. Create a new user variable in the Environment Variables dialogue with the New... button.
  3. Set the "Variable Name" to MYCMDLNK. You'll notice that this specific name is referenced in shortcut.ahk.
  4. Set the "Variable Value" to the full location of your myCMD shortcut (for example, C:\Tools\myCMD\myCMD.lnk).
    Note: It is probably best to type out or copy/paste this path; using the Browse File... button may instead follow the shortcut to the actual cmd.exe executable (instead of your shortcut).
  5. Restart any open instances of myCMD or regular cmd.
  6. Launch shortcut.ahk and try to use ctrl+alt+t to open a new instance of myCMD.
  7. The script can be killed at any time via ctrl+alt+y

Configure shortcut.ahk to run at startup

To ensure that you can use your new keyboard shortcut right away on boot, follow these steps:

  1. Create a shortcut to shortcut.ahk (Right click > 'create shortcut')
  2. Open the location of your startup programs by entering shell:startup into the Run dialogue (Windows key + r)
  3. Place the new shortcut you made in this location.
  4. The script should now run on system startup.