Is there a dedicated windows keyboard shortcut for the "Invert Selection" command?

  • Not a keyboard shortcut, but you can hold Ctrl and select all files with your mouse. Dec 17, 2019 at 9:40

3 Answers 3


Windows 8 + 10:

Alt+H for Home tab in the ribbon, then S and I for Invert Selection.

enter image description here

Windows 7:

Alt+E to open up the Edit menu, then I for Invert Selection.

enter image description here

  • I want to know why MS had to make it a 2 character keyboard shortcut? There aren't THAT many options on the home ribbon tab that we can't have "I" or something. Alt-H-I ???
    – Ads
    Jan 24, 2016 at 23:22
  • 1
    Seven years later, this is still inacceptable. Windows 10 gave us 1-click invert Selection, but Windows 11 took it away, then Windows 11 22H2 took it away again, and they still can't give us a keyboard shortcut for it!
    – Medinoc
    May 25, 2023 at 17:44

An alternative method, which is what I use, is to add a registry entry for your shell right click menu. Therefore, when you select a file or folder(s), all you need to do is right click them and go to select > invert selection.

Add the following to a txt file, and then rename it to .reg

Windows Registry Editor Version 5.00




This can expanded upon if you want, by adding more options to the subcommands, but that is entirely up to you.


Using AutoHotKey (AHK v1) -

#If WinActive("ahk_class CabinetWClass")

^i::                      ; Ctrl + I
MouseMove 750, 150        ; see Note 1
Send {Click}              ; click on "see more" option
WinWait, PopupHost ahk_class Microsoft.UI.Content.PopupWindowSiteBridge ahk_exe explorer.exe,, 1 ; 1s
If ErrorLevel             ; if "see more" fails to open in 1 second
    Return                ; do nothing further
; Sleep 500                 ; alternative to WinWait ; see Note 2
Send {Up 3}               ; select "Invert selection" option
; Send {Enter}            ; see Note 3
Return                    ; The end

; Note 1: location of "see more" option on screen
; MouseMove - move the mouse cursor to x,y coordinates on 'Screen'
; use Window Spy to determine coordinates for your own screen(s)
; might want to change "CoordMode" if you have problems, visit 
; help page: https://www.autohotkey.com/docs/v1/lib/CoordMode.htm

; Note 2: wait 500ms for window to respond to keys
; wait times (in milliseconds) don't work sometimes,
; try changing them to see what is sufficient for your PC spec/performance.
; Sometimes it doesn't work at all on the 1st try
; (ex: when a new explorer instance is first opened after login/restart)
; but works on subsequent attempts. *shrug* no idea why.

; Note 3: uncomment this line after test of previous steps
; or leave it as is if you prefer to do this step manually,
; especially if you notice inconsistent selection of options.

  • For ribbon UI enabled File Explorer (in older Win 11 and 7/8/8.1/10 systems) -
; Source: https://www.autohotkey.com/boards/viewtopic.php?f=76&t=27564
#If WinActive("ahk_class CabinetWClass")

^i::                      ; Ctrl + I
ControlGet, hCtl, Hwnd,, SHELLDLL_DefView1, A
PostMessage, 0x111, 28706, 0,, % "ahk_id " hCtl ; edit, invert selection


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .