Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Works with M32Q #11

Open
diskree opened this issue Sep 8, 2024 · 0 comments
Open

Works with M32Q #11

diskree opened this issue Sep 8, 2024 · 0 comments

Comments

@diskree
Copy link

diskree commented Sep 8, 2024

I was skeptical but decided to try and it worked on my M32Q. Thanks a lot!

Also, I created a Python script based on source code of this utility to control the KVM switch. It uses the hid library to send commands to the monitor, allowing for quick and easy switching of KVM inputs. I've set up identical scripts for both macOS and Windows, and configured hotkeys to switch between devices seamlessly without needing to use the monitor's physical buttons.

import hid
import struct

buf = [0] * 193
buf[1:3], buf[7:12] = [0x40, 0xc6], [0x20, 0, 0x6e, 0, 0x80]
msg = struct.pack(">HBB", 0xe069, 0, 1)
buf[65:65+3] = [0x51, 0x81 + len(msg), 0x03]
buf[68:68+len(msg)] = msg

try:
    d = hid.device()
    d.open(0x0bda, 0x1100)
    d.write(buf)
    print("KVM switched successfully.")
except Exception as e:
    print(f"Error switching KVM: {e}")
finally:
    d.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant