-
Notifications
You must be signed in to change notification settings - Fork 39
Home
Welcome to the micropython-micro-gui wiki!
I would welcome any comments on the following idea.
It would be possible to reduce the number of buttons to three (or one encoder with a push action switch). In either case, 3 GPIO lines. However it would make the interface more "modal" and introduce a problem described below so I rejected it.
In the encoder case it would work like this. Turning the encoder would move the focus between widgets. Pressing it would operate the control if appropriate (Button or Checkbox type widgets). For more complex widgets the control would become "selected" which might be indicated by a red border. Turning the encoder would then adjust the control, move between items on a dropdown, or scroll text as at present. Pressing the encoder again would deselect it, committing the change, and returning the widget to the "focussed" state. On floating point widgets a long press would work as at present, invoking "precision" mode which would be cancelled by a short press as currently.
The pushbutton case would be similar, with the next and previous buttons acting like the current increment and decrement buttons if the control is "selected".
Drawbacks: it adds a new "selected" state. It removes the current option whereby you can quit a dropdown or listbox without making a change. Currently this can be done by moving the focus off the control. Under the 3-button paradigm you can't move the focus without deselecting the control, an action which must commit the change (otherwise how can the change be committed?).