Wanted: Shortcut to close apps


Gurkensalat

Member
Local time
9:27 AM
Posts
5
OS
Windows 11 Pro (v25H2)
Hi! I hope you can help me with this admittedly trivial problem :rolleyes:

So I don't have to click the “X” every time, I'm looking for a shortcut to simply close an application. On macOS, that would be Cmd+Q.
  • Alt+F4 isn't an option for me because I work on a laptop and constantly use the F keys to adjust volume and brightness
  • In some programs, Ctrl+Q works and in others Ctrl+Shift+Q or even Esc works—but in many, neither of them works.
I’ve worked exclusively on Macs for the last 6 years, but before that I used Windows for years—and I don’t remember this ever being a problem "back then". Wasn't it always Ctrl+Q in every app??? I'm confused.

Alternatively, could I set up a shortcut in Windows myself—without causing any new problems? What would be the best way to do that?

Thank you very much in advance!
 
Windows Build/Version
26200.8246 / 25H2

My Computer

System One

  • OS
    Windows 11 Pro (v25H2)
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad T14s
    CPU
    AMD Ryzen 7 PRO 5850U
    Memory
    32 GB
    Graphics Card(s)
    AMD Radeon 1008 MB
    Hard Drives
    1TB SSD
Hello, and welcome to the forum. :alien:

If you like, you can check the options in the tutorial below to see if one may work better for closing a window/app.

 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    TerraMaster F8 SSD Plus NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Amazon Basics Wired Full Keyboard MD005
    Mouse
    Logitech MX Master 4
    Internet Speed
    2 Gbps Download and 100 Mbps Upload
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
Thank you very much!
But I'm really looking for a simple shortcut...
 

My Computer

System One

  • OS
    Windows 11 Pro (v25H2)
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad T14s
    CPU
    AMD Ryzen 7 PRO 5850U
    Memory
    32 GB
    Graphics Card(s)
    AMD Radeon 1008 MB
    Hard Drives
    1TB SSD
Alt + F4 is the simple shortcut, on laptops with a fn key it becomes fn + alt + F4. If you wanted to remap that you can install Power Toys and use the Keyboard Manager feature to remap that shortcut
 

My Computer

System One

  • OS
    Linux Mint
    Computer type
    Laptop
    Manufacturer/Model
    System76 Lemur Pro
If there was one for single window Brink would know.

You can close all windows using a tiny 3rd party app called "closeall " though. It's my understanding it is now a paid app since it's developer sold it to NtWind.
I've used a really old version 1.30 of Closeall for many years; from back when it was free. If you're interested in that, after much searching I found it here. Scroll to bottom of page to see download. Unzip it and copy the tiny closeall.exe where ever you want (I copy mine to the root of C) and pin it's icon to your taskbar.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Optiplex 7080
    CPU
    i9-10900 10 core 20 threads
    Motherboard
    DELL 0J37VM
    Memory
    32 gb
    Graphics Card(s)
    none-Intel UHD Graphics 630
    Sound Card
    Integrated Realtek
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    2x1tb Solidigm m.2 nvme /External drives 512gb Samsung m.2 sata+2tb Kingston m2.nvme
    PSU
    500w
    Case
    MT
    Cooling
    Dell Premium
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    so slow I'm too embarrassed to tell
    Browser
    #1 Edge #2 Firefox
    Antivirus
    Defender+MWB Premium
  • Operating System
    Windows 11 Pro 24H2 26200.8457
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink Mini PC SER5
    CPU
    AMD Ryzen 7 6800U
    Memory
    32 gb
    Graphics card(s)
    integrated
    Sound Card
    integrated
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Crucial nvme
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    still too embarrassed to tell
    Browser
    Firefox
    Antivirus
    Defender
    Other Info
    System 3 is non compliant Dell 9020 i7-4770/24gb ram Win11 PRO 26200.8457
Assuming you simply wish to close the currently focussed Window (is that correct?) then you could use a 1 line Autohotkey script and assign whatever shortcut key you like to it.

You can create the script as a <name>.ahk file (text) and run that with Autohotkey, and rt click it, click Compile to create a <name>.exe file.

Note the text at the bottom (it's similar to using ALT F4)


1.webp
 

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo t480s
    CPU
    i7-8650U
    Memory
    16GB
    Graphics Card(s)
    Intel UHD 620
    Screen Resolution
    1920x1080
    Hard Drives
    C SN810 SDCPNRY-512G-1006
    Browser
    Edge, Firefox
    Antivirus
    Defender
fn + alt + F4
OK! That actually seems just about doable...
to be honest, the fm button was new to me—thanks so much for the tip!
 

My Computer

System One

  • OS
    Windows 11 Pro (v25H2)
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad T14s
    CPU
    AMD Ryzen 7 PRO 5850U
    Memory
    32 GB
    Graphics Card(s)
    AMD Radeon 1008 MB
    Hard Drives
    1TB SSD
Thank you for your reply.
 

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo t480s
    CPU
    i7-8650U
    Memory
    16GB
    Graphics Card(s)
    Intel UHD 620
    Screen Resolution
    1920x1080
    Hard Drives
    C SN810 SDCPNRY-512G-1006
    Browser
    Edge, Firefox
    Antivirus
    Defender
Assuming you simply wish to close the currently focussed Window (is that correct?)
Yes, that's correct... close the window and close the app.

Dalchina, I'm sure that using AutoHotkey is probably the smartest way to do it—but unfortunately, I really don't know anything about it, and it doesn't seem all that intuitive to me either (I downloaded Autohotkey and tried it for about 20min but...)

Still, thank you so much!
 
Last edited:

My Computer

System One

  • OS
    Windows 11 Pro (v25H2)
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad T14s
    CPU
    AMD Ryzen 7 PRO 5850U
    Memory
    32 GB
    Graphics Card(s)
    AMD Radeon 1008 MB
    Hard Drives
    1TB SSD
Create New shortcut with taskkill command
Code:
taskkill /im WinStore.App.exe /f
You can add multiple commands to .bat file
Code:
taskkill /im brave.exe /f
taskkill /im chrome.exe /f
taskkill /im msedge.exe /f
taskkill /im msedgewebview2.exe /f
But if the app runs as admin, you need to create it as an elevated shortcut.
 

My Computer

System One

  • OS
    Home26H2Can
    Computer type
    PC/Desktop
    CPU
    AMD Ryzen 5 8600G (07/24)
    Motherboard
    ASROCK B650M-HDV/M.2 (07/24) BIOS 4.21 AGESA ComboAM5 1.3.0.1 (04/26)
    Memory
    2x32GB Kingston FURY DDR5 5600 MHz CL36 @5200 CL36 (07/24)
    Graphics Card(s)
    ASROCK Radeon RX 6600 Challenger D 8G @48FPS (08/24)
    Sound Card
    Creative Sound BlasterX AE-5 Plus (05/24)
    Monitor(s) Displays
    24" Philips 24M1N3200ZS/00 (05/24)
    Screen Resolution
    1920×1080@165Hz via DP1.4
    Hard Drives
    Kingston KC3000 NVMe 2TB (05/24)
    ADATA XPG GAMMIX S11 Pro 512GB (07/19)
    PSU
    Seasonic Core GM 550 Gold (04/24)
    Case
    Fractal Design Define 7 Mini with 3x Noctua NF-P14s/12@555rpm (04/24)
    Cooling
    Noctua NH-U12S with Noctua NF-P12 (04/24)
    Keyboard
    HP Pavilion Wired Keyboard 300 (07/24) + Rabalux 76017 Parker (01/24)
    Mouse
    Logitech M330 Silent Plus (01/26)
    Internet Speed
    500/100 Mbps via RouterOS (05/21) & TCP Optimizer
    Browser
    Edge, Brave for YouTube, LibreWolf for FB
    Antivirus
    NextDNS blocking 1/3 Traffic
    Other Info
    Phone: Motorola Moto G86 (02/26)
    Backup: Hasleo Backup Suite (PreOS)
    Headphones: Sennheiser RS170 (09/10)
    Chair: Huzaro Force 4.4 Grey Mesh (05/24)
    Notifier: Xiaomi Mi Band 9 Milanese (10/24)
    FlexCore USB-C 3.2 Gen 1 (M) to LAN (F) (08/25)
Sorry, double-post.
See @Brink's tutorial in post #2, Option Three:
 
Last edited:

My Computer

System One

  • OS
    Windows 11 Pro 23H2, OS build: 22631.6199
    Computer type
    Laptop
Create New shortcut with taskkill command
Thank you so much for the tip! For the moment, alt+f4 or fn+alt+f4 is working just fine for me...
 

My Computer

System One

  • OS
    Windows 11 Pro (v25H2)
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad T14s
    CPU
    AMD Ryzen 7 PRO 5850U
    Memory
    32 GB
    Graphics Card(s)
    AMD Radeon 1008 MB
    Hard Drives
    1TB SSD
To close an app or close a whole group of apps if grouping is enabled on the taskbar (see the "Disable grouping on the taskbar" mod below) via middle-click and still be able to open a new instance via Shift + middle-click:
As stated in the mod description, you can assign a modifier key (Ctrl or Alt or both) to be able to force-terminate (kill) an app, or apps. Similar to running the taskkill command with the /f option, force‑terminating a Windows GUI process is never clean. This isn't just about losing your unsaved work. It's also about a list of other potential risks:
  • Unreleased kernel handles
  • Zombie processes
  • Zombie threads
  • Corrupted COM apartments
  • Broken shared memory segments
  • GPU context leaks
  • File corruption
  • Registry corruption
  • Broken IPC channels
  • Stuck mutexes and locks
  • Shell integration breakage
  • DWM composition leaks
  • Unreleased audio/video devices
  • Unreleased network sockets
So, you need to be careful with this. When in doubt, refrain from force-terminating your app excepting only after the app "hangs" (but also remember that an app that is no longer responding may become responsive again if you give it patience).

That being said, with this mod you can also middle-click on any thumbmail in the task switcher view. (It's the view that appears while holding down Alt + Tab or after pressing Ctrl + Alt + Tab.) On keyboard layouts that have an Alt Gr key, pressing Alt Gr + Tab is equivalent to pressing Ctrl + Alt + Tab. If you use this keyboard shortcut instead of normal Alt + Tab you will notice that the task switcher view stays open so you can use keyboard to navigate between the thumbnails. Enter or Spacebar activates the selected window, Del closes it. Esc closes the task switcher view. This is all standard task switcher view behavior in Windows.

As a bonus, you can customize the task switcher by using ExplorerPatcher's "Simple Window Switcher" optional feature. I use it, it allows me to see more thumbnails by adjusting the layout size/dimensions as well as by using its two extra keyboard shortcuts Alt + key above Tab and Alt Gr + key above Tab. These extra shortcuts filter out thumbnails that don't belong to the same group as the active window so they can definitely help to speed up your workflow further when you're dealing with a lot of open apps.

To disable grouping on the taskbar or set up your own custom groups:

To tame the labels on the Windows 11 taskbar:
 

My Computers

System One System Two

  • OS
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Asus TUF Gaming F16 (2024)
    CPU
    i7 13650HX
    Memory
    16GB DDR5
    Graphics Card(s)
    GeForce RTX 4060 Mobile
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    512GB SSD internal
    37TB external
    PSU
    Li-ion
    Cooling
    2× Arc Flow Fans, 4× exhaust vents, 5× heatpipes
    Keyboard
    Logitech K800
    Mouse
    Logitech G402
    Internet Speed
    30Mbit/s up, 500Mbit/s down
    Browser
    FF
    Antivirus
    What's an antivirus?
  • Operating System
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Medion S15450
    CPU
    i5 1135G7
    Memory
    16GB DDR4
    Graphics card(s)
    Intel Iris Xe
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    2TB SSD internal
    37TB external
    PSU
    Li-ion
    Keyboard
    Logitech K800
    Mouse
    Logitech G402
    Internet Speed
    30Mbit/s up, 500Mbit/s down
    Browser
    FF
You can close all windows using a tiny 3rd party app called "closeall " though. It's my understanding it is now a paid app since it's developer sold it to NtWind.
I use AlomWare Toolbox to close all my windows, using its built-in hotkey of Shift+Ctrl+Alt+Del (but you can change this to anything). Works better than CloseAll because after sending the close signal, any remaining stubborn windows get terminated instead. So you're guaranteed to have all windows truly closed and none left hanging open with something like "Are you sure?".
 

My Computer

System One

  • OS
    Windows 11 Pro
ALT + Spacebar, then C
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2 26200.8524
    Computer type
    Laptop
    Manufacturer/Model
    Acemagic LX15PRO
    CPU
    AMD Ryzen 7 5825U with Radeon Graphics
    Memory
    16GB
    Screen Resolution
    1920 x 1080
    Hard Drives
    SSD 2TB
    Internet Speed
    30 Mbps
    Browser
    Brave
    Antivirus
    Webroot Secure Anywhere
    Other Info
    System 3

    Acer Swift SF114-34 laptop
    OS Windows 11 Pro 26200.8524
    CPU Pentium Silver N6000
    RAM 4GB
    SSD Samsung 970 EVO Plus SSD 2TB (an upgrade)
  • Operating System
    Windows 11 Pro 23H2 22631.2506
    Computer type
    Laptop
    Manufacturer/Model
    HP Mini 210-1090NR PC (bought in late 2009!)
    CPU
    Atom N450 1.66GHz
    Memory
    2GB
    Browser
    Brave
    Antivirus
    Webroot
you can also lock/unlock fn key

try fn + ESC to unlock/lock it

then you can use Alt + F4 again

for volume and other stuff press fn+ FKEYS



or you can use autohotkey

You can use both Alt+F4 and CTRL+Q
recommend to use that script as an administrator.


Code:
; Press Alt + F4 to close the active window
!F4::
{
    WinClose("A")
}

; Press Ctrl + Q to close the active window
^Q::
{
    WinClose("A")
}
 

My Computer

System One

  • OS
    Windows 11 25H2 Home Single Language (26200.8037)
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO IdeaPad 5 15ITL05
    CPU
    Intel Core i3-1115G4
    Motherboard
    There is no such a God, I only know mother-Earth
    Memory
    8GB
    Graphics Card(s)
    on-board
    Sound Card
    on-board
    Monitor(s) Displays
    (s) is too ambitious for me
    Screen Resolution
    1920*1080
    Hard Drives
    256GB (SSD)
    PSU
    I was very young when I last saw a PSU
    Case
    ...
    Cooling
    My coldness is enough to cool the computer
    Keyboard
    A broken and very clean keyboard
    Mouse
    Rat
    Internet Speed
    Slowest internet connection in Europe
    Browser
    ChromePortable / FirefoxPortable / TorBrowser
    Antivirus
    G-Virus
    Other Info
    I can simply say that I took the red pill and I am not happy with it.
I am fortunate enough to have a keyboard with assignable macro keys (Logitech G815) so I made a "kill switch" and it works great. I couldn't do the same on my laptop, though. I just remapped the F12 key with Powertoys and it works. F12 wasn't that important.
 

My Computer

System One

  • OS
    Win 11 Pro 25H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Self build
    CPU
    Intel i7 13700KF
    Motherboard
    Gigabyte Z790 UD AC
    Memory
    32 GB Team Group DDR5 - 6000 CL 30
    Graphics Card(s)
    ASUS TUF GAMING RTX 3070 Ti
    Sound Card
    On board Realtek
    Monitor(s) Displays
    ACER 34 inch
    Screen Resolution
    4K
    Hard Drives
    1 TB Samsung 980 Pro Nvme, 1 TB Samsung 970 EVO Nvme, 2 x Samsung 970 2TB SSD SATA
    PSU
    EVGA 1000Q
    Case
    Rosewill something or other
    Cooling
    Noctua NH-D15. A whole schwak of Noctua case fans. $$$
    Keyboard
    Logitech G815
    Mouse
    Logitech G502 Hero
    Internet Speed
    700 up, 600 down
    Browser
    Firefox
    Antivirus
    MalwareBytes
Back
Top Bottom