How to Use AutoHotKey to Snap Application to Side Of the Screen

AutoHotKey, often abbreviated to AHK, is a popular and open-source scripting language for Windows. It’s designed to make it easy to change keyboard shortcuts – or hotkeys – so that they suit your specific needs. It’s also used for software automations, and can be used by people new to coding.

A user explained that, in an effort to make the ctrl+shift+arrow command result in applications snapping to one side of the screen, that the command would only work on occasion. The user used the following script:

^+Right::send, #{Right down}{Right up}

^+Left::send, #{Left down}{Left up}

While the script showed limited success, it is possible to refine the script and use AutoHotKey to make it a reliable shortcut. Below is an explanation of how you can do that.

Amend Script & Install AutoHotKey

  1. To start, you will need to download AutoHotKey from this link. During the AutoHoteKey installation, you will be asked to choose between ANSI and UNICODE. Choosing UNICODE will mean that the software supports non-English characters. Follow the on-screen instructions until there is an Install Click it and continue.
  2. Once the software has installed, you should be able to create scripts from your On your Desktop, right click and highlight New. From the drop-down menu, choose AutoHotKey Script.
  3. Choose a name for your script. As you are using it to create a ‘Snap’ function, you could perhaps call it KeyboardSnapShortcut.ahk. The .ahk file extension is necessary.
  4. A new icon should appear on your Desktop called Right click the icon and then choose Edit Script. A Notepad window should appear. This will contain your script. In Notepad, amend the following script:^+Right::send, #{Right down}{Right up}

          ^+Left::send, #{Left down}{Left up}


^+Right:: SendEvent {LWin down}{Right down}{LWin up}{Right up}


^+Right:: Send {LWin down}{Right}{LWin up}

  1. Now, use the ctrl+S command on your keyboard to save your script, and exit the window.
  2. Double click the icon on your home screen and the code will run. Now, you should be able to snap windows to the left or right of your screen using the ctrl+shift+left arrow / right arrow.
Kevin Arrows
Kevin is a dynamic and self-motivated information technology professional, with a Thorough knowledge of all facets pertaining to network infrastructure design, implementation and administration. Superior record of delivering simultaneous large-scale mission critical projects on time and under budget.

Expert Tip

How to Use AutoHotKey to Snap Application to Side Of the Screen

If the issue is with your Computer or a Laptop you should try using Restoro which can scan the repositories and replace corrupt and missing files. This works in most cases, where the issue is originated due to a system corruption. You can download Restoro by clicking the Download button below.

Download Now

I'm not interested