9dd67ad2bc0c39c0c30936f651e4bed83a172de2
Even though proper size management is being worked on, this patch proposes a simple and easily revertable solution to device-dependent sizing issues. First, it provides different calculations based on the display orientation. In landscape mode, this allows us to have a sensible keyboard size while leaving enough screen estate for apps to be able to display useful information. Then, it gets rid of the weird calculation for display widths between 360 and 540px. While having some continuity is a pleasant idea, in the real world in doesn't work, as shown by port attempts to other devices: a 480x800 display (scale 1) would show an unusable 190px-high keyboard (about half the size of the Librem 5 on-screen keyboard on a device I own). Finally, this commit makes sure we never use a hardcoded size. Tested on the PinePhone, PineTab and Librem 5. Note: Current behavior is preserved on the L5 in portrait mode, but keyboard is a bit smaller in landscape mode; this is deliberate, as it was previously using too much space (causing some apps, such as chatty, to be unusable).
squeekboard - a Wayland virtual keyboard
Squeekboard is a virtual keyboard supporting Wayland, built primarily for the Librem 5 phone.
It squeaks because some Rust got inside.
Features
Present
- GTK3
- Custom yaml-defined keyboards
- DBus interface to show and hide
- Use Wayland input method protocol to show and hide
- Use Wayland virtual keyboard protocol
Temporarily dropped
- A settings interface
TODO
- Use Wayland input method protocol
- Pick up DBus interface files from /usr/share
Building
Dependencies
See .gitlab-ci.yml or run apt-get build-dep .
Build from git repo
$ git clone https://source.puri.sm/Librem5/squeekboard.git
$ cd squeekboard
$ mkdir _build
$ meson _build/
$ cd _build
$ ninja
To run tests use ninja test. To install squeekboard run ninja install.
Running
$ phoc # if no compatible Wayland compositor is running yet
$ cd ../build/
$ src/squeekboard
Squeekboard honors the gnome "screen-keyboard-enabled" setting. Either enable this through gnome-settings under accessibility or run:
$ gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled true
To make the keyboard show you can use either an application that does so automatically, like a text editor or python3 ./tests/entry.py, or you can manually trigger it with:
busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b true
Developing
See doc/hacking.md for this copy, or the official documentation for the current release.
Description
Languages
Rust
68.3%
C
25.7%
Meson
2.7%
Python
1.9%
CSS
1.1%
Other
0.3%