Hacking Macropad Side Quest
Before AI finally takes our jobs, we still have time to burn tokens on something important, like small personal technical nonsense. Today’s nonsense is a two-button macropad from Temu.

I ordered a Hanlin Yue Free 2 mini keyboard. It has two buttons, and the product description promised macros, key assignments, swipes, and volume control. Basically, a tiny remote for minor automation.
The problem started exactly where it usually starts: in the native configuration app. It turned out to be such a beautiful specimen of disposable software that after the first few seconds you start staring into the abyss. And the abyss stares back through a broken UI.
I wanted to know whether I could configure the macropad without that app. Because the app itself, I suspect, is beyond help.
So I bought a cheap two-button keyboard and, along with it, an excuse to write a CLI utility and control exactly which keys get written to the device.

My personal use case was very mundane: make a button type a predefined sequence of keystrokes. For example, a long password or some other string that is annoying to type by hand every time.
Important disclaimer right away: I would not store a corporate password on a device like this, and I would not recommend it to anyone. It is a bad idea. Passwords are better kept in a password manager, in your head, or, if you are doing it truly old-school, in a paper notebook.

But as a technical experiment, why not.
Humble reverse engineering
The native app turned out to be an Electron app. Inside was an obfuscated JavaScript bundle and the faint feeling that someone really wanted to close a Jira ticket as fast as possible.
With the help of agents, AI tools, and ordinary human stubbornness, I partially reverse-engineered the app for this macro keyboard.
The task was simple to describe: understand how the app talks to the device and how it writes key assignments into it. The execution was less pleasant and not so quick as people usually advertize on LinkedIn.
Over the course of a day, the agent picked apart the app, pulled out the relevant chunks of logic, tested hypotheses, and asked me to try its utility on the physical device. I pressed buttons, watched the result, and slowly turned into a lab bench with a USB port.
Then things started to line up.
Technical and other limitations
Right now, the macropad can be programmed to send predefined keystrokes when a button is pressed.
The result is almost working. With one caveat: the device has strict limits on how many events can be written to it. And it doesn’t seem the number and order of events might be optimized anyhow.
After a lot of experiments, I found that one button press can store roughly 19-20 events. A key press, a key release, and a delay are all separate events.
Even a simple string quickly becomes a small accounting exercise. If you alternate presses, releases, and pauses, you can fit something around five lowercase characters. Uppercase is even tighter: about four characters, because you need to hold Shift.
In the end, I got a small console utility for configuring the device without the native app.
Changing the general approach
I did not go down the path of building my own device on a microcontroller board. Without a 3D printer, making something finished and reasonably neat would be hard. And for a one-off device, that becomes a separate hobby inside the hobby. You really have to love hardware to go there for the sake of two buttons.
Still, the approach itself feels interesting.
You can take a ready-made gadget and negotiate with it until it behaves, by hacking it a little, adapting the software to your needs, or disconnecting it from some proprietary cloud.
After all these “agent this and agent that”, it felt like we were supposed to become too lazy for understand details. Here, AI worked in an unexpectedly pleasant way: it lowered the entry barrier for a small weird project I probably would never have reached otherwise.
But the nicest part of this story turned out to be something else.
It is just that now curiosity survives long enough to reach a result a little more often.