Author Topic: Linux script to program USB macro keyboard  (Read 36729 times)

0 Members and 1 Guest are viewing this topic.

Offline dotancohen

  • Thread Starter
  • Posts: 140
    • Dotan Cohen
Linux script to program USB macro keyboard
« 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.

Offline hvontres

  • Posts: 185
  • Location: Oceanside, CA
  • Buckling Spring Enthusiast - Full Size Evangelist
Re: Linux script to program USB macro keyboard
« Reply #1 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:
  • See if the software will run under wine and live with that
  • Run the software under wine and use Wireshark to capture the USB traffic and try to reverse engineer the protocol used
  • Port QMK / Via / Vial or one of the other open source firmwares to work with the micro on this board. This would require the board to use a supported processor and the ability to completely re-flash the firmware and not just update the keystrokes
  • Replace the controller on the board with a pro-micro or something similar that already supports QMK and friends and flash your own firmware.

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.
« Last Edit: Fri, 24 June 2022, 03:16:58 by hvontres »
Henry von Tresckow

               
1986 Model M 1390131, 1987 Model M 1391401 , 1993 Model M2 Modded Reddragon k556(Test Mule) Boston Prototype x2 (Daily Drivers :) )

Offline dotancohen

  • Thread Starter
  • Posts: 140
    • Dotan Cohen
Re: Linux script to program USB macro keyboard
« Reply #2 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.

Offline mathisart

  • Posts: 26
Re: Linux script to program USB macro keyboard
« Reply #3 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.

Offline Leslieann

  • * Elevated Elder
  • Posts: 4518
Re: Linux script to program USB macro keyboard
« Reply #4 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.
Novelkeys NK65AE w/62g Zilents/39g springs
More
62g Zilents/lubed/Novelkeys 39g springs, HK Gaming Thick PBT caps, Netdot Gen10 magnetic cable, pic
| Filco MJ2 L.E. Vortex Case, Jailhouse Blues, heavily customized
More
Vortex case squared up/blasted finish removed/custom feet/paint/winkey blockoff plate, HID Liberator, stainless steel universal plate, 3d printed adapters, Type C, Netdot Gen10 magnetic cable, foam sound dampened, HK Gaming Thick PBT caps (o-ringed), Cherry Jailhouse Blues w/lubed/clipped Cherry light springs, 40g actuation
| GMMK TKL
More
w/ Kailh Purple Pros/lubed/Novelkeys 39g springs, HK Gaming Thick PBT caps, Netdot Gen10 Magnetic cable
| PF65 3d printed 65% w/LCD and hot swap
More
Box Jades, Interchangeable trim, mini lcd, QMK, underglow, HK Gaming Thick PBT caps, O-rings, Netdot Gen10 magnetic cable, in progress link
| Magicforce 68
More
MF68 pcb, Outemu Blues, in progress
| YMDK75 Jail Housed Gateron Blues
More
J-spacers, YMDK Thick PBT, O-rings, SIP sockets
| KBT Race S L.E.
More
Ergo Clears, custom WASD caps
| Das Pro
More
Costar model with browns
| GH60
More
Cherry Blacks, custom 3d printed case
| Logitech Illumininated | IBM Model M (x2)
Definitive Omron Guide. | 3d printed Keyboard FAQ/Discussion