Guido Günther

Guido Günther

Phone Developer
Guido Günther

Latest posts by Guido Günther (see all)

I make lots of typos so I need computers to correct those for me as much as possible. That especially showed when leaving my laptop at home more only picking the up the Librem 5. Longer texts would just end in a catastrophe.

That needed to change and hence I added completion support to an alternative on screen keyboard for Phosh (which powers the Librem 5, Liberty Phone, and Librem 11 tablet as shown in the videos):

The above uses a spell checker (hunspell) so it helps to correct words but does not necessarily “predict” them. However since the system allows for multiple completers we have some more:

  • A pipe based completer that allows you to use any command to provide completions. This can e.g. be used for swipe input. demo
  • A (very experimental) presage based completer that uses the surrounding text to suggest words
  • A fzf based completer that uses fuzzy matching on a provided word list
  • A varnam based completer that allows you to type Indic languages demo

Other features include:

  • character popovers on long press to reduce the amount of layer and language switching necessary.
  • a emoji widget (pretty much based on what GTK does):
  • cursor movement via long press on space

Q & A

But what about Squeekboard?

I implemented the completion code as well as other features like the Emoji widget in a library like fashion so the Squeekboard maintainers can pull them in when they feel like it. This gives us a simple way to experiment with different features without risking any stability.

Can I try that too

Sure it’s easy. If you want to try this on your Librem 11 or Librem 5 you first have to install the alternative on screen keyboard. As this came out from a debugging tool it’s somewhat oddly named phosh-osk-stub.

sudo apt install phosh-osk-stub

Afterwards you switch the default OSK:

# update-alternatives --config Phosh-OSK
There are 2 choices for the alternative Phosh-OSK (providing /usr/share/applications/sm.puri.OSK0.desktop).

  Selection    Path                                                     Priority   Status
------------------------------------------------------------
* 0            /usr/share/applications/sm.puri.Squeekboard.desktop       50        auto mode
  1            /usr/share/applications/sm.puri.Squeekboard.desktop       50        manual mode
  2            /usr/share/phosh-osk-stub/sm.puri.Phosh.OskStub.desktop   30        manual mode

In the above select 2. You can go back to the default squeekboard at any time by invoking the same command and selection 1.

Note that phosh-osk-stub is still considered experimental so make sure you have e.g. a USB Keyboard, jumpdrive or SSH access to recover in case anything goes wrong. After you made the above changes log out of your session and back in for them to take effect.

How do I turn on completion

Go to phosh-mobile-settings, select the OSK panel and enable ‘opportunistic completion’. This will enable completion whenever the application indicates that completion makes sense. The other option “Toggle via OSK menu” allows you to enable and disable the completion menu via the “world menu” in the OSK itself.

Note that if you use the hunspell completer you want to install the corresponding hunspell dictionaries for your language. The en-us one is installed by default.

How can I help

When you think that completion would be useful but the application doesn’t seem to send a hint to enable it you can file a bug or send a patch to fix that. This is often a very simple change. See e.g. this patch for gedit.

What if I want to do yet another OSK?

No problem. Have a look at Phosh’s OSK interface

Purism Products and Availability Chart

 ModelStatusLead Time 
USB Security Token Purism Librem KeyLibrem Key

(Made in USA)
In Stock
($59+)
10 business days
Librem 5In Stock
($699+)
3GB/32GB
10 business days
Librem 5 COMSEC BundleIn Stock
($1299+)
Qty 2; 3GB/32GB
10 business days
Purism Liberty Phone with Made in USA ElectronicsLiberty Phone
(Made in USA Electronics)
Backorder
($1,999+)
4GB/128GB
Estimated fulfillment early November
Librem 5 + SIMple
(3 GB Data)
In Stock
($99/mo)
10 business days
Librem 5 + SIMple Plus
(5 GB Data)
In Stock
($129/mo)
10 business days
Librem 5 + AweSIM
(Unlimited Data)
In Stock
($169/mo)
10 business days
Librem 11In Stock
($999+)
8GB/1TB
10 business days
Most Secure Laptop Purism Librem 14Librem 14Backorder
($1,370+)
Estimated fulfillment date pending
Most Secure PC Purism Librem Mini
Librem MiniBackorder
($799+)
Estimated fulfillment November
Most Secure Server Purism Librem ServersLibrem ServerIn Stock
($2,999+)
45 business days
The current product and shipping chart of Purism products, updated on October 18th, 2024

Recent Posts

Related Content

Tags