I could always create a keyboard macro to do it quickly using a program like AutoHotKey. I think I will try that since every solution I am finding to change scaling requires me to restart, re-login, or kill explorer.exe (which has unwanted side effects). At least a keyboard macro can be assigned to a hotkey and I won't have to mess with the registry. Thanks for confirming there wasn't an easy fix
- - - Updated - - -
I wrote a script that works perfectly for me using
AutoHotKey. It is fast, accomplishing the change in about 1.5 to 2 seconds. I added comments all throughout the script to explain what it is doing. If you wish to use it follow the following instructions below:
What Does It Do?
When the user presses the Scroll Lock key:
- 1. It opens the Display Settings window
- 2. Reads HKEY_CURRENT_USER\Control Panel\Desktop\PerMonitorSettings\Your_Monitor_Entry_Folder\ to determine whether scaling is set to 100% or 125%.
- 3. Presses TAB three times to reach the drop down list for Scaling.
- 4. Based on what the current scaling value is, it will either press Up or Down to change the setting up by one increment.
- 5. It closes the Display Settings window.
Install Instructions
- 1. Install AutoHotKey
- 2. Copy the script text into a text file and save it (i.e. DPI Scaling Toggle.txt).
- 3. Change the extension from .txt to .ahk
- 4. Make sure your current Scaling DPi is set to 100% or 125% in Display Settings.
- 5. Double-click DPI Scaling Toggle.ahk to start the script. It will stay running until you restart the system. The Scroll Lock key will toggle between 100% and 125%.
- 6. Setting the script to run at System Start is easy by creating a new STRING value in HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run in the registry. The value should be set to the location of DPI Scaling Toggle.ahk on your system. For example: "C:\AutoHotKey Scripts\DPI Scaling Toggle.ahk".
Customizing The Script
Unfortunately you won't be able to simply copy and paste this script because the registry value it reads for your monitor will be unique to your monitor. You will need to open RegEdit, go to
HKEY_CURRENT_USER\Control Panel\Desktop\PerMonitorSettings\ and copy the name of the folder that resides there. For my ASUS ProArt PA278QV the name of the folder there is
AUS2701L9LMQS154928_26_07E4_78^BD9975B7A47E0467CAE6FE0D0FE09A4A. Copy the folder name for your monitor, and swap my monitor name on Line 19 with your own.
You can change the key you wish to toggle on Line 10. If you aren't sure what value to use for the key you desire, you can check this
List of Keys. In most cases you can simply swap
ScrollLock for the exact key you wish to bind it to.
You may wish to use Scaling other than 100% and 125%. Customizing it will involve changing how many times the Down and Up keys are pressed if you wish to change values more than one increment in either directly (i.e. between 100% and 200% or 125% and 175%). You will find those on Lines 17 and 22 respectively. It will also involve changing the value the registry is looking for on lines 15 and 20. If you would like any help please don't hesitate to ask.
DPI Scaling Toggle Script
Code:
#Persistent ; Script continually runs
#SingleInstance force ; If script is run a second time, it restart the instance already running
DetectHiddenWindows, On
;Allows you to hide the CMD window. If you won't be hiding your CMD window, then no need to add this line.
SetRegView 64
;Sets the registry view used by RegRead, allowing it in a 32-bit script to access the 64-bit registry view and vice versa.
ScrollLock:: ; the toggle key
RunWait, %ComSpec% /c %windir%\System32\DpiScaling.exe ; launch Settings -> Display
RegRead, CurrentDPI, HKEY_CURRENT_USER\Control Panel\Desktop\PerMonitorSettings\AUS2701L9LMQS154928_26_07E4_78^BD9975B7A47E0467CAE6FE0D0FE09A4A, DpiValue ; Determine the current scaling setting.
Sleep, 750 ; Time to wait in milliseconds for the Display Settings window to appear
if CurrentDPI = 0 ; Setting of 100%
{
Send, {Tab 3}{Down}!{F4} ; Tab key is pressed three times, then Down Arrow, and then close the Display Settings window
Return
}
else if CurrentDPI = 1 ; Setting of 125%
{
Send, {Tab 3}{Up}!{F4} ; Tab key is pressed three times, then Up Arrow, and then close the Display Settings window
Return
}
else
{
MsgBox, "Current Scaling DPI is neither 100`% nor 125`%. The current value is %CurrentDPI%."" ; 100% = 0, 125% = 1, 150% = 2, 175% = 3, 200% = 4, 225% = 6, and so on.
Return
}