X-Plane 10 allowed you to assign commands to buttons, just like X-Plane 11 does. Data refs can be accessed via Data Ref Editor or controlled via plugin. The full list of commands that you can assign to buttons or keys is located in Resources > Plugins > commands.txt.