Skip to content

The quick way to type en and em dashes on Windows, implemented via AutoHotkey keyboard shortcuts.

License

Notifications You must be signed in to change notification settings

nathantspencer/QuickDash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuickDash Logo QuickDash Logo

QuickDash is an AutoHotkey script for quickly typing en and em dashes on Windows: a task that is particularly cumbersome for users of keyboard without numpads.

image

Type two hypens to form an en dash, or three for an em dash.

Installing QuickDash

  • Navigate to the latest release on the releases page
  • Download QuickDash.exe and InstallQuickDash.bat
  • Open to the folder on your PC where they were downloaded, then double-click InstallQuickDash.bat
  • Successful installation will display a result like the one shown below; QuickDash is active immediately

image

Modifying QuickDash

QuickDash can be modified to fit your needs. See the FAQs for examples of modifying QuickDash to:

  • Restrict it to operate only in certain programs
  • Adjust the threshold for how quickly hyphens must be typed to form en or em dashes

Most modifications will be done by first modifying the AutoHotkey script QuickDash.ahk. To run the modified script directly or to compile it into an executable QuickDash.exe, you'll need to install AutoHotkey.

Once AutoHotkey is installed, and before testing a modified version of the script, be sure the QuickDash is uninstalled to avoid conflicting behavior. Then you can test your changes by running the following command from the sources directory:

AutoHotkey.exe QuickDash.ahk

The hotkeys should immediately become active. If you make additional changes, you can run the above command again, which will replace the previously bound hotkey behavior with the new one.

To stop the hotkeys, you can find and end the task for AutoHotkey from Task Manager, shown below:

image

When you are satisfied with the changes, use AutoHotkey Dash—an executable installed with AutoHotkey—to compile QuickDash.ahk into QuickDash.exe. Ensure that the new version of QuickDash.exe is present alongside the script InstallQuickDash.bat, then double-click the latter to run the installation process. The modified version of QuickDash will be activated immediately.

Uninstalling QuickDash

  • Navigate to the latest release on the releases page
  • Download UninstallQuickDash.bat
  • Open to the folder on your PC where this file was downloaded, then double-click it
  • Successful uninstallation will display a result like the one shown below; QuickDash is deactivated immediately

image

FAQs

What platforms does QuickDash support?

QuickDash is Windows-only.

I'm having a problem with QuickDash. How can I get some help?

If QuickDash isn't working correctly for you please open an issue and I'll get back to you as soon as possible.

If you have general feedback, questions, or suggestions you'd like to share, please start a discussion instead.

Can I restrict QuickDash to operate only in certain programs?

Yes. This can be achieved by modifying the #HotIf directive in QuickDash.ahk, shown below:

; Don't use this hotkey in console windows and code editors, where "--" is often used
; intentionally. Add other windows to exlude here if desired. AutoHotkey's Window Spy
; can be used to determine the name of each.
#HotIf !WinActive("ahk_exe devenv.exe")
&& !WinActive("ahk_exe code.exe")
&& !WinActive("ahk_exe WindowsTerminal.exe")

The programs listed there are excluded from QuickDash. To easily find the names of programs to include or exclude from QuickDash, AutoHotkey's Window Spy feature can be used. After making a change, follow the instructions in Modifying QuickDash to produce and install a new executable.

Can I change how quickly I need to type hyphens in order to form en and em dashes?

Yes. This can be done by adjusting the TIME_THRESHOLD_MS constant in QuickDash.ahk, shown below:

; Adjust this as desired to make the time window between hypen keystrokes that should be
; combined into en or em dashes more or less lenient. The default is 400 milliseconds.
TIME_THRESHOLD_MS := 400

This threshold represents the number of milliseconds within which an additional hyphen must be typed in order to transform a hypen into an en dash, or an en dash into an em dash. Increasing this number will allow you to form en and em dashes from more slowly typed hyphens. After making a change, follow the instructions in Modifying QuickDash to produce and install a new executable.

About

The quick way to type en and em dashes on Windows, implemented via AutoHotkey keyboard shortcuts.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published