Return to the base layout when closing a numpad/D-pad overlay - #2693
Return to the base layout when closing a numpad/D-pad overlay#2693MiMoHo wants to merge 1 commit into
Conversation
Numpad and D-pad are sibling overlays; switching directly between them pushed the current one onto the previous-layout stack, so closing the newly shown overlay returned to the OTHER overlay instead of the layout they were opened over (usually the alphabet). Switch directly without stacking for a deliberate (non-sliding) numpad<->dpad change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Interesting take. I can see why it might be unexpected when switching with the toolbar keys, but I don't see any other semantic reason to view them as sisters. I haven't tested this patch, but I wonder how it would affect what happens when you slide from numpad into symbols and release on D-pad or vice versa. The code seems fine, I just wonder if it should be more specifically generalized around whether the layout was toggled with a toolbar key. More toolbar keys for layout switching could be added in the future. To do this you'd probably have to add some state flag "previousLayoutSwitchWasToolbarKey", which seems cumbersome and easy to lose track of when logic is changed or added. Remember that regardless of the layout stack status, it will always be cleared and return to alpha when the ABC key is pressed, which is available in the default numpad and D-pad layouts. |
Numpad and D-pad are sibling overlays. Switching directly between them pushed the current one onto the previous-layout stack, so closing the newly shown overlay returned to the other overlay instead of the layout they were opened over. Now a deliberate numpad↔dpad switch replaces without stacking, so closing returns to the base (usually the alphabet). Sliding/chording paths unchanged.