You can move and resize any window using only your keyboard
Most people drag windows around with their mouse, but your operating system includes a built-in keyboard method that works on Windows, macOS, and Linux. The process differs slightly by system, but the principle is the same: you hold a modifier key (usually Alt or Command) and press arrow keys or other keys to move or resize the window. This is useful when your mouse stops working, when you prefer keyboard control, or when you need to position windows precisely.
The keyboard method is faster than it sounds once you learn the keys. You do not need to install anything or change your settings — the feature is already there.
Key Takeaways
- On Windows, hold Alt and press the spacebar to open the window menu, then select Move or Resize with arrow keys.
- On macOS, you cannot move windows with keyboard alone, but third-party tools like Rectangle or Magnet add this feature.
- On Linux with most desktop environments, hold Alt and press F7 to enter move mode, or Alt and F8 to enter resize mode.
- Once you enter move or resize mode, arrow keys control the window, and Enter confirms the new position.
How to move a window on Windows using Alt+Spacebar
On Windows, the keyboard shortcut to move a window starts with Alt+Spacebar. This opens a small menu with options including Move, Resize, Minimize, Maximize, and Close. Press the M key to select Move, and the window enters move mode — your cursor will change or the window will highlight to show it is ready to be repositioned.
Once in move mode, use your arrow keys to shift the window across the screen. Press the up arrow to move it toward the top, down arrow toward the bottom, left arrow toward the left edge, and right arrow toward the right edge. Each key press moves the window a small distance. Hold down an arrow key to move it faster. When the window is where you want it, press Enter to confirm and exit move mode.
If the menu does not appear, make sure the window you want to move is active — click its title bar first. Some programs, especially full-screen applications or games, may not respond to this shortcut because they handle keyboard input differently.
How to resize a window on Windows using Alt+Spacebar
The same Alt+Spacebar menu that lets you move a window also lets you resize it. After opening the menu, press S to select Resize. The window enters resize mode, and your arrow keys now control the size rather than the position.
In resize mode, the up and down arrows make the window taller or shorter, while the left and right arrows make it wider or narrower. Like move mode, you can hold an arrow key to resize faster. Press Enter when you are satisfied with the new size. If you want to move and resize at the same time, exit the first mode by pressing Escape, then open the menu again and select the other option.
How to move and resize windows on Linux
Linux desktop environments vary, but most common ones (GNOME, KDE, Cinnamon, XFCE) support keyboard window control through Alt key combinations. The standard shortcuts are Alt+F7 to enter move mode and Alt+F8 to enter resize mode. Once you press either shortcut, use your arrow keys the same way as on Windows — arrow keys move or resize the window, and Enter confirms.
Some Linux environments bind these shortcuts differently. If Alt+F7 and Alt+F8 do not work, open your system settings and search for "window management" or "keyboard shortcuts" to see what your desktop environment uses. You can also rebind them to keys you prefer.
Why macOS does not have a built-in keyboard window mover
macOS does not include a native keyboard shortcut to move or resize windows. Apple's design philosophy prioritizes the trackpad and mouse, and the operating system lacks the Alt+Spacebar equivalent that Windows and Linux offer. If you frequently use keyboard control on a Mac, you have two options: use a third-party tool or rely on macOS's built-in window management features like Mission Control and Spaces.
Popular third-party tools that add keyboard window control to macOS include Rectangle (free and open-source) and Magnet (paid, available on the Mac App Store). Both let you define custom keyboard shortcuts to move, resize, and snap windows to halves or quarters of the screen. Rectangle is the most common choice because it costs nothing and works reliably on recent macOS versions.
When keyboard window control is faster than dragging
Keyboard control becomes faster than mouse dragging in specific situations. If you are positioning a window to a precise location on your screen — for example, aligning it exactly to the left half or moving it to a specific corner — keyboard control gives you more accuracy because arrow keys move in fixed increments. Dragging relies on your hand-eye coordination and can overshoot.
Keyboard control is also essential when your mouse is not working or when you are using a laptop trackpad that you find awkward. Some people with repetitive strain injuries prefer keyboard shortcuts because they reduce trackpad use. Once you memorize the shortcut for your operating system, the entire process takes only a few seconds.
Combining keyboard window control with snap layouts and virtual desktops
Windows 11 includes Snap Layouts, which let you position windows in preset arrangements (halves, thirds, quarters) by dragging them to the screen edge or using keyboard shortcuts. You can combine this with keyboard window moving for even faster control. For example, use Alt+Spacebar to move a window close to where you want it, then use Snap Layouts to lock it into a precise position.
Linux and Windows both support virtual desktops (called Workspaces on Linux, Virtual Desktops on Windows 11). You can move windows between desktops using keyboard shortcuts, which is often faster than moving them around within a single desktop. Check your system settings to see what shortcuts your operating system uses for virtual desktop control.
Frequently Asked Questions
What if Alt+Spacebar does not open the window menu on Windows?
Some programs override this shortcut or run in full-screen mode where it does not work. Try clicking the window's title bar first to make sure it is active. If the menu still does not appear, the program may be designed to prevent system shortcuts. In that case, you can try right-clicking the window's title bar, which often shows a context menu with Move and Resize options.
Can I move a window off-screen or to a negative position?
Yes, your operating system allows you to move a window so far that most or all of it is hidden off the edge of your screen. This is rarely useful, but if you do it by accident, you can recover by opening the window menu again and using arrow keys to move it back into view. On some systems, you can also right-click the window in the taskbar and select a restore or maximize option.
Does keyboard window control work on external monitors?
Yes. Arrow keys move windows across all connected monitors just as they would on a single screen. If you have multiple monitors, you can move a window from one monitor to another by holding the arrow key until it crosses the boundary between screens. The process is the same whether you have one monitor or three.
Is there a keyboard shortcut to snap a window to half the screen?
On Windows 11, yes — hold the Windows key and press the left or right arrow to snap the active window to the left or right half. On Windows 10, this shortcut also works. On Linux, it depends on your desktop environment; GNOME and KDE both support similar shortcuts, but you may need to check your system settings to confirm which keys are bound. macOS does not have a native snap shortcut, but Rectangle and Magnet add this feature.
Can I resize a window to a specific pixel size using the keyboard?
Not precisely — arrow keys resize in increments, not exact pixel counts. If you need a window at an exact size, use your mouse to drag the corner or edge, or use a third-party tool that lets you enter dimensions numerically. Some Linux desktop environments have advanced window management tools that support this, but it is not a standard feature across all systems.