Add setting to disable URL/email specific layout - #2626
Draft
MiMoHo wants to merge 2 commits into
Draft
Conversation
When typing in a URL field the comma key becomes "/" and in an email field it becomes "@" (the variation_selector in functional_keys.json). This is intentional, but some users prefer a keyboard whose base layout never changes; currently the only way to keep the comma in these fields is a custom functional-keys layout (see HeliBorg#1573, HeliBorg#734). Add an "Adapt layout for URL and email fields" preference (default on, i.e. unchanged behaviour). When disabled, getKeyboardMode() returns TEXT for URI/email input types, so the normal layout and popups are used everywhere. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
MiMoHo
force-pushed
the
url-email-layout-toggle
branch
from
July 8, 2026 00:22
b7450b8 to
5726200
Compare
New resource strings only, per the CONTRIBUTING exception. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a preference "Adapt layout for URL and email fields" (default on, i.e. current behaviour). When turned off,
getKeyboardMode()returnsTEXTfor URI and email input types, so the base layout and popups stay identical to a normal text field: the comma key stays a comma (no/or@swap), and no TLD popups are shown.The whole change is a single gate in
KeyboardLayoutSet.getKeyboardMode():plus the pref plumbing (
Settings/Defaults/SettingsValues) and oneSwitchPreferencein the Preferences screen, next to "Show TLD popup keys".Why
In URL fields the comma key becomes
/and in email fields@(thevariation_selectorinfunctional_keys.json). This is intentional and can already be reverted with a custom functional-keys layout, as pointed out in #1573 and #734.However, some users specifically want a keyboard whose base layout never shifts depending on the field — muscle memory for the comma position being the main reason — and building a full custom functional-keys layout is a fairly heavy step for "please don't move my comma". This offers a one-switch opt-out for that preference, without changing anything for everyone else.
Notes / open questions
variation_selectorinstead.:app:compileDebugSources).Refs #1573, #734.