Control Scheme Generator

Two programs to generate a Java control scheme with a graphical editor


CTLedit

Run CTLedit

(I recommend running it in the editor; it's just a little less finnicky)

You have to access it through the link above. You can't search for it on Snap!.

A graphical controls editor written in Snap!. Instructions are included with it. Use the "Export" option, right-click on the lists and hit "export", then take those files to the next program:




CTL2Java

Shown here are 2 excerpts from a generated control scheme.

CTL2Java on GitHub

A Python program that takes JSON files from CTLedit and creates a Control scheme.

You will need a Python interpreter to run this. I run straight IDEA rather than Android Studio, so I can install the Python plugin and run it right alongside our Java code. But that plugin seems finnicky in Studio.

You can look at the command-line options for ctl2java.py, or you can run gui.py to get the simplest little GUI that me and Google's AI Overview could throw together in a few minutes.




Newsletter Write-Up

For years, we have had customized control schemes for our different drivers, but it has always involved writing about a hundred lines of Java code. Now, a graphical editor lets the drivers design the controls themselves. The program will automatically generate the Java file from that.

The system supports a number of advanced features that would be tedious to create manually. It supports an unlimited number of modifier buttons. A button can be converted into an axis, an axis can be converted into a button, and two axes can be merged into one. These various features can be combined in powerful ways, and all the code for it is generated automatically.

With this new system, drivers can explore the editor to see what features are available. They might find ideas that they would never have thought possible, and they can design the controls that are just right for them without needing a programmer to guide them through it.