Windows 10 change display scaling via hotkey
Ok, so I couldn't find shortcut key because there is no such thing
however, since I need to develop stuff that should be supported in multiple resolutions I've found the quickest way to do that.
- First, you need to extract the scales registry, run
regedit
and gotoHKEY_CURRENT_USER\Control Panel\Desktop\PerMonitorSettings
do that when the scales setting are set to 100%, let's save the 100% settings into a file namedto100.reg
since there are different registry key per machine you have to export the registry for the machine you work on - I can't give you my files because it will not work.
Do that for all relevant scales - I've stored the 100%, 125%, 150%, 175% (on my windows 10 the DpiValue is 0 for 100%, 1 for 125% etc...)
create this batch (logoutToResolution.bat) file in the same folder of the .reg files:
@echo off CHOICE /C ABCD /N /T 10 /D A /M "Log out to resolution: A:100%%, B:125%%, C:150%%, D:175%%" IF ERRORLEVEL 1 SET RESOLUTION_FILE=to100.reg IF ERRORLEVEL 2 SET RESOLUTION_FILE=to125.reg IF ERRORLEVEL 3 SET RESOLUTION_FILE=to150.reg IF ERRORLEVEL 4 SET RESOLUTION_FILE=to175.reg REGEDIT.EXE /S "%~dp0%RESOLUTION_FILE%" shutdown -l
Now, when running this batch file you need to choose A for 100%, B for 125% etc... after choosing the registry will get updated and windows will log out automatically.
you can create a different batch for every reg file if you want.
the logout is a must because if you don't log out the UI will be drawn differently than it should.