Linux input expert Peter Hutterer at Red Hat has shared an upcoming feature of libinput 1.4: mode switching support for graphics tablet (e.g. Wacom tablets) for switching through different behavior depending upon button presses.
Peter described the mode switching in the context of graphics tablets, “The important terms here are ‘mode’ and ‘mode group’.