How do I set up a hotkey or shortcut to rotate my screen in Windows?

With my graphics card, this approach works:

  1. Download Display (website is down as of 2020-10-11, mirrors here and here).

  2. Extract the Display.exe to a location of your choice (e.g., C:\Display.exe).

  3. Use the [right-click] -> New -> Shortcut dialogue to create shortcuts for the desired orientations:

     C:\Display.exe /rotate:0
     C:\Display.exe /rotate:90
     C:\Display.exe /rotate:180
     C:\Display.exe /rotate:270
    
  4. (optional) In each shortcut's properties, you can specify a Shortcut Key.


If some people are still using this thread or searching for this at google, I have the PERFECT SOLUTION.

  1. Download Display

  2. Extract to C:\Display\ (or a folder of your choice)

  3. Open cmd, and write in the path to display.exe - C:\Display\display.exe\ -listdevices (this will show you all of your screens, letting you choose which one to rotate)

  4. Choose which device (screen) you would like to rotate by their index number.

  5. Create a .bat file using notepad. (Open notepad, write the lines shown below, save as "all files" and write ".bat" after name of your choice)

  6. Write C:\display\display.exe -device (number of your device) -rotate 90 /toggle

  7. If the "90 (degrees)" is the wrong screen rotation, just change it to "180" or "270".

  8. You should be done now, and you may edit the shortcut or/and add it to your Taskbar by creating a new Toolbar.

->The nice thing about this way, is that you only need one shortcut and not multiple-<


For me a simple CTRL+ALT+ARROW KEY worked just fine. Way simpler than the script, downloading display.exe and etc.


Someone wrote a script on the AutoHotKey forums that does just this. But I haven't tried it myself.

He made it so that pressing the Windows key + a numpad key will rotate it:

  • Win + 4 : Rotates screen to Portrait
  • Win + 2 : Rotates screen to Landscape ( flipped )
  • Win + 6 : Rotates screen to Portrait ( flipped )
  • Win + 8 : Rotates screen to Landscape

Here's the script:

#SingleInstance Force
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.

#Numpad8:: ; Landscape Mode - WinLogo + Number pad 8
IfWinExist, Screen Resolution
{
    WinActivate, Screen Resolution
}
else
{
    run "desk.cpl"
}   
WinWait, Screen Resolution
if ErrorLevel
{
   MsgBox, WinWait timed out.
   return
}
Send, {Tab}
sleep 500

send, {Alt Down}
send, {o}
send, {Alt Up}

sleep 500
send, {Up} ; Send Up 4 times to make sure we are at the start of the dropdown
send, {Up}
send, {Up}
send, {Up}
sleep 500
send, {Alt Down}
send, {a}
send, {Alt Up}
WinWait, Display Settings
if ErrorLevel
{
   MsgBox, WinWait timed out for display settings.
   return
}
send, {Alt Down}
send, {k}
send, {Alt Up}
WinWait, Screen Resolution
if ErrorLevel
{
   MsgBox, WinWait timed out.
   return
}
send, {Alt Down}
send, {F4}
send, {Alt Up}
return

#Numpad4:: ; Portrait Mode - WinLogo + Number pad 4
IfWinExist, Screen Resolution
{
    WinActivate, Screen Resolution
}
else
{
    run "desk.cpl"
}   
WinWait, Screen Resolution
if ErrorLevel
{
   MsgBox, WinWait timed out.
   return
}
Send, {Tab}
sleep 500

send, {Alt Down}
send, {o}
send, {Alt Up}
;return
sleep 500
send, {Up} ; Send Up 4 times to make sure we are at the start of the dropdown
send, {Up}
send, {Up}
send, {Up}
send, {Down}
sleep 500
send, {Alt Down}
send, {a}
send, {Alt Up}
WinWait, Display Settings
if ErrorLevel
{
   MsgBox, WinWait timed out for display settings.
   return
}
send, {Alt Down}
send, {k}
send, {Alt Up}
WinWait, Screen Resolution
if ErrorLevel
{
   MsgBox, WinWait timed out.
   return
}
send, {Alt Down}
send, {F4}
send, {Alt Up}
return



#Numpad6:: ; Portrait Mode (Flipped) - WinLogo + Number pad 6
IfWinExist, Screen Resolution
{
    WinActivate, Screen Resolution
}
else
{
    run "desk.cpl"
}   
WinWait, Screen Resolution
if ErrorLevel
{
   MsgBox, WinWait timed out.
   return
}
Send, {Tab}
sleep 500

send, {Alt Down}
send, {o}
send, {Alt Up}

sleep 500
send, {Down} ; Send Up 4 times to make sure we are at the end of the dropdown
send, {Down}
send, {Down}
send, {Down}
sleep 500
send, {Alt Down}
send, {a}
send, {Alt Up}
WinWait, Display Settings
if ErrorLevel
{
   MsgBox, WinWait timed out for display settings.
   return
}
send, {Alt Down}
send, {k}
send, {Alt Up}
WinWait, Screen Resolution
if ErrorLevel
{
   MsgBox, WinWait timed out.
   return
}
send, {Alt Down}
send, {F4}
send, {Alt Up}
return

#Numpad2:: ; Landscape Mode (Flipped) - WinLogo + Number pad 2
IfWinExist, Screen Resolution
{
    WinActivate, Screen Resolution
}
else
{
    run "desk.cpl"
}   
WinWait, Screen Resolution
if ErrorLevel
{
   MsgBox, WinWait timed out.
   return
}
Send, {Tab}
sleep 500

send, {Alt Down}
send, {o}
send, {Alt Up}

sleep 500
send, {Up} ; Send Up 4 times to make sure we are at the start of the dropdown
send, {Up}
send, {Up}
send, {Up}
send, {Down}
send, {Down}

sleep 500
send, {Alt Down}
send, {a}
send, {Alt Up}
WinWait, Display Settings
if ErrorLevel
{
   MsgBox, WinWait timed out for display settings.
   return
}
send, {Alt Down}
send, {k}
send, {Alt Up}
WinWait, Screen Resolution
if ErrorLevel
{
   MsgBox, WinWait timed out.
   return
}
send, {Alt Down}
send, {F4}
send, {Alt Up}
return