Can I make keymaps contextual?

New UHK owner here, is it possible to set a keymap for a certain application? I’m a gamer and wanna set up my keymap to change depending on which application I am currently using. Is this possible?

Not at the moment. I believe there is a long-term plan to add some “Adaptive mode” to Agent, which will also require Agent to be kept running in the background.

Not out of box. But if you are determined, it is possible to send a macro command or a keymap switch command over usb to the UHK, so with a bit of scripting, you should be able to achieve that.

1 Like

I’d suggest maybe making a keymap per game as a workaround. Looks like pretty much the same effort.

Got a link for how to send the keymap switch command over usb or how to run code other than the stock macro commands on the keyboard itself?

See firmware/doc-dev/user-guide.md at master · UltimateHackingKeyboard/firmware · GitHub . Other scripts are in the same path too. You can also try to decompress the appimage toget to them.

You can find full command reference at firmware/doc-dev/reference-manual.md at master · UltimateHackingKeyboard/firmware · GitHub .

As to other custom code running on the firmware, you sure can modify the c code of uhk. You will find building instructions at GitHub - UltimateHackingKeyboard/firmware: Ultimate Hacking Keyboard firmware .If you describe what you want to do with it, I will either give you some pointers, or recommend better way using the mcro engine.

I wanna find a way to modify the code to run the same code that AHK uses to detect windows on the keyboard itself so I can do the keymap swap on the keyboard itself.

Well, I dont think it is possible to do that on the keyboard. I believe you will need the window detection to take place on the side of the host OS.

1 Like