nogilnick.
About
Blog
Plots















ShortX: A Hotkey Program for Windows

Tue, 21 Feb 2017

Golang, Hotkeys, Macros, Shortcuts, Software, Windows

This post introduces a new program I wrote in Go and C named ShortX. ShortX allows for the creation of keyboard shortcuts that can be used to trigger other keys or commands. The program runs in the background and triggers shortcuts that are specified in a simple ini file.

Expansion is accomplished using low-level Windows API calls so that resource utilization is kept low. ShortX is useful for launching program in Windows, for custom macros in games, and more. Program executables are available on the Software page.

To run the program simply double-click the exe file or run at the command prompt using:

shortx [flags]

where the available flags are as follows:

-c: Non-shortcut keystrokes are consumed.

-e: Expand macros using other macro definitions provided.

-h: Display help information.

-i: Specify path to the ini configuration file.

-s: Make ShortX start when the computer starts. If run as admin

this installs a registry key for all users (in HKEY_LOCAL_MACHINE).

-t: Amount of time to depress triggered keys. Note: key patterns

separated by a comma are triggered subsequently.

-u: Uninstall ShortX from the registry (stops ShortX from starting

at system start-up).

-v: Verbose mode. Display key names and codes to command window.

Please let me know what you think and if you have any requests, comments, or suggestions!

N