An input-device should generally not change shape/functionality during use, unless there is a good reason for that and it is clearly indicated when that happens, as otherwise it will be more complicated and exhausting to use, and learn to use, the input-device. To improve that, this commit will: - Make it so that the space-bar, view-switching buttons, backspace-button, and return-button will not move around when switching views. - Add placeholder-buttons and/or stretch buttons to fill gaps. - Remove buttons that are duplicated in the same view. - Add buttons for entering commas, on the base-views of some layouts. - Make the shape of layouts fit into a rectangular space; usually without empty space. - Align layouts more closely to the expected aspect-ratios, to reduce changes when switching between languages, and use more of the available space. Other changes: - `.`-buttons are generally not highlighted anymore. - On the layouts `gr` and `gr+polytonic`, the highlighting for punctuation has been switched to `subtle-highlight` from `special`, so those can be visually distinguished from buttons with special functionality. - The Spanish characters `ñ` and `Ñ` on the `French (Swiss)`-layout (ch+fr) were making the layout wider than it should be. As there was no other appropriate place for those buttons, and the layout is meant for entering French, not Spanish, those buttons have been removed from the layout. Some layouts have been changed much: - gr+polytonic (which requires more work, but it is much more usable now) - ir Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/646>
squeekboard - a Wayland on-screen keyboard
Squeekboard is the on-screen keyboard for Phosh. It is primarily designed for smartphones, tablet-PCs, and other devices with touchscreens.
It squeaks because some Rust got inside.
Features
Present
- GTK3
- Custom keyboard layouts defined in yaml
- Input purpose dependent keyboard layouts
- DBus interface to show and hide
- Use Wayland input method protocol to submit text
- Use Wayland virtual keyboard protocol
TODO
- Port to GTK4 / GTK4-Layer-Shell
- Text prediction/correction
- Use preedit
- Submit actions like "next field" using a future Wayland protocol
- Pick up DBus interface files from /usr/share
Creating layouts
If you want to work on layouts, check out the guide.
Building
Dependencies
See .gitlab-ci.yml or run apt-get build-dep .
Build from git repo
$ git clone https://gitlab.gnome.org/World/Phosh/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's panel will appear whenever a compatible application requests an input method. Click a text field in any GTK application, like python3 ./tools/entry.py.
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
Alternatively, force panel visibility manually with:
$ busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b true
What the compositor has to support
A compatible compositor has to support the protocols:
- layer-shell
- virtual-keyboard-v1
It's strongly recommended to support:
- input-method-v2
Developing
See doc/hacking.md for this copy, or the official documentation for the current release.