Rework the different device detection support routines to make future enhancements easier.

Add unit tests for these.
Undouble space
Allow the device decoder to return nil's by having a value of 'nil'.
Initial multiple selection support.

Wrap the add a value modulo n + 1 functionality into a utility routine.
Clean up the ok/cancel dialog to use standard infrastructure.
When getting a key, turn off all of the existing callbacks to prevent them interfering.
Extra LDoc
Add an optional argument to getKey to allow existing call backs to remain functional with the proviso that they might override and conflict with the getKey ones.
Add more LDoc
Add a deep copy routine for saving data structures.
All keeping call back saves to be safe from later modifications.
Forbid access to key group's callback table.
Sort the return from getSelected.

Check for nil in isSelected.
LDoc the deep copy function better.
Modify the deep copy routine so it properly handles self referencial and recursive data structures.
FIx logic problem with the keep handlers processing.
LDoc for the keygroups so that they are included in the LDoc output.  Also moved these immediately after the keys LDoc.
Add an arrow group that includes up, down, okay and cancel buttons.

Rearrange the LDoc for the key groups.
Use the arrow group for selection lists.
Shuffle the code so it works again