到戴尔官网下载驱动 https://www.dell.com/support/home/en-us/drivers/driversdetails?driverid=6wgwy

下载autohotkey https://www.autohotkey.com/

新建脚本

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

^F11::
    Run, "C:\Program Files (x86)\Dell\Dell Display Manager\ddm.exe" /1:SetActiveInput DP1
Return

^F12::
    Run, "C:\Program Files (x86)\Dell\Dell Display Manager\ddm.exe" /1:SetActiveInput HDMI
Return

当你有两个显示器的时候,把后面参数1替换成2就可以了

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

^F9::
    Run, "C:\Program Files (x86)\Dell\Dell Display Manager\ddm.exe" /1:SetActiveInput DP1
Return

^F10::
    Run, "C:\Program Files (x86)\Dell\Dell Display Manager\ddm.exe" /1:SetActiveInput HDMI
Return

^F11::
    Run, "C:\Program Files (x86)\Dell\Dell Display Manager\ddm.exe" /2:SetActiveInput DP1
Return

^F12::
    Run, "C:\Program Files (x86)\Dell\Dell Display Manager\ddm.exe" /2:SetActiveInput HDMI
Return

开机启动 把脚本放到下面位置 Win7

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp

Win10

C:\Users\{{username}}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

参考:http://liubonan.com/2017/09/03/kuai-su-qie-huan-dellxian-shi-qi-shu-ru-yuan/