Skip to content

Tome-Sulmont/SimpleWindowsDrag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 

Repository files navigation

Simple Windows Drag

The goal with Simple Windows Drag is to easily snap, move and resize windows with a single keystroke and mouse movement.
This is a script for AutoHotKey v1.1

Features

  • Hold down F14 and Left click anywhere inside a window to drag it to a new location.
  • Hold down F14 and Right click drag anywhere inside a window to easily resize it.
  • Hold down F14 and Middle click drag to perform the following actions ; maximize, always on top or snap a window.
  • Hold down F14 and Middle click without moving to minimize the window under the mouse cursor.

In my case, F14 is remapped to Caps Lock with PowerToy

All shortcuts

Hotkeys Behavior
F14 + Left Button + Drag Move a window.
F14 + Right Button + Drag Resize a window.
F14 + Middle Button + Drag Up Maximize/Restore a window.
F14 + Middle Button + Drag Down Always On Top a window.
F14 + Middle Button + Drag Right Snap to the Right half.
F14 + Middle Button + Drag Left Snap to the Left half.
F14 + Middle Button + Drag Top right corner Snap to the Top-Right quarter.
F14 + Middle Button + Drag Top left corner Snap to the Top-Left quarter.
F14 + Middle Button + Drag Bottom right corner Snap to Bottom-Right quarter.
F14 + Middle Button + Drag Bottom left corner Snap to the Bottom-Left quarter.
F14 + Middle Button + Motionless Minimize a window.
F14 + Numpad Snap the active window.

Installation

  1. Install AutoHotKey
  2. Download the SimpleWindowsDrag.ahk file and double click to run it.
  3. (Optional) To have the script run when you start your computer, place the .ahk file (or a shortcut of it) into your computer's startup folder.

-> The startup folder can be accessed by pressing Win + R on your keyboard, then in the Open field, type shell:startup then press Enter.

The script

I tried to make those 3 scripts work together :

It’s all written in Autohotkey V1.1 because of the amount of ressources online and the fact that the originals scripts are all written in this version of the language.

I’m new to coding, so my code is probably not well optimized and some fonctions does not works as well as I would like. But overall, I’m pretty happy with what this piece of code can do.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published