Button assignment updates, unit test.

- Button range offsets are now calculated automatically from the
range deltas.