Librekontrol is a programmable controller editor for GNU/Linux. You use Librekontrol to (re-)define the events that occur when you interact with a controller: keyboards, gamepads, music controllers, etc.
Music controllers are a primary focus of Librekontrol (it began life as a controller editor for Native Instruments devices like the Maschine). As such, it also provides access to hardware features defined through ALSA (Advanced Linux Sound Architecture), typically LEDs on the device. Librekontrol can also create software MIDI ports through ALSA for any configured controller.
Librekontrol is configurable and fully programmable in Guile. This means that the sky is the limit with what you can do with Librekontrol: conveniently map the buttons on your device to keyboard shortcuts configured in a program, compose complex keyboard macros, or use your gamepad as a MIDI controller. There are good hacks to be hacked.