Repository navigation
tactus 0.1.0: an on-screen keyboard that corrects words as they are typed, opt-in beside squeekboard - #888
tactus 0.1.0: an on-screen keyboard that corrects words as they are typed, opt-in beside squeekboard#888W4HO-ham wants to merge 2 commits into
Conversation
6a22fc7 to
28a328a
Compare
|
Thank you. This is a lot of careful work, and the write-up is the kind I wish every PR had: what it does, what it doesn't, what ran where and what didn't. I read the typing engine and the autocorrection in full ( It can't merge as it is, and most of why is mine to decide rather than yours to fix. Please let me come back on these:
What I'd ask you to change:
Two smaller things for the README's limits: an application that declares no purpose for its field (a GPUI editor or terminal) gets corrections like any chat field, and the lock screen's password field is untried, which matters more than the others on that list. On the version: #886, #887, #890 and #204 also say omamobile-shell 0.2.134. This one will merge last of them, so the shell part takes whatever is free then; I'll give you the number when it's ready. |
28a328a to
b461489
Compare
|
Thank you for reading it this closely. Done, as two pull requests now:
The look: Tactus now takes its colours from the applied theme's The README also has the two limits you named.
On publishing, the look and the licence line: understood, and I'll wait for you. |
…yped, opt-in beside squeekboard squeekboard types what is tapped and nothing else. Tactus is a second keyboard an owner may install beside it: it corrects a word when it is ended (by where each tap landed in its key, how common the word is and the usual slips), puts back what was typed on a Backspace right after, starts sentences with a capital, makes a full stop of two spaces, offers a letter's accented forms on a long press, and has an emoji page with a search. English only, and opt-in: no image installs it, nothing depends on it, and squeekboard stays the phone's keyboard until the owner picks Tactus. It draws itself in the applied Omarchy theme's colours, and takes a new theme's at once; without a theme, or where the owner keeps them, it has light and dark colours of its own. packages/tactus builds it from Stevia 0.59.0 (GPL-3.0-or-later): six patches to Stevia's files, each with its reason in its header and the files' upstream notices kept, and Tactus's own sources (the typing engine, the autocorrection, the drawing) with the checks that run with no window. Everything is installed under /usr/lib/tactus with the binary named tactus, so it sits beside squeekboard, which Arch's stevia package conflicts with. Stevia's own word completion is off by a settings default compiled into the package's own schemas. The word counts are hermitdave's FrequencyWords (CC-BY-SA-4.0), fetched at the first commit whose README gives that licence (the file is the same since it was added). Choosing it takes the shell part, omamobile-osk and Setup > Keyboard, which is its own pull request (derekross#896). The typing engine's trace and its debug lines name letter counts, never what was typed. In Chromium the keyboard has to answer the text field. Chromium (156, text-input-v3) sends new state only once the last done's serial equals its count of commits, and Hyprland sends a text field done only when the keyboard commits something, so its surrounding text is one key behind and a delete_surrounding_text sent then is dropped: the corrected word lands after the wrong one. Tactus sends an empty input-method commit after a field's first sign of life and after every report with text, and a key that would take text away waits up to a quarter of a second for the field to show what was sent before it. The typing engine's test has a browser-like field, answered and unanswered. The panel's top corners are round, and what shows past them is the application in front, not the wallpaper: the keyboard reserves a little less room than its panel is high (8 px on a screen 360 wide), so the window reaches that far under the panel's top, and the corners are cut no deeper. A taller page takes its room only once it is on the screen and a lower one gives it back at once, so the wallpaper doesn't show between the window and the keyboard while the page changes. Tested: packages/tactus builds with makepkg in the project's Arch Linux ARM build image, check() included (typing 126 checks, the word list, the keys 80 with the theme's colours, the fallback and the owner's choice of Tactus's own, the emoji page 28, and a run with the trace and the debug lines on that holds nothing typed); test/all with --upstream applies the patches to the untouched Stevia 0.59.0 with no fuzz. On a Pixel 9a the package was installed, chosen in Setup > Keyboard by touch, changed to squeekboard and back, and started by itself after each reboot; it typed and corrected in a GTK 3 text view, in Chromium 156 (a text area, an editable block, a one-line field) and in a GPUI application, in light and in dark, and with the keyboard up no wallpaper showed past the corners or while the page changed. The theme colours ran off screen only so far.
b461489 to
9f82793
Compare
derekross
left a comment
There was a problem hiding this comment.
Thank you for turning this round so quickly, and for doing all of it. I checked each point on the new head:
- The split is clean: this branch now touches only
packages/tactus/and its two pictures. - Patch 0005 keeps the Phosh Developers', Guido Günther's and the GTK lines, and no patch removes a notice any more.
- The word list: I downloaded the file and the README at 34bb6447. The README says CC-by-sa-4.0 and the file's sha256 is the one the PKGBUILD pins.
COPYINGis byte for byte Stevia's, the README has its SPDX line, and your twelve files have their copyright line.- The debug lines print letter counts.
- Your six patches still apply to the untouched Stevia 0.59.0 with no fuzz (I downloaded it again; its sum matches too).
- The colours: I read the new part of
tactus-draw.cin full. It reads the applied theme'scolors.toml, falls back to its own palettes, and followstheme.generation. That is what I asked for. I'd like to see it on the palmtop before calling it done, so the run you mention is welcome, with a freshletters.png(the one in the branch still shows the old greys) and one picture after a theme change.
Nothing more is needed from you on the code. What is left is mine, as I said last time: whether and how the project's repository carries the package, and the line in CONTRIBUTING for GPL-3.0 sources. One thing I'll have to arrange if I take it: as the tree stands, the nightly would build and publish any new package folder, so tactus would go on the "built only when named" list first. I'll come back to you on both.
Two small things for the next push, no hurry: the README says "a pull request of its own (#896)", which reads oddly once both are merged (name omamobile-osk instead), and the PKGBUILD's "omamobile-shell 0.2.134 and later" will follow whatever number #896 lands with.
|
The decision I owed you: yes in principle. Tactus goes into the project's repository as an opt-in package, with the current keyboard staying the default, and CONTRIBUTING gets its line for GPL-3.0 packages (#910). One condition before I merge it: I try it on my own Pixel 7 Pro first. I'm travelling with the phone today, so that comes after I'm back. When it merges, Order stays as I said: #896 first (after its test fix and my run), then this. |
…ead of a pull request From the review of derekross#888. letters.png now shows the keyboard as the palmtop draws it in Omarchy's Tokyo Night theme, and theme-light.png the same keyboard a moment after omarchy-theme-set catppuccin-latte, beside the README's words on the colours. The README names omamobile-shell's omamobile-osk (and its fallback to squeekboard) rather than the pull request it comes in, and the PKGBUILD's comment no longer carries a version number for it.
|
Thank you for the decision. The pictures are in 559a1d3, taken on my palmtop this evening with the package built from 9f82793 installed:
Both are cropped to the keyboard. The two small things are in the same commit: the README names Understood on the order and on |
squeekboard types what is tapped and nothing else. Tactus is a second keyboard an owner may install beside it. It corrects words as they are typed, the way the keyboards on current phones do. It is opt-in: no image installs it, nothing depends on it, and squeekboard stays the phone's keyboard until the owner picks Tactus in Setup > Keyboard.
The sentence in the picture was typed as "im typing on Tactus. teh keyboard fixes slips as you go, and dont worry about capitals", with Shift pressed once, for the T of Tactus.
What it does:
It draws itself in the applied Omarchy theme's colours, as squeekboard is styled: the panel in the theme's darker background, the keys in its lighter one, the letters in its foreground, the caret in its accent. When Omarchy applies another theme it takes the new colours at once (it watches
theme.generation). Without a theme it has light and dark colours of its own, and an owner who prefers those can keep them (~/.config/tactus/own-colours).What it doesn't do: it is English only (another language's layout types without corrections, and I haven't tried one on a phone), it has no row of suggestions, no Paste key and no globe. A field that declares no purpose gets corrections like a chat field, and the lock screen's password field is untried. The README lists the rest.
How it is put together:
packages/tactusbuilds from Stevia 0.59.0 (GPL-3.0-or-later,COPYINGbeside it): six patches to Stevia's files, each with its reason in its header and the files' upstream notices kept, plus Tactus's own sources (the typing engine, the autocorrection, the drawing) and their checks, each with its copyright line. It installs under/usr/lib/tactuswith the binary namedtactus, so it sits beside squeekboard; Arch'ssteviapackage conflicts with squeekboard. Stevia's own word completion is off by a settings default in the package's own schemas. The word counts are hermitdave's FrequencyWords (CC-BY-SA-4.0), fetched at the first commit whose README gives that licence; the file is the same since it was added.omamobile-osk, the start line, the drop-in, Setup > Keyboard andphone.lua's lists.Two things worth knowing.
Chromium. With text-input-v3 it sends new state only once the last
done's serial equals its count of commits, and Hyprland sends a text fielddoneonly when the keyboard commits something. Left alone, Chromium's surrounding text is one key behind, and since it takes text away counting from the cursor it last told of, a correction sent then deletes nothing and the right word lands after the wrong one. So Tactus answers the text field: an empty input-method commit after a field's first sign of life and after every report with text, and a key that would take text away waits up to a quarter of a second for the field to show what was sent before it. GTK applies nothing on an emptydoneand sends nothing back. The typing engine's test has a browser-like field, answered and unanswered.The room it reserves. The panel's top corners are round, and what shows past them should be the application in front, not the wallpaper. So the keyboard reserves a little less room than its panel is high (8 px on a screen 360 wide), the window reaches that far under the panel's top, and the corners are cut no deeper. The cost is that this much of a window's lower edge is behind the keyboard. A taller page (the emoji) takes its room only once it is on the screen, and a lower one gives it back at once, so the wallpaper doesn't show between the window and the keyboard while the page changes.
Tested:
packages/tactusbuilds with makepkg in the project's Arch Linux ARM build image,check()included: the typing engine against make-believe text fields (126 checks), the word list, the keys (80, with the theme's colours, the fallback and the owner's choice of Tactus's own) and the emoji page (28) off screen, and a run with the trace and the debug lines on that holds nothing typed.test/all --upstreamapplies the patches to the untouched Stevia 0.59.0 with no fuzz.7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty): the package installed, chosen in Setup > Keyboard by touch, changed to squeekboard and back, and started by itself after each reboot. It typed and corrected in a GTK 3 text view, in Chromium 156 (a text area, an editable block, a one-line field: slips corrected, two spaces, Backspace, an emoji) and in a GPUI application, in light and in dark. With the keyboard up the compositor kept 259 px for a panel 267 px high, and no wallpaper showed past the corners or while the page changed from letters to emoji. It has been my keyboard since 2026-11-17.tests/packagesfails in omamobile-omarchy on my laptop with and without this change (qmlformat on two of the installed Omarchy's files), nothing else.Not tested: the theme's colours on a phone (off screen only so far; I'll post a picture from my 9a tonight), other languages' layouts, Qt applications, the lock screen's password field, a phone on its side, and any phone but the 9a.
Your call, not decided here:
tools/build-packagesbuilds it by default, like any package directory. It is a C build of 136 compile steps: under half a minute natively on an arm64 build machine, and I haven't timed it under qemu-user. If that is too slow for the daily run it could join the packages built only when named.The shell part's version is set in #896.