Last week I started making the new controller type; KeyboardController. It is already recognized by Mixxx as a legit Controller and listed under Controllers in the Mixxx preferences window. It is not functional yet, though.
KeyboardController
This class subclasses Controller, which it implements all the pure virtual methods from. It's mostly boilerplate code yet. Just enough to make it compile.
Using as EventFilter?
I also started migrating all the methods and fields from KeyboardEventFilter to KeyboardController, with the idea that we could use it as event filter on all the widgets that have currently the KeyboardEventFilter installed on. It turns out though that we couldn't use the KeyboardController as event filter, because it lives in another thread. We could make it thread-save, but that could make Mixxx seem unresponsive.
The new approach is to let the KeyboardEventFilter live, but let it emit signals of what key sequence was pressed instead of setting controls directly. That will be done by the KeyboardController.
KeyboardEnumerator
Every controller type needs a enumerator. This ControllerEnumerator handles discovery and enumeration of controllers. For instance, the MidiController lists all connected MIDI devices, and the HidController does that with HID devices. Since we only support one keyboard, the KeyboardEnumerator returns a list with just one KeyboardController. If we are ever going to support multiple keyboards, this list could be larger.
KeyboardControllerPreset
The KeyboardControllerPreset subclasses ControllerPreset and implements all its pure virtual methods. Just like KeyboardController, this class consists entirely of boilerplate code. It was needed to be able to implement KeyboardController::visit(KeyboardControllerPreset *) : void, which I BTW also implemented in HidController MidiController and BulkController.