
Changing Monitor Display Input with a Keyboard Shortcut Key
I work on both Windows and Mac using Synergy by Symless to share my keyboard and mouse with the Mac, but I use the same screen for both switching the inputs as needed.
Something that has been rather irksome is needing to use my Monitors remote to switch display inputs and it is not straightforward to do so either.
The shortcut keys on the remote don’t actually remember the display input, I switch between HDMI 3 and Display Port 1 many times throughout a normal work day.
Sure I thought about getting a USB IR Blaster/recorder and simulating the button presses. But after doing a firmware update and trying the Asus Display Widget program I noticed that it could switch the inputs.
There were shortcut keys for the other gimmicky things sure, but no luck to change my input source!
How does this work?
I frantically googled harder knowing that a Software Solution was possible.
Enter DDI/DCII VCP codes. Turns out there is a lot of these, the one I needed was 0x60 Input Select
But what values do I put in? It’s not going to be as simple as 1,2,3,4 and it looks like Asus Rog did not use the same values anyway.
Also how do I talk with it from code? Turns out there were many python packages, linux/mac and Win32 API for it from Microsoft.
https://docs.microsoft.com/en-us/windows/win32/api/lowlevelmonitorconfigurationapi/
I settled on a Node.js module that already wrapped Win32’s API for now.
https://github.com/hensm/node-ddcci
I used an interval in NodeJS to log out the values the monitor held, and changed the display input using the remote, hoping it would be the last time I have to use it.
I found the following
15 = Display Port 1
16 = Display Port 2
83 = HDMI 3
Weird, but okay, I had what I needed.
Now to make it work on Windows from a shortcut key. I tried a few global key hook modules for node.js but none of them really worked at all on my Windows computer…
Turns out this was actually pretty easy, since old times you can make a desktop shortcut and add a Shortcut Key in the properties. I never look at the desktop anyway so the extra clutter was no problem.
Getting it to work on the Mac however was another story.
Firstly, Synergy eats the keyboard shortcut and passes it through to the other device, so Windows would not pick it up.
Simple right, just run the same script on the Mac and use Automator to run it?
Well the library I had found for NodeJs for the ddicpp does not work on Mac, it wraps Windows API methods.
Simple work-around for now, set up a basic http server and when a GET request for /toggle comes in, switch the value.
Automator shortcut keys still don’t work in Every App despite it being set up as a service and allowed through Accessibility which is rather annoying. If anyone knows a fix for this I’de be happy to learn about it.
But now I can switch from Display Port 1 to HDMI 3 and back way easier and quicker.
For now the script is only really useful to me in its current state, would be nice to make a proper cross platform application out of it I think.
Monitor Review
The above video is not mine, but one that encouraged me to purchase this beast of a monitor.
Easy Peasy
Now I just press Ctrl+Alt+1 and switch between my display inputs. Great stuff.
- Usability
- Durability
- Speed
Hardware manufacturers
This really should be easier, your remotes/OSD screens need to have better functionality to make this kind of usage simple.
4/5
How would I rate this monitor?
Well its glitching out on me, I probably have a bad unit haven’t had it longer than a year?
Over-all however it’s very nice. The Game Crosshair overlay and Sniper features are kinda meh. But I’m more interested in the screen size and having room for several code windows, ides, web browser, chat client all open at once.
Related Articles
ClickUp – One app to replace them all
Click Up is a great tool.I'll write more about this soon.
No Results Found
The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.
No Results Found
The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.
Recent Comments