Repository navigation
Conversation
…witching add NAME appends NAME to org.gnome.desktop.input-sources sources when it isn't there and leaves the first entry (the current layout) alone; set moves NAME to the front, which switches the keyboard. An empty list becomes us, NAME, so squeekboard's fallback stays in the list (set keeps it too, as the second entry), and a listed name writes nothing. The Settings Keyboard page (derekross#892, part a) uses it so the on-screen keyboard's list is only ever added to, with one writer. Signed-off-by: Lef <me@lefteros.com>
derekross
approved these changes
Nov 24, 2026
derekross
left a comment
Owner
There was a problem hiding this comment.
Thank you, Lef. This is exactly the small, separate piece I asked for: add leaves the first entry alone, writes nothing when the layout is already there, and keeps squeekboard's fallback in an empty list, and the dispatcher change leaves set and remove as they were. I ran your tests and removed each of the three new rules in turn; each removal fails the case it should, so the tests really hold them.
I'll set the version when I merge (0.2.144 if nothing takes it first), and I'll leave "(#892 b)" out of the commit title, since (b) in our split is the bar label in #949; this one is the add verb from question 5. Nothing calls it until #1022, so it can go in now, and #1022 rebases onto main after it.
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.
This is (b) from #892: the
addverb foromamobile-keyboard-languages, as its own small shell PR so it can go in before the Settings Keyboard page (a).omamobile-keyboard-languages add NAMEappends NAME toorg.gnome.desktop.input-sourcessourceswhen it isn't there and leaves the first entry alone, so the on-screen keyboard doesn't switch.setmoves NAME to the front, which does switch it. A name that's already listed writes nothing. With an empty list it writesus, NAME, so squeekboard's fallback stays in the list (setkeeps it too, as the second entry);add uson an empty list writes nothing.The page in (a) will call this for each new layout squeekboard has a file for, never remove, so there's one writer for that list.
Tests: new
addcases intest/keyboard-languages.sh(append, already there, empty list,uson empty, no name, option-like name). The package'stest/allandtests/grep-q-pipespass in the Arch CI container as uid 1000, andtools/pr-checkis clean.docs/KEYBOARD-LAYOUTS.mdand the README row mentionadd, and I updated the doc's line refs to the script to match.Not run on the phone yet (so "doesn't switch" is from the code and the tests, not a look at the keyboard), it's off charging. Version left for you.