Screen Tablet malarky => Tutorials and useful knowledge => Topic started by: DaBotz on April 27, 2016, 03:59:11 PM

Title: HIDMacros + Daemon
Post by: DaBotz on April 27, 2016, 03:59:11 PM
HIDMacros is a small program that assigns macros to buttons - and mouse vents -   depending on the device HID id.

It has its limits - mainly, he can't switch gears depending on the Windows you are working on.

To juggle around it, I have built a small (big, nowadays) Java "Daemon" that keeps a repository of configuration files (with backups and the possibility of defining forks for specific uses).

It has been a lot of work - sheesh.

Anyway, if you like "Single button" shortcuts, the combination can be useful.

HIDMacros was written in TurboDelphi, and its author (Petr Medek) has decided to drop it, as TurboDelphi has been reverted to commercial software (from freeware that it was).

It has switched to a new project, called "LuaMacros", that has no graphic user interface to speak of and does not handle some inputs like midi instruments (oh, well) and mouses (what?  damn).

I have made my stupid Daemon as simple as possible, and learned what I could from it, but I think that this is the end of the line. 

I posted a last version of it  in a Dropbox folder, (

, along with a "turn-key" zip with a clean instance of HIDMacros.

In the long run, if I have time, I will probably build a "Universal HID-devices Handler", that does what HIDMacros do but a bit smarter - (for example, it can already see open windows... it is the first part that I did). 

I also placed a Zip with the project, but you may need to link a copy of the daemon jar

An explicative video: (

Anyway, beware... it can become addictive...


Title: Re: HIDMacros + Daemon
Post by: bernard on May 13, 2016, 02:24:42 AM
Cool stuff! Why do you say it is the end of line?

And what a setup!! Comics reader included.

Title: Re: HIDMacros + Daemon
Post by: DaBotz on May 15, 2016, 12:43:15 AM
The original author of HIDmacros has dropped it... and I have grown weary handling the things from "outside", with the "switch away" of the config files, and killing and relaunching HM.

It works, but it adds some non-banal elements of time-lag.

For example, you can "declare" "variants" on a set of shortcuts - for example, when I draw colors I prefer to have "Alt" - pick color - instead. And it works fine, apart when you have to set them up... I automatized it a bit, so that the creation is handled by the daemon directly, instead of relying on you saving the modified version with the "variant call" active. 

I have started working to reimplement HIDmacros in Java, trying to make it more flexible (for example, I miss the possibility of declaring arbitrary buttons,  as  "Ctrl - Alt - Shifts" that can be held down and left up after a while - as some Linux programs allow to do... had it been there, I'd have a "Shift" on my numeric pad, instead of having to go )

But I fear it would not be so fast, performance-wise... on the other hand, I also fear being swallowed by C, if I reinstall Visual Studio (and the result would be Windows-only, too... I suck at software engineering).

If I go on the Java Road, I will try to leave the door open for others to add OS specific interfaces (right now, I have only a Windows PC) through system specific plugins...

Alas, it is a lot of programming near or beyond my usual level of skill.

And, if I program, I do not draw - the two sets of gears, in my mind, need a bit of time for the set-up change.

However... I have made a couple of changes since this post, as I was fed with the auxiliary windows closing on me so often.

So, I replaced the jar in the "all in" Zip.