pioneerspacesim/pioneer — pull request #3085 by johnbartholomew (2014-07-26 12:35:37+00:00)
Title: Fix key bindings to allow them to be properly cleared

Fixes #3083.

This fixes three problems:

* Engine.SetKeyBinding did not accept a nil value to clear an axis binding, and the captureAxisDialog code (in ui/Settings.lua) also failed when the axis binding was cleared.
* The underlying AxisBinding struct did not provide any way of representing a disabled binding.
* Disabled bindings were not saved properly, so if you cleared a binding then when you quit and restarted Pioneer, that action would revert to its default binding.

I'll make a separate pull request to add UI for resetting actions to their default bindings, but that may take longer because I'd like to clean up the code a bit when I do that.