What is the keyboard shortcut to maximize a window
Learn the exact keyboard shortcuts to maximize a window across Windows, macOS, and Linux. Get quick steps, OS-specific nuances, and troubleshooting tips to stay productive.

To maximize a window, use OS-specific shortcuts. On Windows, press Win+Up Arrow to maximize the active window. On macOS, press Control+Cmd+F to enter full-screen mode, or use the green maximize button. Some Linux desktop environments support Alt+F7 to move and maximize, or you can bind a global shortcut with your WM. This guide covers all variants.
Quick context and baseline behavior
Maximizing a window is a fundamental productivity action across desktop environments. The exact key combination often depends on your operating system and window manager. In practice, maximizing makes the active window occupy the entire screen, except for the taskbar or dock area. This section lays out the common and edge-case behaviors you’ll encounter on Windows, macOS, and Linux, plus how to test and verify which shortcut is active for the app you’re using.
# This shell snippet is a diagnostic helper to print the active window state on Linux with a tiling WM.
echo 'Active window details:'
ewmstate --active# Windows PowerShell snippet to maximize the currently active window using the Win32 API
Add-Type @"
using System;
using System.Runtime.InteropServices;
public class Win32 {
[DllImport("user32.dll")] public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
[DllImport("user32.dll")] public static extern IntPtr GetForegroundWindow();
}
"@
$h = [Win32]::GetForegroundWindow()
[Win32]::ShowWindow($h, 3) # 3 = maximize- Linux users can validate with a window manager command or a scripting helper like xdotool to simulate the maximize action.
OS-specific baseline commands and variations
# Linux (xdotool): maximize the active window
xdotool getactivewindow windowactivate --sync
xdotool windowsize $(xdotool getactivewindow) 100% 100%# macOS: the official fullscreen shortcut (most apps)
# No shell command needed; use the keyboard shortcut described below.- Linux and Windows users often customize their environments to map the maximize action to a single key. The next sections show practical, ready-to-use shortcuts for everyday work.
Step-by-step: testing and validating maximize shortcuts
- Identify your OS and window manager, then try the default maximize shortcut.
- If the app ignores the shortcut, check if it supports full-screen instead and toggle that state.
- For multi-monitor setups, ensure the intended window is focused on the monitor you want to maximize.
- Test with a few applications to confirm cross-app consistency.
- If needed, create a custom shortcut binding to a specific maximize action.
# AutoHotkey: global maximize for the active window
^!#Up::WinMaximize, A# i3wm users: bind a key to maximize the focused container
bindsym $mod+m resize grow width 50 px; # example; depends on your configCommon OS variations and practical alternatives
- Windows also supports Alt+Space, then X to maximize the active window via the window menu. This is useful when the standard Win+Up is intercepted by a game or full-screen app.
- macOS can maximize by clicking the green zoom button, but some apps distinguish between maximizing and entering full-screen mode. The keyboard shortcut Control+Cmd+F provides a uniform path to full-screen across many apps.
- Linux environments vary by desktop manager (GNOME, KDE Plasma, Xfce). Some use Super+Up for maximize, others rely on window rules. Always check your WM’s keyboard shortcuts settings to align with your workflow.
Customizing and automating maximize actions across environments
If you want a single global action, you can bind a dedicated key to maximize across OSes using scripting tools. The examples below illustrate how to bind a key to the maximize command in Windows via AutoHotkey, in macOS via AppleScript, and in Linux via xdotool.
; AutoHotkey (Windows): bind Ctrl+Alt+M to maximize the active window
^!m::WinMaximize, A# macOS: AppleScript to maximize frontmost window (simulator for demonstration)
tell application "System Events"
tell process "SystemUIServer" to keystroke "f" using {control down, command down}
end tell# Linux: quick xdotool script to maximize and keep focus on the same window
#!/bin/bash
WIN=$(xdotool getactivewindows | awk '{print $NF}')
xdotool windowactivate $WIN
xdotool windowsize $WIN 100% 100%Practical cross-platform patterns and best practices
- Prefer the native, well-supported shortcuts first; resort to scripting only when you need a single key bind across apps.
- If you rely on remote desktop, ensure your host’s keyboard mappings don’t override your local maximize shortcuts.
- Document any custom bindings for teammates to ensure consistent behavior across devices.
# Quick check: verify if the active window is maximized (Windows)
$h = (Get-Process | Where-Object { $_.MainWindowHandle -ne 0 } | Select-Object -First 1).MainWindowHandle
Write-Host "Active window handle: $h"Quick caveats and edge cases
- Some full-screen apps intentionally hide the window frame, which can look like a maximized state but is actually full-screen. Distinguish between maximize (occupies screen but keeps taskbar/dock) and full-screen (covers everything).
- On touch-enabled devices, gestures may duplicate or override keyboard shortcuts. Test on your primary device to confirm expected results.
- Be mindful of accessibility: screen readers and focus management can behave differently when windows resize rapidly. Use stable, incremental resizes for critical workflows.
Summary of accessibility, reliability, and future-proofing
Maximizing a window is a small but powerful habit for improving focus and context switching. By understanding OS-specific shortcuts, you gain speed and consistency. Keep a short list of your default actions, and consider creating one universal binding for your most-used environment if you juggle Windows, macOS, and Linux.
Final practical examples across apps and environments
To wrap up, here are a few distilled examples you can copy-paste into your notes:
- Windows: Win+Up to maximize; Alt+Space, X as a fallback.
- macOS: Control+Cmd+F to enter full-screen; Green button for maximize.
- Linux: Varies by WM; test with xdotool or your WM’s shortcuts. See the AutoHotkey example for Windows across apps.
Steps
Estimated time: 15-25 minutes
- 1
Identify OS and window manager
Verify whether your environment uses Windows, macOS, or a Linux WM. This determines the exact maximize shortcut to use.
Tip: If unsure, check Settings > Keyboard Shortcuts. - 2
Try the native maximize shortcut
On Windows, press Win+Up. On macOS, press Control+Cmd+F to enter full-screen. Observe the behavior.
Tip: If the app supports both, maximize fits your workflow. - 3
Fallback to system menu when needed
If a shortcut is intercepted by a game or app, use Alt+Space then X on Windows to maximize.
Tip: This ensures you can maximize without changing app focus. - 4
Test across apps and screens
Confirm behavior in different apps (browser, editor, IDE) and ensure it works on your primary monitor.
Tip: Multi-monitor setups may require focus on the target window. - 5
Consider customizing with a global shortcut
Bind a single key to the maximize action using a scripting tool like AutoHotkey (Windows) or equivalent.
Tip: Keep your bindings documented for teammates.
Prerequisites
Required
- Windows 10/11 or macOS (latest) desktop environmentRequired
- Basic keyboard familiarity (Ctrl/Cmd keys)Required
Optional
- Linux with a capable window manager or desktop environmentOptional
Keyboard Shortcuts
| Action | Shortcut |
|---|---|
| Maximize active windowWindows maximizes the active window; macOS toggles full-screen mode on most apps | Win+↑ |
| Toggle full-screen (macOS)Use when a maximize via the green button is not desired | — |
| Alternate maximize via system menu (Windows)Activates the window menu then selects maximize | Alt+Space, X |
| Custom global maximize (Windows)Example: AutoHotkey binding to a single key | Defined by script |
Questions & Answers
What is the keyboard shortcut to maximize a window on Windows?
On Windows, the primary shortcut is Win+Up to maximize the active window. Alt+Space followed by X is a fallback method that uses the window menu. Some apps may intercept these shortcuts, so you might need alternatives or a custom binding.
On Windows, press Win plus Up to maximize. If that doesn’t work, try Alt+Space, then X.
What is the keyboard shortcut to maximize a window on macOS?
macOS typically uses Control+Cmd+F to toggle full-screen mode, which visually maximizes the window. Some apps provide their own maximize button behavior, so you may still prefer the green button in the title bar.
On Mac, use Control+Cmd+F for full-screen, or click the green maximize button.
Does maximizing a window differ from full-screen mode?
Yes. Maximizing fills the screen but keeps the dock/taskbar visible. Full-screen hides other UI elements and often changes the app’s window chrome. Check the app’s behavior to decide which mode suits you.
Maximize fills the screen but keeps the dock visible; full-screen hides more UI elements.
What should I do if the shortcut doesn’t work?
First verify the window is focused. If that fails, try the system menu method (Alt+Space, X on Windows) or use a custom binding. Some apps may override global shortcuts.
If it doesn’t work, focus the window and try the system menu trick or a custom shortcut.
Can I customize a universal maximize shortcut across OSes?
You can create OS-specific bindings (e.g., AutoHotkey on Windows, AppleScript on macOS) to simulate a maximize action. Linux users can map similar actions via their WM or scripts. It’s best to document any setup changes.
Yes, you can customize a universal binding per OS with scripting tools.
Which command should I learn first for multi-monitor setups?
Start with Win+Up on Windows to maximize on the active monitor. On macOS, consider using the green button or full-screen shortcut. For Linux, test your WM’s maximize binding before relying on a global shortcut.
Win+Up on Windows gets you the active monitor; macOS uses full-screen, Linux depends on your WM.
Main Points
- Master OS-specific maximize shortcuts
- Distinguish maximize from full-screen across platforms
- Use fallback methods when shortcuts are intercepted
- Test across apps and monitor configurations
- Consider custom bindings for speed