[profile system] Shared modes across buttons and bindings

JohnHind’s device-button proposal is a useful example of something the current bindings can’t quite express:

The idea is to let a profile define named modes that several bindings can share. For example, Pointer, Orbit, and Pan & Zoom:

  • Left rear always selects Pointer, including doing nothing if already there.
  • Right rear selects Orbit from Pointer, then alternates between Orbit and Pan & Zoom.
  • The modes stay active after releasing the buttons.
  • Left front can snap rotation to an axis while in Orbit.

A binding could set a particular mode, cycle through selected modes, or apply only while a given mode is active. Each mode would provide the appropriate ball behavior and axis mapping, with an explicit default mode.