Guides

How to switch a monitor's input source with a keyboard shortcut

If one monitor is shared by a work PC and a personal laptop, you probably press the small buttons on its bezel several times a day to change inputs. Dell Display and Peripheral Manager did this from the keyboard, but only for Dell monitors. WindowLayout now sends the same standard DDC/CI command to HP, LG, Dell and most other monitors, so one key press moves a monitor from HDMI to DisplayPort or USB-C. This guide shows how to read the current input, save favorites, bind a hotkey and avoid being left with a black screen.

Updated 6 steps

  1. Make sure the monitor accepts DDC/CI

    Open the monitor's on-screen menu and check that DDC/CI is switched on; it is usually under System, Others or Setup. Then open WindowLayout, choose Input source in the sidebar and press Read current input for the monitor you want to control. If it shows something like HDMI 1, the monitor answers. If it says No answer, try another cable or port, connect the monitor directly instead of through a dock or KVM switch, and check the menu setting again. The Diagnostics page also shows, for every monitor, whether its input can be read over DDC/CI.

  2. Pick an input and send it

    Choose a target in the Switch to list and press Switch. WindowLayout asks you to confirm, because the monitor changes input at once: if nothing is connected to that input, or it belongs to another computer, this PC's picture on that monitor goes dark. The monitor never confirms the change, so WindowLayout can only tell you that the command was sent. Press Find supported inputs to ask the monitor which inputs it lists; this can take a few seconds.

  3. Use the codes your monitor really has

    Standard names exist for VGA, DVI, DisplayPort 1 and 2 and HDMI 1 and 2. USB-C and anything vendor specific use codes that differ from maker to maker, so they appear as Code 0x1B, Code 0xD0 and so on. If a name does not match your port, choose Other code and type a number from 1 to 255, in decimal such as 27 or in hex such as 0x1B. Some LG monitors, for example, use 0xD0 for one of their ports, but this is not standardized: switch the monitor to the port you want, press Read current input, and the number appears.

  4. Save favorites and give them hotkeys

    With an input selected, press Save as favorite and name it, for example Laptop or Gaming PC. Each favorite belongs to one monitor. Click the key button next to a favorite and press the combination you want, such as Ctrl+Alt+F9. WindowLayout warns you at once if another program or one of its own hotkeys already uses it. Nothing switches until you press that key or run the favorite yourself, and a monitor rests for 2 seconds between switches, so a double press cannot flip it straight back.

  5. Know how to get back

    Every switch remembers the input the monitor showed before. If the picture disappears, use Switch back on the Input source page, or the button on the notice that appears after a switch. If the screen is already dark, press the monitor's own input button, or use WindowLayout on the other computer to send the monitor back. Keeping a favorite for each computer on each monitor is the easiest way to move in both directions.

  6. Automate with triggers and the command line

    On the Triggers page, add a rule with the action Switch monitor input and choose a favorite, for example when a monitor connects or an app starts. From a script, Stream Deck or Task Scheduler, run WindowLayout.exe --input hdmi1 --monitor 2. The value can be a favorite's name, hdmi1, hdmi2, dp1, dp2, dvi1, vga1 or a code such as 0x11, and --monitor is always required. The phone remote cannot switch inputs, on purpose: a wrong tap could blank the screen you are controlling from.

Frequently asked questions

Does it work with HP, LG and Dell monitors?

It uses the standard VESA DDC/CI command for input select, VCP code 0x60, which HP, LG, Dell and most other monitors support. Support still depends on the monitor, its menu setting and the connection, because some docks, adapters and KVM switches block DDC/CI. The Input source and Diagnostics pages tell you whether your monitor answers.

Why did my screen go black after switching?

The monitor moved to an input with no signal, or to a computer that is not showing this PC. Use Switch back, the monitor's input button or the favorite on the other computer. WindowLayout cannot read the result back, because a monitor stops answering a PC once it leaves it, so it reports that the command was sent.

Can I switch every monitor at once?

Each favorite and each command-line call targets one monitor. Create a favorite for every monitor, then give each its own key or add one trigger rule for each. A monitor can be switched once every 2 seconds. Nothing runs at startup unless you created a favorite and a rule for it.

Try it on your own desk

WindowLayout is free, about 3 MB, works offline and has no ads or telemetry. Save your first window layout in under a minute.

Go to download