Automatically using different keymaps for different OS

I use different keymaps on linux and windows. I’d love for my UHK to automatically pick the right keymap on startup. Is there a way to accomplish this?

I’d assume the UHK itself can’t detect what OS is running on the system it’s connected to, since it should not know or care! But there could be a way to use a script to switch the keymap from the host OS? This would probably require agent like functionality…

At least two ways:

If you can detect that UHK connected in your OS, you can then hook one of those things to change the keymap.


I chose the first way (trigger macro command via USB) since it doesn’t have additional dependencies like Node.js. It works perfectly.

Thanks for the super fast answer!

1 Like
  1. USB: What would be the equivalent for windows / osx?
  2. Can’t agent expose that in the compiled binary?
  3. How can we prevent a host from being able to run anything? The malware barrier here is quite low.

No idea. But I guess the appropriate term to google is “how to send usb hid message via command line in windows”.

I believe the scripts are packed in the Agent binary and it suffices to decompress the AppImage. If you wish some more direct way, feel free to open a ticket in the agent repository.

I guess you can’t at the moment. As far as my security knowledge goes, when the attacker knows how to run arbitrary code on your machine, you are already screwed.

Also, I don’t see much risk from macros. A bigger problem is that the attacker can flash a custom firmware onto the UHK from your home computer, and then attack your work computer when you carry your UHK over. will deal with that.

1 Like