DI2 button (D-Fly) access

Is it possible to write a custom app/action that can be assigned to a ConnectIQ app and map that to a specific DI2 button event?