geekhack

geekhack Community => Input Devices => Topic started by: dotancohen on Fri, 24 June 2022, 02:29:19

Title: Linux script to program USB macro keyboard
Post by: dotancohen on Fri, 24 June 2022, 02:29:19
I'm thinking about purchasing one of these USB macro keyboards:
https://www.aliexpress.com/item/1005004181797652.html

Apparently the device will work with Linux, but it needs Windows to run the program to configure the macros. I tried downloading the software to see if it will run in Wine, but the download is not available anyway.

Does anyone have any idea how device this could be programed in Linux? I use Ubuntu (actually Kubuntu) but could boot into e.g. Fedora if needed. Thanks.
Title: Re: Linux script to program USB macro keyboard
Post by: hvontres on Fri, 24 June 2022, 02:42:40
Honestly, hard to say. The item description does not give any clues to what controller is used. Also, without the windows software it is really hard to tell how this board is programmed.

Possible solutions I can think of, asuming you can somehow get a hold of the Windows software:

It would be risky, but then again, we are talking about a $25 macropad, so it would not be a signifficant investment. I noticed there is a second model that shows up from different vendors that claims to ship the software with the pad. Maybe that might work better.
Title: Re: Linux script to program USB macro keyboard
Post by: dotancohen on Sun, 26 June 2022, 07:34:36
Thanks, I had not considered sniffing the USB traffic. Though if the software - assuming it can be acquired - will run under Wine that is fine enough for me. I don't expect to run it very often.
Title: Re: Linux script to program USB macro keyboard
Post by: mathisart on Wed, 14 June 2023, 02:57:13
You could try messing with evdev and ioctl's and it might work, although I don't know if that's how you're supposed to do it. I tried doing it once and it was hard because of the lack of documentation, but also fun.
At a higher level, you can also try programming it at the X11/Xorg level (also with little documentation, though not as hard as evdev).
I don't think these would affect the device itself, though; they'd be programs running on the host computer.

NB: this is just my understanding; it might be wrong.
Title: Re: Linux script to program USB macro keyboard
Post by: Leslieann on Wed, 14 June 2023, 14:01:24
As hvontres said, these are similar to many others, and probably nearly all are made by the same factory, as such, the software between them may be interchangeable. This may help you find someone who already dealt with it. Some of that software may also be easier to get running with WINE. Beware though, a lot of the software for these boards come through multiple channels and a ton of them are infected with malware and that malware will likely run on WINE too.